Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PointAnnotation ID cannot be set #497

Open
noforeignland opened this issue Apr 16, 2024 · 3 comments
Open

PointAnnotation ID cannot be set #497

noforeignland opened this issue Apr 16, 2024 · 3 comments

Comments

@noforeignland
Copy link

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.

@Nortontium
Copy link

Duplicate of #445

@maios
Copy link
Contributor

maios commented May 7, 2024

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.

@noforeignland
Copy link
Author

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 ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants