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-06-25 10:34:44 +0400
committerAlex Zolotarev <alex@maps.me>2015-09-23 01:56:54 +0300
commitc7b4e82f69bea8cec54030e7216a3bdfe71de1b6 (patch)
tree1de00c87acba1f050c4c4e931596eefb468a6556 /android/jni/com/mapswithme/maps
parent485ba9730356a02494d259a1bcc8dd10651645ce (diff)
[android] code review fixes. new place page look. (in portrait).
Diffstat (limited to 'android/jni/com/mapswithme/maps')
-rw-r--r--android/jni/com/mapswithme/maps/Framework.cpp25
1 files changed, 10 insertions, 15 deletions
diff --git a/android/jni/com/mapswithme/maps/Framework.cpp b/android/jni/com/mapswithme/maps/Framework.cpp
index cea03defa2..2067ac32df 100644
--- a/android/jni/com/mapswithme/maps/Framework.cpp
+++ b/android/jni/com/mapswithme/maps/Framework.cpp
@@ -709,10 +709,8 @@ namespace android
if (m_bmBaloon == NULL)
return;
- int width = m_work.GetNavigator().Screen().GetWidth();
- int height = m_work.GetNavigator().Screen().GetHeight();
-
- m_bmBaloon->onScreenSize(width, height);
+ ScreenBase screen = m_work.GetNavigator().Screen();
+ m_bmBaloon->onScreenSize(screen.GetWidth(), screen.GetHeight());
}
BookmarkBalloon * Framework::GetBookmarkBalloon()
@@ -1014,17 +1012,15 @@ extern "C"
{
string distance;
double azimut = -1.0;
- g_framework->NativeFramework()->GetDistanceAndAzimut(
- m2::PointD(merX, merY), cLat, cLon, north, distance, azimut);
-
- jclass klass = env->FindClass("com/mapswithme/maps/bookmarks/data/DistanceAndAzimut");
- ASSERT ( klass, () );
- jmethodID methodID = env->GetMethodID(
- klass, "<init>",
- "(Ljava/lang/String;D)V");
+ g_framework->NativeFramework()->GetDistanceAndAzimut(m2::PointD(merX, merY), cLat, cLon, north, distance, azimut);
+
+ jclass daClazz = env->FindClass("com/mapswithme/maps/bookmarks/data/DistanceAndAzimut");
+ ASSERT ( daClazz, () );
+
+ jmethodID methodID = env->GetMethodID(daClazz, "<init>", "(Ljava/lang/String;D)V");
ASSERT ( methodID, () );
- return env->NewObject(klass, methodID,
+ return env->NewObject(daClazz, methodID,
jni::ToJavaString(env, distance.c_str()),
static_cast<jdouble>(azimut));
}
@@ -1041,7 +1037,6 @@ extern "C"
JNIEXPORT jobject JNICALL
Java_com_mapswithme_maps_Framework_nativeLatLon2DMS(JNIEnv * env, jclass clazz, jdouble lat, jdouble lon)
{
- const string dms = MeasurementUtils::FormatLatLonAsDMS(lat, lon, false);
- return jni::ToJavaString(env, dms);
+ return jni::ToJavaString(env, MeasurementUtils::FormatLatLonAsDMS(lat, lon, false));
}
}