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

allow for annotation selection z-order change #991

Closed
incanus opened this issue Mar 12, 2015 · 13 comments
Closed

allow for annotation selection z-order change #991

incanus opened this issue Mar 12, 2015 · 13 comments
Assignees
Labels
annotations Annotations on iOS and macOS or markers on Android feature iOS Mapbox Maps SDK for iOS
Milestone

Comments

@incanus
Copy link
Contributor

incanus commented Mar 12, 2015

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.

@incanus incanus added this to the iOS Beta 1 milestone Mar 12, 2015
@jfirebaugh jfirebaugh modified the milestones: iOS Beta 2, iOS Beta 1 Mar 13, 2015
@jfirebaugh
Copy link
Contributor

Not critical for Beta 1.

@incanus
Copy link
Contributor Author

incanus commented Mar 13, 2015

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.

@incanus
Copy link
Contributor Author

incanus commented Mar 13, 2015

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.

@incanus
Copy link
Contributor Author

incanus commented Mar 13, 2015

Not critical for Beta 1.

👍 per offline discussion.

@mb12
Copy link

mb12 commented Mar 13, 2015

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

@incanus
Copy link
Contributor Author

incanus commented Mar 13, 2015

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

@incanus incanus mentioned this issue Mar 18, 2015
@incanus incanus changed the title allow for annotation selection allow for annotation selection z-order change Mar 22, 2015
@incanus
Copy link
Contributor Author

incanus commented Jun 1, 2015

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

@cupofjoakim
Copy link

@incanus Any updates on when this might be implemented?

@boundsj
Copy link
Contributor

boundsj commented May 11, 2016

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

@1ec5 1ec5 added annotations Annotations on iOS and macOS or markers on Android iOS Mapbox Maps SDK for iOS labels Jun 5, 2016
@1ec5
Copy link
Contributor

1ec5 commented Jun 8, 2016

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.

@kythanh
Copy link

kythanh commented Jul 2, 2016

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.

@1ec5
Copy link
Contributor

1ec5 commented Jul 2, 2016

@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.

@sunzuhan
Copy link

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

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 feature iOS Mapbox Maps SDK for iOS
Projects
None yet
Development

Successfully merging a pull request may close this issue.

8 participants