Skip to content
This repository was archived by the owner on Aug 8, 2023. It is now read-only.

[ios] Account for center offset when tapping annotation views - #5931

Merged
boundsj merged 1 commit into
masterfrom
boundsj-consider-offset-for-view-tap
Aug 11, 2016
Merged

boundsj merged 1 commit into
masterfrom
boundsj-consider-offset-for-view-tap

Conversation

@boundsj

@boundsj boundsj commented Aug 10, 2016

Copy link
Copy Markdown
Contributor

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

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.
@boundsj boundsj added the iOS Mapbox Maps SDK for iOS label Aug 10, 2016
@boundsj boundsj added this to the ios-v3.4.0 milestone Aug 10, 2016
@boundsj boundsj self-assigned this Aug 10, 2016
@friedbunny

Copy link
Copy Markdown
Contributor

👍

@boundsj
boundsj merged commit 89190f8 into master Aug 11, 2016
@boundsj
boundsj deleted the boundsj-consider-offset-for-view-tap branch August 11, 2016 16:59
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

iOS Mapbox Maps SDK for iOS

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[iOS] AnnotationView tap detection does not take into account the center offset

2 participants