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

Tapping bunched up point annotation views should cycle among them #5166

Closed
1ec5 opened this issue May 27, 2016 · 1 comment
Closed

Tapping bunched up point annotation views should cycle among them #5166

1ec5 opened this issue May 27, 2016 · 1 comment
Assignees
Labels
annotations Annotations on iOS and macOS or markers on Android bug iOS Mapbox Maps SDK for iOS
Milestone

Comments

@1ec5
Copy link
Contributor

1ec5 commented May 27, 2016

When you tap repeatedly near a bunch of closely-spaced or overlapping GL-rendered point annotations, a different annotation is selected each time due to this cycling logic. MapKit does the same with MKAnnotationViews. This behavior is important to ensure that every annotation is reachable by the user. But MGLAnnotationView is a bit more haphazard, because we just select the first annotation view we happen to find in the query.

We should cycle among all the nearby annotations, whether they’re GL annotations, annotation views, or a mixture of both. This probably means we need to stop short-circuiting -annotationTagAtPoint:persistingResults: with -annotationViewAtPoint:. But until #5165 lands, I’m not sure how we’d be able to reconcile the two methods’ queries. (One of them is limited to the tap point, the other to the entire viewport.)

/cc @boundsj

@1ec5 1ec5 added bug iOS Mapbox Maps SDK for iOS annotations Annotations on iOS and macOS or markers on Android labels May 27, 2016
@1ec5 1ec5 added this to the ios-v3.3.0 milestone May 27, 2016
@boundsj boundsj self-assigned this Jun 23, 2016
@boundsj
Copy link
Contributor

boundsj commented Jun 23, 2016

@1ec5 #5460 contains a potential fix for this issue. It does not attempt to handle the case of views that significantly change size after they are added. It does not require #5165 but will work well with it (assuming invisible images on the annotation model backed by views or some other solution, or course).

With this change:

Only view backed annotations

cycle

View + image backed annotations

cycle_w_sprite

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
annotations Annotations on iOS and macOS or markers on Android bug iOS Mapbox Maps SDK for iOS
Projects
None yet
Development

No branches or pull requests

2 participants