summaryrefslogtreecommitdiff
path: root/platform/ios/src
diff options
context:
space:
mode:
authorBruno de Oliveira Abinader <bruno@mapbox.com>2019-03-01 09:58:58 +0200
committerBruno de Oliveira Abinader <bruno@mapbox.com>2019-03-04 14:45:32 +0200
commitba7427b4acf116aca7451ad3a6067dc234d3fa70 (patch)
tree106462886345e60f47bdeeaaf46580c67987b064 /platform/ios/src
parent73ac3c784fe755650dc631e2e722a47890981248 (diff)
downloadqtlocation-mapboxgl-ba7427b4acf116aca7451ad3a6067dc234d3fa70.tar.gz
[core] Transform{State}: s/angle/bearing/
Diffstat (limited to 'platform/ios/src')
-rw-r--r--platform/ios/src/MGLMapView.mm22
1 files changed, 11 insertions, 11 deletions
diff --git a/platform/ios/src/MGLMapView.mm b/platform/ios/src/MGLMapView.mm
index 353f87ad70..3de6e06e4d 100644
--- a/platform/ios/src/MGLMapView.mm
+++ b/platform/ios/src/MGLMapView.mm
@@ -1775,7 +1775,7 @@ public:
{
[self trackGestureEvent:MMEEventGestureRotateStart forRecognizer:rotate];
- self.angle = MGLRadiansFromDegrees(*self.mbglMap.getCameraOptions().angle) * -1;
+ self.angle = MGLRadiansFromDegrees(*self.mbglMap.getCameraOptions().bearing) * -1;
if (self.userTrackingMode != MGLUserTrackingModeNone)
{
@@ -1803,7 +1803,7 @@ public:
if ([self _shouldChangeFromCamera:oldCamera toCamera:toCamera])
{
self.mbglMap.jumpTo(mbgl::CameraOptions()
- .withAngle(newDegrees)
+ .withBearing(newDegrees)
.withAnchor(mbgl::ScreenCoordinate { centerPoint.x, centerPoint.y}));
}
@@ -1840,7 +1840,7 @@ public:
if ([self _shouldChangeFromCamera:oldCamera toCamera:toCamera])
{
self.mbglMap.easeTo(mbgl::CameraOptions()
- .withAngle(newDegrees)
+ .withBearing(newDegrees)
.withAnchor(mbgl::ScreenCoordinate { centerPoint.x, centerPoint.y }),
MGLDurationFromTimeInterval(decelerationRate));
@@ -2149,7 +2149,7 @@ public:
MGLMapCamera *camera;
mbgl::ScreenCoordinate anchor = mbgl::ScreenCoordinate { anchorPoint.x, anchorPoint.y };
- currentCameraOptions.angle = degrees;
+ currentCameraOptions.bearing = degrees;
currentCameraOptions.anchor = anchor;
camera = [self cameraForCameraOptions:currentCameraOptions];
@@ -2577,7 +2577,7 @@ public:
MGLLogInfo(@"Resetting the map to the current style’s default viewport.");
auto camera = self.mbglMap.getStyle().getDefaultCamera();
CGFloat pitch = *camera.pitch;
- CLLocationDirection heading = mbgl::util::wrap(*camera.angle, 0., 360.);
+ CLLocationDirection heading = mbgl::util::wrap(*camera.bearing, 0., 360.);
CLLocationDistance altitude = MGLAltitudeForZoomLevel(*camera.zoom, pitch, 0, self.frame.size);
self.camera = [MGLMapCamera cameraLookingAtCenterCoordinate:MGLLocationCoordinate2DFromLatLng(*camera.center)
altitude:altitude
@@ -3235,7 +3235,7 @@ public:
cameraOptions.zoom = zoomLevel;
if (direction >= 0)
{
- cameraOptions.angle = direction;
+ cameraOptions.bearing = direction;
}
mbgl::AnimationOptions animationOptions;
@@ -3491,7 +3491,7 @@ public:
- (CLLocationDirection)direction
{
- return *self.mbglMap.getCameraOptions().angle;
+ return *self.mbglMap.getCameraOptions().bearing;
}
- (void)setDirection:(CLLocationDirection)direction animated:(BOOL)animated
@@ -3524,7 +3524,7 @@ public:
if (self.userTrackingMode == MGLUserTrackingModeNone)
{
self.mbglMap.easeTo(mbgl::CameraOptions()
- .withAngle(direction)
+ .withBearing(direction)
.withPadding(MGLEdgeInsetsFromNSEdgeInsets(self.contentInset)),
MGLDurationFromTimeInterval(duration));
}
@@ -3532,7 +3532,7 @@ public:
{
CGPoint anchor = self.userLocationAnnotationViewCenter;
self.mbglMap.easeTo(mbgl::CameraOptions()
- .withAngle(direction)
+ .withBearing(direction)
.withAnchor(mbgl::ScreenCoordinate { anchor.x, anchor.y }),
MGLDurationFromTimeInterval(duration));
}
@@ -3797,7 +3797,7 @@ public:
mbgl::CameraOptions mapCamera = self.mbglMap.getCameraOptions();
CLLocationCoordinate2D centerCoordinate = MGLLocationCoordinate2DFromLatLng(cameraOptions.center ? *cameraOptions.center : self.mbglMap.getLatLng());
double zoomLevel = cameraOptions.zoom ? *cameraOptions.zoom : self.zoomLevel;
- CLLocationDirection direction = cameraOptions.angle ? mbgl::util::wrap(*cameraOptions.angle, 0., 360.) : self.direction;
+ CLLocationDirection direction = cameraOptions.bearing ? mbgl::util::wrap(*cameraOptions.bearing, 0., 360.) : self.direction;
CGFloat pitch = cameraOptions.pitch ? *cameraOptions.pitch : *mapCamera.pitch;
CLLocationDistance altitude = MGLAltitudeForZoomLevel(zoomLevel, pitch, centerCoordinate.latitude, self.frame.size);
return [MGLMapCamera cameraLookingAtCenterCoordinate:centerCoordinate altitude:altitude pitch:pitch heading:direction];
@@ -3818,7 +3818,7 @@ public:
self.frame.size);
if (camera.heading >= 0)
{
- options.angle = camera.heading;
+ options.bearing = camera.heading;
}
if (camera.pitch >= 0)
{