Skip to content
This repository was archived by the owner on Aug 8, 2023. It is now read-only.
This repository was 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

Description

@1ec5

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

Activity

  1. added
    iOS
    annotations
    on May 27, 2016
  2. added this to the ios-v3.3.0 milestone on May 27, 2016
  3. self-assigned this
    on Jun 23, 2016
  4. boundsj commented on Jun 23, 2016

    @boundsj
    Contributor

    @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 join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

annotationsbugiOS

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions