summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLarry Geromegnace <larry.geromegnace@mappy.com>2016-01-22 12:24:25 +0100
committerBrad Leege <bleege@gmail.com>2016-01-27 10:57:38 -0600
commit72ca584638b44d7d3e7865b98867269eb15a8e87 (patch)
tree3a26819ebfb690cc015c819fb896848420e9323e
parentc114ed6562242c1549a96d5a79b9aed229ba48aa (diff)
downloadqtlocation-mapboxgl-72ca584638b44d7d3e7865b98867269eb15a8e87.tar.gz
[android] Use padding to get center coordinates.
-rw-r--r--platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/views/MapView.java2
-rwxr-xr-xplatform/android/src/jni.cpp2
2 files changed, 2 insertions, 2 deletions
diff --git a/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/views/MapView.java b/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/views/MapView.java
index 7a46c46cd8..fdcf5c8cce 100644
--- a/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/views/MapView.java
+++ b/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/views/MapView.java
@@ -4351,7 +4351,7 @@ public final class MapView extends FrameLayout {
* view’s logical viewport.
*
* When the value of this property is equal to {0,0,0,0}, viewport
- * properties such as `centerCoordinate` assume a viewport that matches the map
+ * properties such as `getLatLng` assume a viewport that matches the map
* view’s frame. Otherwise, those properties are inset, excluding part of the
* frame from the viewport. For instance, if the only the top edge is inset, the
* map center is effectively shifted downward.
diff --git a/platform/android/src/jni.cpp b/platform/android/src/jni.cpp
index a6fff62bb0..e59f67cc19 100755
--- a/platform/android/src/jni.cpp
+++ b/platform/android/src/jni.cpp
@@ -655,7 +655,7 @@ jobject JNICALL nativeGetLatLng(JNIEnv *env, jobject obj, jlong nativeMapViewPtr
mbgl::Log::Debug(mbgl::Event::JNI, "nativeGetLatLng");
assert(nativeMapViewPtr != 0);
NativeMapView *nativeMapView = reinterpret_cast<NativeMapView *>(nativeMapViewPtr);
- mbgl::LatLng latLng = nativeMapView->getMap().getLatLng();
+ mbgl::LatLng latLng = nativeMapView->getMap().getLatLng(nativeMapView->getInsets());
jobject ret = env->NewObject(latLngClass, latLngConstructorId, latLng.latitude, latLng.longitude);
if (ret == nullptr) {