removeAnnotation method
void
removeAnnotation(
- String annotationId
)
Implementation
void removeAnnotation(String annotationId) {
runInAction(() {
_annotations.remove(annotationId);
_selectedAnnotationIds.remove(annotationId);
// Remove from spatial index
_parentController._spatialIndex.removeAnnotation(annotationId);
// Clear drag state if removing the dragged annotation
if (_draggedAnnotationId.value == annotationId) {
_draggedAnnotationId.value = null;
_lastPointerPosition.value = null;
}
});
}