ios-sdk-examples icon indicating copy to clipboard operation
ios-sdk-examples copied to clipboard

Add view annotation z-ordering example

Open friedbunny opened this issue 8 years ago • 1 comments

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

friedbunny avatar Dec 21 '16 16:12 friedbunny

We should still do this.

captainbarbosa avatar Sep 18 '19 18:09 captainbarbosa