summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorJordan Moncharmont <jormon@gmail.com>2016-01-22 18:17:30 -0800
committerMinh Nguyễn <mxn@1ec5.org>2016-02-01 20:55:55 -0800
commit909832624e3c3afa28f98e109c5bae188a4f3120 (patch)
tree105f4b0a7f45ef12141062c8010949bff791e082 /include
parent52689796dfed796a1e949d39be411ccca3041933 (diff)
downloadqtlocation-mapboxgl-909832624e3c3afa28f98e109c5bae188a4f3120.tar.gz
Custom edgeInsets for fitting in showAnnotations
Keeps sensible defaults already in place, but allows callers to override.
Diffstat (limited to 'include')
-rw-r--r--include/mbgl/ios/MGLMapView.h24
1 files changed, 21 insertions, 3 deletions
diff --git a/include/mbgl/ios/MGLMapView.h b/include/mbgl/ios/MGLMapView.h
index ed0327ea28..5a94ab2f44 100644
--- a/include/mbgl/ios/MGLMapView.h
+++ b/include/mbgl/ios/MGLMapView.h
@@ -596,10 +596,13 @@ IB_DESIGNABLE
/**
Sets the visible region so that the map displays the specified annotations.
-
+
Calling this method updates the value in the visibleCoordinateBounds property
- and potentially other properties to reflect the new map region.
-
+ and potentially other properties to reflect the new map region. Defaults to
+ insetting the annotation bounds by 100,100,100,100, or if map is smaller than
+ 200x200 in either dimension, sets the insets to 20% of that dimmension on
+ either side.
+
@param annotations The annotations that you want to be visible in the map.
@param animated `YES` if you want the map region change to be animated, or `NO`
if you want the map to display the new region immediately without animations.
@@ -607,6 +610,21 @@ IB_DESIGNABLE
- (void)showAnnotations:(NS_ARRAY_OF(id <MGLAnnotation>) *)annotations animated:(BOOL)animated;
/**
+ Sets the visible region so that the map displays the specified annotations with
+ custom insets.
+
+ Calling this method updates the value in the visibleCoordinateBounds property
+ and potentially other properties to reflect the new map region. It allows for
+ the customization of the UIEdgeInsets that determine the resultant viewport.
+
+ @param annotations The annotations that you want to be visible in the map.
+ @param edgeInsets Custom edge insets to contain the the annotations within.
+ @param animated `YES` if you want the map region change to be animated, or `NO`
+ if you want the map to display the new region immediately without animations.
+ */
+- (void)showAnnotations:(NS_ARRAY_OF(id <MGLAnnotation>) *)annotations withEdgeInsets:(UIEdgeInsets)edgeInsets animated:(BOOL)animated;
+
+/**
A camera representing the current viewpoint of the map.
*/
@property (nonatomic, copy) MGLMapCamera *camera;