Skip to main content
The SDK provides the ability to add markers to show specific POIs or images in the map.
Assure the map is ready before managing markers. Learn more.

Adding Markers

To add a new marker, you can use MapManager.addMarker() method:
final marker = await _mapManager.addMarker(
  MapManagerMarkerOptions(
    coordinate: MapManagerLatLng(
      latitude: 37.7749,
      longitude: -122.4194,
    ),
    isSelectable: true,
  ),
);

print("Marker's annotationID is ${marker.annotationID}.");

Removing Markers

To clean all markers:
_mapManager.removeAnnotations(MapManagerRemoveAnnotationsArguments());
To clean markers with a specific tag:
_mapManager?.removeAnnotations(
  MapManagerRemoveAnnotationsArguments(tag: '123456'),
);
To clean a specific marker by its annotation ID:
_mapManager.removeAnnotation(
  MapManagerRemoveAnnotationArguments(annotationID: 'markerId'),
);