From 523e9c730712f742408b14aa1c9c543a84ed08e2 Mon Sep 17 00:00:00 2001 From: Dmitry Yunitsky Date: Thu, 31 Mar 2016 14:15:00 +0300 Subject: [PATCH] [android] MyPosition title. --- android/jni/com/mapswithme/maps/UserMarkHelper.cpp | 2 +- .../com/mapswithme/maps/widget/placepage/PlacePageView.java | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/android/jni/com/mapswithme/maps/UserMarkHelper.cpp b/android/jni/com/mapswithme/maps/UserMarkHelper.cpp index c429723d6e..63e617c6bb 100644 --- a/android/jni/com/mapswithme/maps/UserMarkHelper.cpp +++ b/android/jni/com/mapswithme/maps/UserMarkHelper.cpp @@ -68,7 +68,7 @@ jobject CreateMapObject(JNIEnv * env, place_page::Info const & info) // TODO(yunikkk): object can be POI + API + search result + bookmark simultaneously. // TODO(yunikkk): Should we pass localized strings here and in other methods as byte arrays? if (info.IsMyPosition()) - return CreateMapObject(env, kMyPosition, "", "", ll.lat, ll.lon, address.FormatAddress(), {}, ""); + return CreateMapObject(env, kMyPosition, info.GetTitle(), info.GetSubtitle(), ll.lat, ll.lon, address.FormatAddress(), {}, ""); if (info.HasApiUrl()) return CreateMapObject(env, kApiPoint, info.GetTitle(), info.GetSubtitle(), ll.lat, ll.lon, address.FormatAddress(), info.GetMetadata(), info.GetApiUrl()); diff --git a/android/src/com/mapswithme/maps/widget/placepage/PlacePageView.java b/android/src/com/mapswithme/maps/widget/placepage/PlacePageView.java index 02ae03cc60..aebd343d8d 100644 --- a/android/src/com/mapswithme/maps/widget/placepage/PlacePageView.java +++ b/android/src/com/mapswithme/maps/widget/placepage/PlacePageView.java @@ -442,7 +442,9 @@ public class PlacePageView extends RelativeLayout implements View.OnClickListene UiUtils.showIf(mMapObject != null && Editor.nativeIsFeatureEditable() && !RoutingController.get().isNavigating() && !MapManager.nativeIsLegacyMode(), mEditor); - UiUtils.showIf(!RoutingController.get().isNavigating() && !MapManager.nativeIsLegacyMode(), mReport); + UiUtils.showIf(!RoutingController.get().isNavigating() && !MapManager.nativeIsLegacyMode() && + !MapObject.isOfType(MapObject.MY_POSITION, mMapObject), + mReport); } private void refreshOpeningHours()