Skip to content

(Google Maps): Cant set the label color for some reason #22496

@rondog

Description

@rondog

I am trying to set the Marker label color via the [options] property on . I successfully set the marker icon no problem...label color seem to be an issue though.

<google-map
  width="100%"
  height="100%"
  [hidden]="!showMap"
  [options]="mapOpts">
  <map-marker
    *ngFor="let marker of markers; let markerIndex = index"
    [options]="markerOpts"
    [position]="marker.position"
    [label]="markerIndex.toString()">
  </map-marker>
</google-map>

My markerOpts is a simple object

getMarkerOptions() {
  return {
    icon: {
      url: '/assets/pin.svg',
      scaledSize: new google.maps.Size(35, 35),
    },
    label: {
      color: 'red',
    },
  }
}

any idea? Like I said, icon works, but label color does not

Metadata

Metadata

Assignees

No one assigned

    Labels

    needs triageThis issue needs to be triaged by the teamtroubleshootingThis issue is not reporting an issue, but just asking for help

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions