-
Notifications
You must be signed in to change notification settings - Fork 182
Description
Hi everyone,
I’m running into a persistent issue with the Flutter Mapbox SDK when updating or deleting markers via PointAnnotationManager.
Problem description:
When I call update() or delete() on a PointAnnotationManager to replace an existing marker, the operation very often fails silently.
• No error/exception is thrown to the Flutter layer.
• The SDK internally reports the operation as “successful”.
• But on the UI, the old marker remains and a new marker gets created, causing duplicated markers.
This happens occasionally on older versions, but becomes noticeably more frequent after upgrading to the latest Mapbox Flutter SDK.
What I expect:
Calling update() should update the existing marker, and calling delete() should remove it — with reliable behavior or at least an error callback when it fails.
My questions:
1. Is this a known issue with the latest Flutter SDK version?
2. Is there any recommended workaround (e.g., waiting for certain lifecycle events, batching updates, manually forcing a refresh)?
3. Should I manage annotation IDs manually or recreate the entire AnnotationManager to avoid the issue?
Environment:
• Flutter version: 3.35.6
• mapbox_maps_flutter: 2.11.0
• Platform: both iOS and Android
Thanks in advance! Any insight or recommended fix would be greatly appreciated.