[ios, osx] Wrap coordinates converted from points

ref #4444
This commit is contained in:
Minh Nguyễn
2016-03-24 14:21:23 -07:00
parent 2e01da1d71
commit 2a56565a9c
2 changed files with 2 additions and 2 deletions

View File

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

View File

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