[ Whereis® API Home ] [ Developers' Guide ] [ Layers ]
A marker consists of an icon at some specified geographical position. Typically, it is used to represent a point of interest (POI).
Methods
The following methods are available for working with markers.
Name | Description |
Map.addMarker(marker) | Adds the specified marker to the map |
Map.clearMarkers() | Removes all markers from the map |
Map.getMarkers() | Returns all the markers on the map. If no markers have been defined, returns an empty array. |
Map.removeMarker(marker) | Removes the specified marker from the map |
Marker.display(Boolean) | Shows or hides an existing marker. |
Assuming the point and icon have already been defined, the following snippet of code creates a marker and attaches it to the map.
var marker = new EMS.Marker(point, icon);
map.addMarker(marker);