marker(position, centered, <MarkerOption>, <MapEvent>)
Draw a Google map marker on a map with given options and register events
Requires: map directive
Restrict To: Element
Parameters:
Name | Type | Description |
---|---|---|
position |
String | address, 'current', or [latitude, longitude] |
centered |
Boolean | if set, map will be centered with this marker |
<MarkerOption> |
String | Any Marker options, https://developers.google.com/maps/documentation/javascript/reference?csw=1#MarkerOptions |
<MapEvent> |
String | Any Marker events, https://developers.google.com/maps/documentation/javascript/reference |
- Source:
Requires:
- module:Attr2Options
- module:NavigatorGeolocation
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>
Requires
- module:Attr2Options
- module:NavigatorGeolocation