Angular Map - markers
An array of markers displayed on a map.
location
Specifies the marker location.
You can specify the location value in one of the following formats.
- { lat: 40.749825, lng: -73.987963}
- "40.749825, -73.987963"
- [40.749825, -73.987963]
- "Brooklyn Bridge,New York,NY"
If provider is "osm" and you specify markers[].location as an address string, implement providerConfig.calculateLocation to convert this address to coordinates. If the Map cannot resolve the address, the component displays the marker at {lat: 0, lng: 0}.
onClick
A callback function performed when the marker is clicked.
Information about the event.
| Name | Type | Description |
|---|---|---|
| component |
The UI component's instance. |
|
| element |
The UI component's container. It is an HTML Element or a jQuery Element when you use jQuery. |
|
| location |
The clicked marker's coordinates. |
|
| tooltip |
The clicked marker's Popover instance (only if provider is "osm"). |
If provider is "osm", the Map also calls this function when a user presses Enter or Space on a focused marker.
tooltip
A tooltip to be used for the marker.
This property takes an object that contains text and isShown fields. The text field specifies the tooltip text. The isShown field takes a Boolean value that specifies whether a tooltip is visible by default. If the tooltip should be hidden by default, pass the tooltip text directly to the tooltip property.
If provider is "osm", the Map displays tooltips in Popover instances. To customize these instances, use the e.tooltip field in markers[].onClick.