From 98a47884f06a8f165a2c15a54f82b356c8ef23d8 Mon Sep 17 00:00:00 2001 From: Asheem Mamoowala Date: Mon, 9 Oct 2017 15:59:07 -0700 Subject: [PATCH] [ios, macos] Use CLLocationDirection for direction parameter in -[MGLMapView cameraThatFitsShape:shape direction: edgePadding:] --- platform/ios/src/MGLMapView.h | 2 +- platform/ios/src/MGLMapView.mm | 2 +- platform/macos/src/MGLMapView.h | 2 +- platform/macos/src/MGLMapView.mm | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/platform/ios/src/MGLMapView.h b/platform/ios/src/MGLMapView.h index 843fb3d28..e2c070a54 100644 --- a/platform/ios/src/MGLMapView.h +++ b/platform/ios/src/MGLMapView.h @@ -901,7 +901,7 @@ MGL_EXPORT IB_DESIGNABLE (close to the ground) as possible while still including the entire shape. The camera object uses the current pitch. */ -- (MGLMapCamera *)cameraThatFitsShape:(MGLShape *)shape direction:(double)direction edgePadding:(UIEdgeInsets)insets; +- (MGLMapCamera *)cameraThatFitsShape:(MGLShape *)shape direction:(CLLocationDirection)direction edgePadding:(UIEdgeInsets)insets; /** Returns the point in this view’s coordinate system on which to "anchor" in diff --git a/platform/ios/src/MGLMapView.mm b/platform/ios/src/MGLMapView.mm index cc6c6bde6..0e76c0c71 100644 --- a/platform/ios/src/MGLMapView.mm +++ b/platform/ios/src/MGLMapView.mm @@ -3012,7 +3012,7 @@ public: return [self cameraForCameraOptions:cameraOptions]; } -- (MGLMapCamera *)cameraThatFitsShape:(MGLShape *)shape direction:(double)direction edgePadding:(UIEdgeInsets)insets { +- (MGLMapCamera *)cameraThatFitsShape:(MGLShape *)shape direction:(CLLocationDirection)direction edgePadding:(UIEdgeInsets)insets { mbgl::EdgeInsets padding = MGLEdgeInsetsFromNSEdgeInsets(insets); padding += MGLEdgeInsetsFromNSEdgeInsets(self.contentInset); diff --git a/platform/macos/src/MGLMapView.h b/platform/macos/src/MGLMapView.h index 242f3f1e1..de099157c 100644 --- a/platform/macos/src/MGLMapView.h +++ b/platform/macos/src/MGLMapView.h @@ -487,7 +487,7 @@ MGL_EXPORT IB_DESIGNABLE (close to the ground) as possible while still including the entire shape. The camera object uses the current pitch. */ -- (MGLMapCamera *)cameraThatFitsShape:(MGLShape *)shape direction:(double)direction edgePadding:(NSEdgeInsets)insets; +- (MGLMapCamera *)cameraThatFitsShape:(MGLShape *)shape direction:(CLLocationDirection)direction edgePadding:(NSEdgeInsets)insets; /** A Boolean value indicating whether the receiver automatically adjusts its diff --git a/platform/macos/src/MGLMapView.mm b/platform/macos/src/MGLMapView.mm index 2966f378a..0aa5bdc9d 100644 --- a/platform/macos/src/MGLMapView.mm +++ b/platform/macos/src/MGLMapView.mm @@ -1272,7 +1272,7 @@ public: return [self cameraForCameraOptions:cameraOptions]; } -- (MGLMapCamera *)cameraThatFitsShape:(MGLShape *)shape direction:(double)direction edgePadding:(NSEdgeInsets)insets { +- (MGLMapCamera *)cameraThatFitsShape:(MGLShape *)shape direction:(CLLocationDirection)direction edgePadding:(NSEdgeInsets)insets { mbgl::EdgeInsets padding = MGLEdgeInsetsFromNSEdgeInsets(insets); padding += MGLEdgeInsetsFromNSEdgeInsets(self.contentInsets);