summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMinh Nguyễn <mxn@1ec5.org>2016-03-24 14:21:23 -0700
committerMinh Nguyễn <mxn@1ec5.org>2016-03-25 11:03:06 -0700
commit2a56565a9c612c79f099ed627bfacd8b47627487 (patch)
treea501a352a681bf447fc0efc1a109899c92ebc683
parent2e01da1d71dd9965f1eeb608859879f70038c5da (diff)
downloadqtlocation-mapboxgl-2a56565a9c612c79f099ed627bfacd8b47627487.tar.gz
[ios, osx] Wrap coordinates converted from points
ref #4444
-rw-r--r--platform/ios/src/MGLMapView.mm2
-rw-r--r--platform/osx/src/MGLMapView.mm2
2 files changed, 2 insertions, 2 deletions
diff --git a/platform/ios/src/MGLMapView.mm b/platform/ios/src/MGLMapView.mm
index 1d7a5090d5..9b094ec894 100644
--- a/platform/ios/src/MGLMapView.mm
+++ b/platform/ios/src/MGLMapView.mm
@@ -2150,7 +2150,7 @@ mbgl::Duration MGLDurationInSeconds(NSTimeInterval duration)
- (mbgl::LatLng)convertPoint:(CGPoint)point toLatLngFromView:(nullable UIView *)view
{
CGPoint convertedPoint = [self convertPoint:point fromView:view];
- return _mbglMap->latLngForPixel(mbgl::ScreenCoordinate(convertedPoint.x, convertedPoint.y));
+ return _mbglMap->latLngForPixel(mbgl::ScreenCoordinate(convertedPoint.x, convertedPoint.y)).wrapped();
}
- (CGPoint)convertCoordinate:(CLLocationCoordinate2D)coordinate toPointToView:(nullable UIView *)view
diff --git a/platform/osx/src/MGLMapView.mm b/platform/osx/src/MGLMapView.mm
index e09a6c2672..1ab98b9f84 100644
--- a/platform/osx/src/MGLMapView.mm
+++ b/platform/osx/src/MGLMapView.mm
@@ -2160,7 +2160,7 @@ public:
convertedPoint.x,
// mbgl origin is at the top-left corner.
NSHeight(self.bounds) - convertedPoint.y,
- });
+ }).wrapped();
}
- (NSRect)convertCoordinateBounds:(MGLCoordinateBounds)bounds toRectToView:(nullable NSView *)view {