Angular directive

marker source

Description

Draw a Google map marker on a map with given options and register events

Requires: map directive

Restrict To: Element

Attributes

NameTypeDescription
position String

address, 'current', or [latitude, longitude] example: '1600 Pennsylvania Ave, 20500 Washingtion DC', 'current position', '[40.74, -74.18]'

centered Boolean

if set, map will be centered with this marker

geo-callback Expression

if position is an address, the expression is will be performed when geo-lookup is successful. e.g., geo-callback="showStoreInfo()"

no-watcher Boolean

if true, no attribute observer is added. Useful for many ng-repeat

<MarkerOption> String

Any Marker options

<MapEvent> String

Any Marker events

Example

Usage:
  <map MAP_ATTRIBUTES>
   <marker ANY_MARKER_OPTIONS ANY_MARKER_EVENTS"></MARKER>
  </map>
Example:
  <map center="[40.74, -74.18]">
   <marker position="[40.74, -74.18]" on-click="myfunc()"></marker>
  </map>
  <map center="the cn tower">
   <marker position="the cn tower" on-click="myfunc()"></marker>
  </map>