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

Support for tapping on POIs in the Style Layers #539

Closed
leeprobert opened this issue Feb 13, 2021 · 6 comments
Closed

Support for tapping on POIs in the Style Layers #539

leeprobert opened this issue Feb 13, 2021 · 6 comments
Labels

Comments

@leeprobert
Copy link

I can't see any support for tapping on POIs in the Style Layers. I have all my POI information baked into the Styles as points, and I would like to be able to tap on them to get the JSON node data and handle the result.

Is this supported? I know there is a way to do it natively. This post relates to what I want to do: https://stackoverflow.com/questions/39760786/mapbox-how-to-select-poi-point-from-own-style-map-on-mobile

@leeprobert
Copy link
Author

This area of the iOS documentation : https://docs.mapbox.com/ios/maps/api/6.3.0/for-style-authors.html
has this tip:
You can make an icon or text label interactive by installing a gesture recognizer and performing feature querying (e.g., -[MGLMapView visibleFeaturesAtPoint:]) to get details about the selected feature.

So it looks like visibleFeaturesAtPoint is the method I need in Flutter.

@leeprobert
Copy link
Author

I found this Pull request which is promising: #177
Do you have an example of using filter queries in the Flutter examples?

@m0nac0
Copy link
Collaborator

m0nac0 commented Feb 20, 2021

@leeprobert The PR you linked actually added some code to the example app that showcases this feature. Is that what you're looking for?

@leeprobert
Copy link
Author

The only issue I am facing now is finding more information about the filtering syntax. Any ideas?

@m0nac0
Copy link
Collaborator

m0nac0 commented Feb 20, 2021

I haven't really worked with those myself, but this might be a good starting point.

@stale
Copy link

stale bot commented Jan 14, 2022

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale label Jan 14, 2022
@stale stale bot closed this as completed Jan 21, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants