summaryrefslogtreecommitdiff
path: root/src/mbgl/annotation/annotation_manager.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/mbgl/annotation/annotation_manager.cpp')
-rw-r--r--src/mbgl/annotation/annotation_manager.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/mbgl/annotation/annotation_manager.cpp b/src/mbgl/annotation/annotation_manager.cpp
index 52f8b08ad3..5f5feb456a 100644
--- a/src/mbgl/annotation/annotation_manager.cpp
+++ b/src/mbgl/annotation/annotation_manager.cpp
@@ -48,6 +48,16 @@ AnnotationManager::addShapeAnnotations(const std::vector<ShapeAnnotation>& shape
return annotationIDs;
}
+void AnnotationManager::updatePointAnnotation(const AnnotationID& id, const PointAnnotation& point, const uint8_t) {
+ auto foundAnnotation = pointAnnotations.find(id);
+ if (foundAnnotation != pointAnnotations.end()) {
+ auto updatedAnnotation = std::make_shared<PointAnnotationImpl>(id, point);
+ pointTree.remove(foundAnnotation->second);
+ pointTree.insert(updatedAnnotation);
+ foundAnnotation->second = updatedAnnotation;
+ }
+}
+
void AnnotationManager::removeAnnotations(const AnnotationIDs& ids) {
for (const auto& id : ids) {
if (pointAnnotations.find(id) != pointAnnotations.end()) {