Creating advanced markers

The Advanced Marker is Google Maps' successor to the Marker. To use the advanced markers, the map must have a mapId. Legacy styling with styles will also be disabled.

You can create an advanced marker with the yielded advancedMarker component. You can use either lat and lng, or position, to set the position.

Every attribute passed to advancedMarker will be passed on as an option to the advanced marker.

Tip Don’t forget that these are Google Maps events, not Ember events! Learn about event handling ›

<GMap
  @mapId="<YOUR MAPID"
  @lat="51.507568"
  @lng="-0.127762"
  @zoom={{9}} as |map|>

  {{#each this.londonLocations as |location|}}
    <map.advancedMarker
      @lat={{location.lat}}
      @lng={{location.lng}}
      @gmpDraggable={{false}}
      @onClick={{this.onClick}} />
  {{/each}}

</GMap>

Test Click on a marker to find out its coordinates.

On to circles!

Circles ›