You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Aug 8, 2023. It is now read-only.
Repository navigation
This repository was archived by the owner on Aug 8, 2023. It is now read-only.
allow for annotation selection z-order change #991
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.
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.
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
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, 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.
Activity
jfirebaugh commentedon Mar 13, 2015
Not critical for Beta 1.
incanus commentedon 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:
Not having this alters the usability of annotations significantly.
incanus commentedon 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 commentedon Mar 13, 2015
👍 per offline discussion.
mb12 commentedon 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 commentedon Mar 13, 2015
We are shooting for very soon, likely early next week.
[-]allow for annotation selection[/-][+]allow for annotation selection z-order change[/+]incanus commentedon Jun 1, 2015
@kkaefer is starting to investigate more robust annotations in b3 and beyond.
1 remaining item
cupofjoakim commentedon May 11, 2016
@incanus Any updates on when this might be implemented?
boundsj commentedon 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
[ios] Bring annotation view to front when selected
[ios] Bring annotation view to front when selected
1ec5 commentedon 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 commentedon Jul 2, 2016
Hi @1ec5, I still having the problem with z-index of Annotation below.
Do you know what is final solution to fix it? Updated the latest Mapbox v3.2.3 from Fabric seem no helped.
Thanks.
1ec5 commentedon 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 commentedon Jan 22, 2018
Is annotation z-order api supported now?
Or when will this been done?