Creating markers

You can create a basic marker with the yielded marker component. Once again, you can use either lat and lng, or position, to set the position.

Every attribute passed to the marker will be passed on as an option to the marker, much like with the g-map component. Events work in the same way.

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

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

  {{#each this.londonLocations as |location|}}
    <map.marker
      @lat={{location.lat}}
      @lng={{location.lng}}
      @draggable={{true}}
      @onClick={{this.onClick}} />
  {{/each}}

</GMap>

Test Click on a marker to find out its coordinates.

On to circles!

Circles ›