mapbox-maps-flutter
mapbox-maps-flutter copied to clipboard
PointAnnotation ID cannot be set
Problem:
The ID that gets retreived from the feature that's tapped is an internally generated GUID and offers no clue to the listener about which point was selected by the user.
From the demo app:
class AnnotationClickListener extends OnPointAnnotationClickListener {
@override
void onPointAnnotationClick(PointAnnotation annotation) {
print("onAnnotationClick, id: $**{annotation.id}"**);
}
}
Expected behaviour There should be a way to set the ID when adding points to the annotation manager.
Duplicate of #445
Hi @noforeignland, thank you for raising this. We currently don't allow setting custom ID for annotations due to our MapboxMaps Android SDK does not support this, however, after some internal discussion, we have decided to enable this in Android and therefore we can also enable this in MapboxMaps Flutter plugin. I will keep you updated when this feature comes alive.
Hi @noforeignland, thank you for raising this. We currently don't allow setting custom ID for annotations due to our MapboxMaps Android SDK does not support this, however, after some internal discussion, we have decided to enable this in Android and therefore we can also enable this in MapboxMaps Flutter plugin. I will keep you updated when this feature comes alive.
Thanks for the update - in the meantime, how can apps detect which marker was tapped on without an id ?