From b11ef7918a0cfc1f64f7d1c7ab987849f4680b7e Mon Sep 17 00:00:00 2001 From: Vladimir Byko-Ianko Date: Thu, 3 Mar 2016 08:02:07 +0300 Subject: [PATCH] [new downloader] Android build fix after changes connected with ShowNode. --- android/jni/com/mapswithme/maps/Framework.cpp | 12 ++++++++---- android/jni/com/mapswithme/maps/Framework.hpp | 2 +- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/android/jni/com/mapswithme/maps/Framework.cpp b/android/jni/com/mapswithme/maps/Framework.cpp index 883644428d..203fe10e1f 100644 --- a/android/jni/com/mapswithme/maps/Framework.cpp +++ b/android/jni/com/mapswithme/maps/Framework.cpp @@ -4,6 +4,10 @@ #include "com/mapswithme/opengl/androidoglcontextfactory.hpp" #include "com/mapswithme/platform/Platform.hpp" +#include "map/user_mark.hpp" + +#include "storage/storage_helpers.hpp" + #include "drape_frontend/visual_params.hpp" #include "drape_frontend/user_event_stream.hpp" #include "drape/pointers.hpp" @@ -209,17 +213,17 @@ Storage & Framework::Storage() return m_work.Storage(); } -void Framework::ShowCountry(TCountryId const & idx, bool zoomToDownloadButton) +void Framework::ShowNode(TCountryId const & idx, bool zoomToDownloadButton) { if (zoomToDownloadButton) { - m2::RectD const rect = m_work.GetCountryBounds(idx); + m2::RectD const rect = CalcLimitRect(idx, m_work.Storage(), m_work.CountryInfoGetter()); double const lon = MercatorBounds::XToLon(rect.Center().x); double const lat = MercatorBounds::YToLat(rect.Center().y); m_work.ShowRect(lat, lon, 10); } else - m_work.ShowCountry(idx); + m_work.ShowNode(idx); } void Framework::Touch(int action, Finger const & f1, Finger const & f2, uint8_t maskedPointer) @@ -822,7 +826,7 @@ extern "C" JNIEXPORT void JNICALL Java_com_mapswithme_maps_Framework_nativeShowCountry(JNIEnv * env, jobject thiz, jstring countryId, jboolean zoomToDownloadButton) { - g_framework->ShowCountry(jni::ToNativeString(env, countryId), (bool) zoomToDownloadButton); + g_framework->ShowNode(jni::ToNativeString(env, countryId), (bool) zoomToDownloadButton); } JNIEXPORT void JNICALL diff --git a/android/jni/com/mapswithme/maps/Framework.hpp b/android/jni/com/mapswithme/maps/Framework.hpp index 75cf71b8f0..a9d9b5f282 100644 --- a/android/jni/com/mapswithme/maps/Framework.hpp +++ b/android/jni/com/mapswithme/maps/Framework.hpp @@ -57,7 +57,7 @@ namespace android storage::Storage & Storage(); - void ShowCountry(storage::TCountryId const & countryId, bool zoomToDownloadButton); + void ShowNode(storage::TCountryId const & countryId, bool zoomToDownloadButton); void OnLocationError(int/* == location::TLocationStatus*/ newStatus); void OnLocationUpdated(location::GpsInfo const & info);