summaryrefslogtreecommitdiff
path: root/platform
diff options
context:
space:
mode:
authorBruno de Oliveira Abinader <bruno@mapbox.com>2016-02-09 21:22:46 +0200
committerBruno de Oliveira Abinader <bruno@mapbox.com>2016-03-01 20:58:54 +0000
commitc17e95498349db7f459cd629f2d65b9f3bfb49c6 (patch)
tree47d9483d202b70e52632aeabdfc65ac550b8bac2 /platform
parent4994b3dc574443ad6e24ea1d715e0ebcdbb0f124 (diff)
downloadqtlocation-mapboxgl-c17e95498349db7f459cd629f2d65b9f3bfb49c6.tar.gz
[android|ios|osx] Fix return type for pixelForLatLng
Diffstat (limited to 'platform')
-rwxr-xr-xplatform/android/src/jni.cpp2
-rw-r--r--platform/ios/src/MGLMapView.mm2
-rw-r--r--platform/osx/src/MGLMapView.mm2
3 files changed, 3 insertions, 3 deletions
diff --git a/platform/android/src/jni.cpp b/platform/android/src/jni.cpp
index f8ad7b6fca..07e5d1a66b 100755
--- a/platform/android/src/jni.cpp
+++ b/platform/android/src/jni.cpp
@@ -1531,7 +1531,7 @@ jobject JNICALL nativePixelForLatLng(JNIEnv *env, jobject obj, jlong nativeMapVi
return nullptr;
}
- mbgl::vec2<double> pixel = nativeMapView->getMap().pixelForLatLng(mbgl::LatLng(latitude, longitude));
+ mbgl::ScreenCoordinate pixel = nativeMapView->getMap().pixelForLatLng(mbgl::LatLng(latitude, longitude));
jobject ret = env->NewObject(pointFClass, pointFConstructorId, static_cast<jfloat>(pixel.x), static_cast<jfloat>(pixel.y));
if (ret == nullptr) {
diff --git a/platform/ios/src/MGLMapView.mm b/platform/ios/src/MGLMapView.mm
index 5fe26b35d6..ccf8a7bc3d 100644
--- a/platform/ios/src/MGLMapView.mm
+++ b/platform/ios/src/MGLMapView.mm
@@ -2177,7 +2177,7 @@ mbgl::Duration MGLDurationInSeconds(NSTimeInterval duration)
/// Converts a geographic coordinate to a point in the view’s coordinate system.
- (CGPoint)convertLatLng:(mbgl::LatLng)latLng toPointToView:(nullable UIView *)view
{
- mbgl::vec2<double> pixel = _mbglMap->pixelForLatLng(latLng);
+ mbgl::ScreenCoordinate pixel = _mbglMap->pixelForLatLng(latLng);
return [self convertPoint:CGPointMake(pixel.x, pixel.y) toView:view];
}
diff --git a/platform/osx/src/MGLMapView.mm b/platform/osx/src/MGLMapView.mm
index 94971e55b1..9c903484e4 100644
--- a/platform/osx/src/MGLMapView.mm
+++ b/platform/osx/src/MGLMapView.mm
@@ -2165,7 +2165,7 @@ public:
/// Converts a geographic coordinate to a point in the view’s coordinate system.
- (NSPoint)convertLatLng:(mbgl::LatLng)latLng toPointToView:(nullable NSView *)view {
- mbgl::vec2<double> pixel = _mbglMap->pixelForLatLng(latLng);
+ mbgl::ScreenCoordinate pixel = _mbglMap->pixelForLatLng(latLng);
// Cocoa origin is at the lower-left corner.
pixel.y = NSHeight(self.bounds) - pixel.y;
return [self convertPoint:NSMakePoint(pixel.x, pixel.y) toView:view];