Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mapsme/omim.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDmitry Kunin <dkunin@mapswith.me>2013-09-18 13:50:49 +0400
committerAlex Zolotarev <alex@maps.me>2015-09-23 02:02:16 +0300
commitef78f7f60a076aa4f7b4098e4d319f4ca9ee8b78 (patch)
tree8a1d9cb3bae9ee096558f06d8d063f324ee90db3 /android/jni/com/mapswithme/maps/Framework.cpp
parent69af634fbf1ffe88aff2f022ae79ab4f3b39218c (diff)
[and, yota] Mwm call to Yopme
Diffstat (limited to 'android/jni/com/mapswithme/maps/Framework.cpp')
-rw-r--r--android/jni/com/mapswithme/maps/Framework.cpp16
1 files changed, 16 insertions, 0 deletions
diff --git a/android/jni/com/mapswithme/maps/Framework.cpp b/android/jni/com/mapswithme/maps/Framework.cpp
index 2faeb68c95..3aa45bae9a 100644
--- a/android/jni/com/mapswithme/maps/Framework.cpp
+++ b/android/jni/com/mapswithme/maps/Framework.cpp
@@ -858,4 +858,20 @@ extern "C"
return static_cast<jint>(g_framework->NativeFramework()->GetDrawScale());
}
+ JNIEXPORT jdoubleArray Java_com_mapswithme_maps_Framework_getScreenRectCenter(JNIEnv * env, jclass clazz)
+ {
+ const m2::PointD center = g_framework
+ ->NativeFramework()
+ ->GetNavigator()
+ .Screen()
+ .GlobalRect()
+ .GlobalCenter();
+
+ double latlon[] = {MercatorBounds::YToLat(center.y), MercatorBounds::XToLon(center.x)};
+ jdoubleArray jLatLon = env->NewDoubleArray(2);
+ env->SetDoubleArrayRegion(jLatLon, 0, 2, latlon);
+
+ return jLatLon;
+ }
+
}