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 ›

{{#g-map lat="51.507568" lng="-0.127762" zoom=9 as |g|}}
  {{#each londonLocations as |l|}}
    {{g.marker
      lat=l.lat
      lng=l.lng
      draggable=true
      onClick=(action "onClick")}}
  {{/each}}
{{/g-map}}

Test Click on a marker to find out its coordinates.

On to circles!

Circles ›