This repository was archived by the owner on Aug 8, 2023. It is now read-only.
Repository navigation
[ios] Account for center offset when tapping annotation views - #5931
Merged
Merged
Conversation
This adjusts the tap point for the map's single tap gesture recognizer to use the coordinate to point translated point of the actual annotation the view represents. This fixes an issue where views that were offset in the point coordinate system were not selected when tapped since their associated annotations were actually at the origin of the offset.
Contributor
|
👍 |
2 tasks done
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #5820
This adjusts the tap point for the map's single tap gesture recognizer to use the coordinate to point translated point of the actual annotation the view represents. This fixes an issue where views that were offset in the point coordinate system were not selected when tapped since their associated annotations were actually at the origin of the offset.
An alternative would've been to use a gesture recognizer on each view but we've already stated that we don't want to go down that route since it would not work well with the existing logic we have for handling single taps and finding annotations near those taps.
Note: as before, if a mixture of annotations views with and without centerOffset is used, the selection behavior may look strange due to the cycling logic we use to handle the case of overlapping annotations.
cc @friedbunny