directive:marker source

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

Requires: map directive

Restrict To: Element

Dependencies:
NameTypeDescription
Attr2Options service

convert html attribute to Gogole map api options

NavigatorGeolocation

It is used to find the current location

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()"

<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()"></div>
  </map>
  <map center="the cn tower">
   <marker position="the cn tower" on-click="myfunc()"></div>
  </map>