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.

allow for annotation selection z-order change #991

Closed

Description

@incanus

Piggybacking off of #988, when you mark an annotation as selected, it should come to the front of the z-order. This is how MapKit behaves. For state tracking, we can do that per-platform (such as determining whether single or multiple selection is allowed), but we need to be able to change individual ordering on demand for the visual component.

Need to see how difficult this might be in the shaders in #988 first.

Activity

  1. added this to the iOS Beta 1 milestone on Mar 12, 2015
  2. jfirebaugh commented on Mar 13, 2015

    @jfirebaugh
    Contributor

    Not critical for Beta 1.

  3. incanus commented on Mar 13, 2015

    @incanus
    ContributorAuthor

    I think it is — try using Maps.app a bit with 8-10 annotations in overlapping proximity. As you tap the clump, each is selected in rotating order, coming to the front. So there are two things going on here:

    • Iteration among nearby point annotations to allow selection without zooming in (maybe not b1 material)
    • Bringing the selected annotation to the front

    Not having this alters the usability of annotations significantly.

  4. incanus commented on Mar 13, 2015

    @incanus
    ContributorAuthor

    Here's an example of what this looks like in our SDK:

    (from https://www.mapbox.com/guides/station-finder-part-2/)

    This doesn't show the inability to select this annotation because it's obscured, but that would be the case for any near the center of the map.

  5. incanus commented on Mar 13, 2015

    @incanus
    ContributorAuthor

    Not critical for Beta 1.

    👍 per offline discussion.

  6. mb12 commented on Mar 13, 2015

    @mb12

    Is it possible to share what is the approximate date when all checkins for iOS beta1 will be in master repo?

  7. incanus commented on Mar 13, 2015

    @incanus
    ContributorAuthor

    We are shooting for very soon, likely early next week.

  8. changed the title [-]allow for annotation selection[/-] [+]allow for annotation selection z-order change[/+] on Mar 22, 2015
  9. incanus commented on Jun 1, 2015

    @incanus
    ContributorAuthor

    @kkaefer is starting to investigate more robust annotations in b3 and beyond.

  10. modified the milestones: iOS Beta 3, iOS Beta 2 on Jun 1, 2015
  11. 1 remaining item

  12. modified the milestone: iOS Beta 3 on Jul 7, 2015
  13. cupofjoakim commented on May 11, 2016

    @cupofjoakim

    @incanus Any updates on when this might be implemented?

  14. boundsj commented on May 11, 2016

    @boundsj
    Contributor

    Hi @cupofjoakim please note that work on UIView based annotations is happening in #4801 and is expected to land in the next release. z-order of UIViews can be done with Cocoa APIs.

    However, for use cases requiring many thousands of annotations displayed concurrently, we are still planning to keep the existing GL annotations API. Z ordering for GL annotations requires a runtime styling API and that is tracked in #837

  15. added
    annotations
    iOS
    on Jun 5, 2016
  16. self-assigned this
    on Jun 5, 2016
  17. added a commit that references this issue on Jun 6, 2016
    953c343
  18. added this to the ios-v3.3.0 milestone on Jun 6, 2016
  19. added a commit that references this issue on Jun 7, 2016
    b761aad
  20. 1ec5 commented on Jun 8, 2016

    @1ec5
    Contributor

    With #5264, we send an annotation view to the front when it is selected. #5264 doesn’t address non-view-backed annotations (GL point annotations); that functionality would depend on #837.

    If you need to adjust the z-order of a specific annotation view beyond the functionality implemented in #5264, such as sending an annotation view to the back when the user deselects it, #5287 unblocks a simple approach to doing so using standard UIKit APIs; see #5287 (comment) for details.

  21. kythanh commented on Jul 2, 2016

    @kythanh

    Hi @1ec5, I still having the problem with z-index of Annotation below.

    screen shot 2016-07-03 at 12 28 59 am

    Do you know what is final solution to fix it? Updated the latest Mapbox v3.2.3 from Fabric seem no helped.

    Thanks.

  22. 1ec5 commented on Jul 2, 2016

    @1ec5
    Contributor

    @kythanh, the fix for this issue was added in #5264, which is in v3.3.0-beta.2. It’ll be available via Fabric once we release v3.3.0 in a week or so. Note that the change only applies to annotation views, which are new to v3.3.0, so you’ll have to replace your usage of MGLAnnotationImage with MGLAnnotationView to take advantage of the z-ordering fix.

  23. sunzuhan commented on Jan 22, 2018

    @sunzuhan

    Is annotation z-order api supported now?
    Or when will this been done?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

annotationsfeatureiOS

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions