mapbox / mapbox-gl-native

Interactive, thoroughly customizable maps in native Android, iOS, macOS, Node.js, and Qt applications, powered by vector tiles and OpenGL
https://mapbox.com/mobile
Other
4.37k stars 1.33k forks source link

-[MGLMapView viewForAnnotation:] #5406

Closed 1ec5 closed 8 years ago

1ec5 commented 8 years ago

For parity with MapKit, we should add a method to MGLMapView that looks like:

- (nullable MGLAnnotationView *)viewForAnnotation:(id<MGLAnnotation>)annotation SWIFT_NAME(view(for:));

which would bridge to Swift as:

func view(for annotation: MGLAnnotation) -> MGLAnnotationView?

/cc @frederoni @boundsj

obrhoff commented 8 years ago

The same should apply to

- (void)mapView:(MGLMapView *)mapView didAddAnnotationViews:(NSArray<MGLAnnotationView *> *)views

boundsj commented 8 years ago

@docterd The same should apply to

  • (void)mapView:(MGLMapView )mapView didAddAnnotationViews:(NSArray<MGLAnnotationView > *)views

Noting that this was picked up in https://github.com/mapbox/mapbox-gl-native/issues/5465