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

fixed layer based feature selection #765

Merged
merged 3 commits into from Nov 17, 2021
Merged

Conversation

felix-ht
Copy link
Collaborator

@felix-ht felix-ht commented Nov 15, 2021

Currently the "feature#onTap" method channel returns a random feature visible feature at the current location. So it ignores the order of the layers.
This is caused by visibleFeatures strange ios implementation (as opposed to android and web).

To fix this i added a function that gets the actual order of the user added layers as shown on the map, and then queries visibleFeatures in order until it finds a feature. This is somewhat slower than the old solution (~2ms instead of ~1ms at 40 layers), and might get worse with more layers, but seems to be the only solution i could come up with.

@felix-ht felix-ht temporarily deployed to ANDROID_CI_DOWNLOADS_TOKEN November 15, 2021 17:44 Inactive
@felix-ht felix-ht temporarily deployed to ANDROID_CI_DOWNLOADS_TOKEN November 15, 2021 17:44 Inactive
@felix-ht felix-ht added the ios label Nov 15, 2021
@felix-ht felix-ht changed the title fixed layer based tap random selection - IOS fixed layer based random feature selection - IOS Nov 15, 2021
@felix-ht felix-ht changed the title fixed layer based random feature selection - IOS fixed layer based feature selection Nov 15, 2021
@tobrun
Copy link
Collaborator

tobrun commented Nov 15, 2021

@felix-ht felix-ht requested a deployment to ANDROID_CI_DOWNLOADS_TOKEN 1 hour ago

Can you try doing it yourself? Updated the permissions :)

@felix-ht
Copy link
Collaborator Author

Can you try doing it yourself? Updated the permissions :)

@tobrun worked fine, thanks for setting this up 👍

@felix-ht felix-ht marked this pull request as draft November 16, 2021 21:06
@felix-ht felix-ht temporarily deployed to ANDROID_CI_DOWNLOADS_TOKEN November 16, 2021 21:14 Inactive
@felix-ht felix-ht temporarily deployed to ANDROID_CI_DOWNLOADS_TOKEN November 16, 2021 21:14 Inactive
@felix-ht felix-ht marked this pull request as ready for review November 16, 2021 21:16
@felix-ht felix-ht temporarily deployed to ANDROID_CI_DOWNLOADS_TOKEN November 16, 2021 21:21 Inactive
@felix-ht felix-ht temporarily deployed to ANDROID_CI_DOWNLOADS_TOKEN November 16, 2021 21:21 Inactive
@felix-ht felix-ht merged commit b26debb into master Nov 17, 2021
cheers-group added a commit to cheers-group/flutter-mapbox-gl that referenced this pull request Nov 18, 2021
cheers-group added a commit to cheers-group/flutter-mapbox-gl that referenced this pull request Nov 18, 2021
m0nac0 added a commit to maplibre/flutter-maplibre-gl that referenced this pull request May 14, 2022
flutter-mapbox-gl/maps#765

Co-authored-by: Felix Horvat <24698503+felix-ht@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants