updateAnnotation method

void updateAnnotation(
  1. Annotation annotation
)

Updates an annotation in the spatial index.

Implementation

void updateAnnotation(Annotation annotation) {
  _annotations[annotation.id] = annotation;
  final item = AnnotationSpatialItem(
    annotationId: annotation.id,
    bounds: annotation.bounds,
  );
  _grid.addOrUpdate(item);
  _autoFlush();
  _notifyChanged();
}