Draw a Google map marker on a map with given options and register events
Requires: map directive
Restrict To: Element
Attributes:
Name | Type | Description |
---|---|---|
position |
String | address, 'current', or [latitude, longitude] |
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, https://developers.google.com/maps/documentation/javascript/reference?csw=1#MarkerOptions |
<MapEvent> |
String | Any Marker events, https://developers.google.com/maps/documentation/javascript/reference |
Dependencies:
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>