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

Moving map deselects annotation #61

Open
ritter1 opened this issue Dec 19, 2019 · 4 comments
Open

Moving map deselects annotation #61

ritter1 opened this issue Dec 19, 2019 · 4 comments

Comments

@ritter1
Copy link

ritter1 commented Dec 19, 2019

Hi!

When I select a style annotation, and then move the map or pinch to zoom, then func annotationController(_ annotationController: MGLAnnotationController, didDeselect styleAnnotation: MGLStyleAnnotation) will be triggered. Is this intended?

The expected behavior is that the style annotation only then gets deselected, when I touch an empty spot on the map or another style annotation. Do I miss something?

All the best

@captainbarbosa
Copy link
Contributor

Hey @ritter1, thanks for trying this library.

I wasn't able to replicate what you're seeing. Below is the test app as current on master - didSelectStyleAnnotation doesn't get called as I pan and zoom with a selected annotation:

annotation-selection

Do you have a minimal test case you can provide do recreate what you're seeing?

@ritter1
Copy link
Author

ritter1 commented Dec 19, 2019

Hi @captainbarbosa, thanks for getting back to me so quickly!

I meant didDeselect, not didSelect.

As I am moving and zooming, the selected styleAnnotation should remain selected.

@ritter1
Copy link
Author

ritter1 commented Dec 20, 2019

Hey @captainbarbosa , any update on this?

@captainbarbosa
Copy link
Contributor

Thanks for opening this issue and providing important feedback - I confirm what you're seeing now. Please note that we're a small team and can't always respond quickly. In regards to your comment, I can see what you're experiencing now.

It looks like our main Maps SDK does not do this with regular MGLAnnotations. We should provide a similar behavior here or provide the option to select/deselect MGLStyleAnnotations when the map moves. I've opened #62 to track this. While I can't guarantee a timeframe for a fix, we will accept third party contributions if you are interested in taking this on.

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

2 participants