ios-sdk-examples
ios-sdk-examples copied to clipboard
Add view annotation z-ordering example
An example of https://github.com/mapbox/mapbox-gl-native/pull/5287:
For example, if you want a particular view-backed annotation other than the selected annotation to appear in front of any other view-backed annotations, your MGLMapViewDelegate can hold a strong reference to the view it provides for that annotation and implement this method:
- (void)mapViewDidFinishRenderingFrame:(MGLMapView *)mapView fullyRendered:(BOOL)fullyRendered {
// Make way for Its Preeminence!
[self.preeminentAnnotationView.superview bringSubviewToFront:self.preeminentAnnotationView];
}
This example would also need to note our support for other types of annotations, whatever that is when this is finished/published.
/cc @1ec5
We should still do this.