diff options
author | Romain Quidet <romain.quidet.ext@mappy.com> | 2015-12-15 17:43:18 +0100 |
---|---|---|
committer | Minh Nguyễn <mxn@1ec5.org> | 2016-01-06 23:42:41 -0800 |
commit | 04ab28b621f0affaefe01cea271f983d0a8fc53c (patch) | |
tree | c8a82e027eae3a2f27ed0df2c23eb5b3f4884161 /include/mbgl/ios/MGLMapView.h | |
parent | 42b13c69fe16c67f8b635b9e7017cd8f8d0ce18e (diff) | |
download | qtlocation-mapboxgl-04ab28b621f0affaefe01cea271f983d0a8fc53c.tar.gz |
[ios] expose custom callout api, wrap around SMCalloutView class
Diffstat (limited to 'include/mbgl/ios/MGLMapView.h')
-rw-r--r-- | include/mbgl/ios/MGLMapView.h | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/include/mbgl/ios/MGLMapView.h b/include/mbgl/ios/MGLMapView.h index 8ded5bf7fd..589e62a2f9 100644 --- a/include/mbgl/ios/MGLMapView.h +++ b/include/mbgl/ios/MGLMapView.h @@ -17,6 +17,7 @@ NS_ASSUME_NONNULL_BEGIN @protocol MGLMapViewDelegate; @protocol MGLAnnotation; @protocol MGLOverlay; +@protocol MGLCalloutViewProtocol; /** An interactive, customizable map view with an interface similar to the one @@ -962,7 +963,18 @@ IB_DESIGNABLE - (BOOL)mapView:(MGLMapView *)mapView annotationCanShowCallout:(id <MGLAnnotation>)annotation; /** - Return the view to display on the left side of the standard callout bubble. + Returns a custom callout view to display for the specified annotation. + + If the method is present in the delegate, it must return a new instance of a view dedicated to display the callout bubble. It will be configured by the map view. + + @param mapView The map view that requested the callout view. + @param annotation The object representing the annotation. + @return A view following the MGLCalloutView protocol. + */ +- (nullable UIView <MGLCalloutViewProtocol> *)mapView:(MGLMapView *)mapView customCalloutViewForAnnotation:(id <MGLAnnotation>)annotation; + +/** + Returns the view to display on the left side of the standard callout bubble. The default value is treated as if `nil`. The left callout view is typically used to display information about the annotation or to link to custom information provided by your application. @@ -975,7 +987,7 @@ IB_DESIGNABLE - (nullable UIView *)mapView:(MGLMapView *)mapView leftCalloutAccessoryViewForAnnotation:(id <MGLAnnotation>)annotation; /** - Return the view to display on the right side of the standard callout bubble. + Returns the view to display on the right side of the standard callout bubble. The default value is treated is if `nil`. The right callout view is typically used to link to more detailed information about the annotation. A common view to specify for this property is `UIButton` object whose type is set to `UIButtonTypeDetailDisclosure`. |