-
-
Notifications
You must be signed in to change notification settings - Fork 854
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
ShapeSource.onPress unable to return multiple features #611
Comments
Can't you use |
Thank you for that solution, @mfazekas . But this won't be satisfactory, in my case. I have quite a lot of features, so I don't show all of them at the same time. With your solution I still have to get calculate, which features could be found at a position within the currently set zoom level. That would be very hard for me, as they are actually not attached to the map. Plus, with this won't work if there is a I switched to It would be really great, if I am able to get the all the features of a cluster as I click on it to calculate the bounds I want to zoom in. Yes, this would be a breaking change, but it would be the right thing to do, as mapboxgl does it this way and I think at least the iOS-SDK as well (correct me if I'm wrong). Also it would be very easy for existing projects to migrate:
will be
Also they could improve:
|
@baijii i'd say that if possible keep |
@mfazekas Thank you very much for your work. I'll try to review this. But I'm quite unexperienced with this. Especially with the native parts. I tried to check out the branch and start the example project, but I'm unable to do so. I don't think, that is has anything to do with your pull request, as these things haven't changed. Maybe somebody else should review this, or you'll find to help a noob like me 😄. To me, the code seems legit, so I would be happy with just human testing, if the correct things will be returned in the end. Maybe you can add a test for this, to improve the test coverage a litte. |
Oh, I was a bit to late, I suppose, as it is already been merged. Maybe next time. Thanks again. |
@baijii no worries thanks for the effort. Next time you should be able to just use the branch from the PR in your project. PR #700 says that it's from Then in your package.json you can just write |
@mfazekas Thanks, that would have been indeed much easier. I'm looking forward to do so, next time. |
I feel the behavior is still unclear, it seems like |
I have a map with a ShapeSource and multiple Symbols. I'd like to get all features at a given point on press.
With mapboxgl for the web:
With @react-native-mapbox-gl/maps:
Is it possible to get the coordinates of the tap instead of the feature?
Maybe someone has a solution for me. Thanks!
The text was updated successfully, but these errors were encountered: