Create a new Marker, containing some HTML, at the specified position.
mapView.Markers.add(coordinate, `
<div
id="my-marker"
style="width:100px;height:40px;background:red;"
>
My Marker
</div>
`);
The MappedinNode or MappedinCoordinate to which the marker is pinned.
Stringified HTML content to render inside the Marker.
Optional
options: TCreateMarkerOptionsThe Marker object that was created.
Moves an existing Marker to a new position smoothly over time.
const marker = mapView.Markers.add(...);
// Animate the marker to a new coordinate over 500ms
mapView.Markers.animate(marker, newCoordinate, {
duration: 500
});
The Marker to move.
The MappedinNode or MappedinCoordinate to which the marker should be moved.
Optional
options: TAnimationOptionsRemoves an existing Marker.
const marker = mapView.Markers.add(...);
...
// The marker is no longer needed
mapView.Markers.remove(marker);
Remove all Marker instances from all maps.
mapView.Markers.removeAll();
Moves an existing Marker to a new position instantaneously. See also animate.
const marker = mapView.Markers.add(...);
// Move the marker to a new coordinate
mapView.Markers.setPosition(marker, newCoordinate);
The Marker to move.
The MappedinNode or MappedinCoordinate to which the marker should be moved.
API to control adding 2D markers to the scene.