diff options
author | Bruno de Oliveira Abinader <bruno@mapbox.com> | 2016-02-09 20:56:07 +0200 |
---|---|---|
committer | Bruno de Oliveira Abinader <bruno@mapbox.com> | 2016-03-01 20:58:54 +0000 |
commit | 4994b3dc574443ad6e24ea1d715e0ebcdbb0f124 (patch) | |
tree | f8b61e5acc88502b740f401deb61679126b1cbd0 /platform/osx/src/MGLMapView.mm | |
parent | 1ce99d2d7b1921dfac1d302553160184ceac7d3e (diff) | |
download | qtlocation-mapboxgl-4994b3dc574443ad6e24ea1d715e0ebcdbb0f124.tar.gz |
[core] PrecisionPoint is now ScreenCoordinate
Diffstat (limited to 'platform/osx/src/MGLMapView.mm')
-rw-r--r-- | platform/osx/src/MGLMapView.mm | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/platform/osx/src/MGLMapView.mm b/platform/osx/src/MGLMapView.mm index cd8cd45265..94971e55b1 100644 --- a/platform/osx/src/MGLMapView.mm +++ b/platform/osx/src/MGLMapView.mm @@ -899,7 +899,7 @@ public: - (void)scaleBy:(double)scaleFactor atPoint:(NSPoint)point animated:(BOOL)animated { [self willChangeValueForKey:@"centerCoordinate"]; [self willChangeValueForKey:@"zoomLevel"]; - mbgl::PrecisionPoint center(point.x, self.bounds.size.height - point.y); + mbgl::ScreenCoordinate center(point.x, self.bounds.size.height - point.y); _mbglMap->scaleBy(scaleFactor, center, MGLDurationInSeconds(animated ? MGLAnimationDuration : 0)); [self didChangeValueForKey:@"zoomLevel"]; [self didChangeValueForKey:@"centerCoordinate"]; @@ -1214,7 +1214,7 @@ public: _directionAtBeginningOfGesture = self.direction; _pitchAtBeginningOfGesture = _mbglMap->getPitch(); } else if (gestureRecognizer.state == NSGestureRecognizerStateChanged) { - mbgl::PrecisionPoint center(startPoint.x, self.bounds.size.height - startPoint.y); + mbgl::ScreenCoordinate center(startPoint.x, self.bounds.size.height - startPoint.y); if (self.rotateEnabled) { CLLocationDirection newDirection = _directionAtBeginningOfGesture - delta.x / 10; [self willChangeValueForKey:@"direction"]; @@ -1258,7 +1258,7 @@ public: _scaleAtBeginningOfGesture = _mbglMap->getScale(); } else if (gestureRecognizer.state == NSGestureRecognizerStateChanged) { NSPoint zoomInPoint = [gestureRecognizer locationInView:self]; - mbgl::PrecisionPoint center(zoomInPoint.x, self.bounds.size.height - zoomInPoint.y); + mbgl::ScreenCoordinate center(zoomInPoint.x, self.bounds.size.height - zoomInPoint.y); if (gestureRecognizer.magnification > -1) { [self willChangeValueForKey:@"zoomLevel"]; [self willChangeValueForKey:@"centerCoordinate"]; @@ -1339,7 +1339,7 @@ public: _directionAtBeginningOfGesture = self.direction; } else if (gestureRecognizer.state == NSGestureRecognizerStateChanged) { NSPoint rotationPoint = [gestureRecognizer locationInView:self]; - mbgl::PrecisionPoint center(rotationPoint.x, self.bounds.size.height - rotationPoint.y); + mbgl::ScreenCoordinate center(rotationPoint.x, self.bounds.size.height - rotationPoint.y); _mbglMap->setBearing(_directionAtBeginningOfGesture + gestureRecognizer.rotationInDegrees, center); } else if (gestureRecognizer.state == NSGestureRecognizerStateEnded || gestureRecognizer.state == NSGestureRecognizerStateCancelled) { |