[ios, macos] Use CLLocationDirection for direction parameter in -[MGLMapView cameraThatFitsShape:shape direction: edgePadding:]

This commit is contained in:
Asheem Mamoowala
2017-10-09 15:59:07 -07:00
parent 9e79659007
commit 98a47884f0
4 changed files with 4 additions and 4 deletions

View File

@@ -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

View File

@@ -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);

View File

@@ -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

View File

@@ -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);