diff --git a/OsmAnd/res/layout/waypoint_reached.xml b/OsmAnd/res/layout/waypoint_reached.xml index c2dbf1dd65..e9b0e00af7 100644 --- a/OsmAnd/res/layout/waypoint_reached.xml +++ b/OsmAnd/res/layout/waypoint_reached.xml @@ -26,8 +26,10 @@ android:layout_width="0dp" android:layout_height="wrap_content" android:layout_marginLeft="4dp" - android:singleLine="true" + android:maxLines="2" android:ellipsize="end" + android:clickable="true" + android:focusable="true" android:layout_gravity="center_vertical" android:layout_weight="1" android:textSize="18sp"/> diff --git a/OsmAnd/res/values/strings.xml b/OsmAnd/res/values/strings.xml index 0ae2874f56..341357f091 100644 --- a/OsmAnd/res/values/strings.xml +++ b/OsmAnd/res/values/strings.xml @@ -9,6 +9,8 @@ 3. All your modified/created strings are in the top of the file (to make easier find what\'s translated). PLEASE: Have a look at http://code.google.com/p/osmand/wiki/UIConsistency, it may really improve your and our work :-) Thx - Hardy --> + Announce Favorites + Announce POI Download missing maps %1$s (%2$d MB)? More... Browse map diff --git a/OsmAnd/src/net/osmand/data/FavouritePoint.java b/OsmAnd/src/net/osmand/data/FavouritePoint.java index ed43492c4b..e0bd8a6148 100644 --- a/OsmAnd/src/net/osmand/data/FavouritePoint.java +++ b/OsmAnd/src/net/osmand/data/FavouritePoint.java @@ -2,6 +2,8 @@ package net.osmand.data; import java.io.Serializable; +import android.content.Context; + public class FavouritePoint implements Serializable, LocationPoint { private static final long serialVersionUID = 729654300829771466L; private String name; @@ -62,6 +64,10 @@ public class FavouritePoint implements Serializable, LocationPoint { this.category = category; } + public String getName(Context ctx) { + return name; + } + public String getName() { return name; } diff --git a/OsmAnd/src/net/osmand/data/LocationPoint.java b/OsmAnd/src/net/osmand/data/LocationPoint.java index 83ee235b40..1e76cb8db2 100644 --- a/OsmAnd/src/net/osmand/data/LocationPoint.java +++ b/OsmAnd/src/net/osmand/data/LocationPoint.java @@ -1,5 +1,6 @@ package net.osmand.data; -import net.osmand.plus.voice.CommandBuilder; + +import android.content.Context; /** */ @@ -9,7 +10,7 @@ public interface LocationPoint { public double getLongitude(); - public String getName(); + public String getName(Context ctx); public int getColor(); diff --git a/OsmAnd/src/net/osmand/plus/GPXUtilities.java b/OsmAnd/src/net/osmand/plus/GPXUtilities.java index 8bec263229..70eb6d8f5e 100644 --- a/OsmAnd/src/net/osmand/plus/GPXUtilities.java +++ b/OsmAnd/src/net/osmand/plus/GPXUtilities.java @@ -113,7 +113,7 @@ public class GPXUtilities { } @Override - public String getName() { + public String getName(Context ctx) { return name; } diff --git a/OsmAnd/src/net/osmand/plus/OsmandSettings.java b/OsmAnd/src/net/osmand/plus/OsmandSettings.java index 0fdf10bbca..1e8272d3aa 100644 --- a/OsmAnd/src/net/osmand/plus/OsmandSettings.java +++ b/OsmAnd/src/net/osmand/plus/OsmandSettings.java @@ -819,8 +819,8 @@ public class OsmandSettings { public final OsmandPreference GPX_ROUTE_CALC = new BooleanPreference("calc_gpx_route", false).makeGlobal().cache(); public final OsmandPreference GPX_SPEAK_WPT = new BooleanPreference("speak_gpx_wpt", true).makeGlobal().cache(); - public final OsmandPreference ANNOUNCE_NEARBY_FAVORITES = new BooleanPreference("announce_nearby_favorites", true).makeGlobal().cache(); - public final OsmandPreference ANNOUNCE_NEARBY_POI = new BooleanPreference("announce_nearby_poi", true).makeGlobal().cache(); + public final OsmandPreference ANNOUNCE_NEARBY_FAVORITES = new BooleanPreference("announce_nearby_favorites", true).makeProfile().cache(); + public final OsmandPreference ANNOUNCE_NEARBY_POI = new BooleanPreference("announce_nearby_poi", true).makeProfile().cache(); public final OsmandPreference SHOW_NEARBY_POI = new BooleanPreference("show_nearby_poi", true).makeGlobal().cache(); public final OsmandPreference SHOW_NEARBY_FAVORIES = new BooleanPreference("show_nearby_favorites", true).makeGlobal().cache(); diff --git a/OsmAnd/src/net/osmand/plus/TargetPointsHelper.java b/OsmAnd/src/net/osmand/plus/TargetPointsHelper.java index d21d2f2acb..4695406e8f 100644 --- a/OsmAnd/src/net/osmand/plus/TargetPointsHelper.java +++ b/OsmAnd/src/net/osmand/plus/TargetPointsHelper.java @@ -9,6 +9,7 @@ import android.content.Context; import net.osmand.Location; import net.osmand.StateChangedListener; import net.osmand.data.LatLon; +import net.osmand.data.LocationPoint; import net.osmand.plus.routing.RouteProvider.RouteService; import net.osmand.plus.routing.RoutingHelper; import net.osmand.util.MapUtils; @@ -23,7 +24,7 @@ public class TargetPointsHelper { private List> listeners = new ArrayList>(); private OsmandApplication ctx; - public static class TargetPoint { + public static class TargetPoint implements LocationPoint { public LatLon point; public String name; public int index; @@ -48,11 +49,18 @@ public class TargetPointsHelper { return null; } + private String vName() { + if(name.trim().length()==0) { + return ""; + } + return ": " + name; + } + public String getVisibleName(Context ctx) { if (!intermediate) { - return ctx.getString(R.string.destination_point, "") + " : " + name; + return ctx.getString(R.string.destination_point, "") + vName(); } else { - return (index + 1) + ". " + ctx.getString(R.string.intermediate_point, "") + " : " + name; + return (index + 1) + ". " + ctx.getString(R.string.intermediate_point, "") + vName(); } } @@ -63,6 +71,21 @@ public class TargetPointsHelper { public double getLongitude() { return point.getLongitude(); } + + @Override + public String getName(Context ctx) { + return getVisibleName(ctx); + } + + @Override + public int getColor() { + return 0; + } + + @Override + public boolean isVisible() { + return false; + } } diff --git a/OsmAnd/src/net/osmand/plus/activities/MapActivityActions.java b/OsmAnd/src/net/osmand/plus/activities/MapActivityActions.java index a2b17efb24..a2d16692d5 100644 --- a/OsmAnd/src/net/osmand/plus/activities/MapActivityActions.java +++ b/OsmAnd/src/net/osmand/plus/activities/MapActivityActions.java @@ -834,9 +834,12 @@ public class MapActivityActions implements DialogProvider { .listen(new OnContextMenuClick() { @Override public void onContextMenuClick(int itemId, int pos, boolean isChecked, DialogInterface dialog) { - WaypointDialogHelper.showWaypointsDialog(getMyApplication(), mapActivity, - getMyApplication().getWaypointHelper().getAllPoints()); -// openIntermediatePointsDialog(); + if (getMyApplication().getWaypointHelper().isRouteCalculated()) { + WaypointDialogHelper.showWaypointsDialog(getMyApplication(), mapActivity, + getMyApplication().getWaypointHelper().getAllPoints()); + } else { + openIntermediatePointsDialog(); + } } }).reg(); } diff --git a/OsmAnd/src/net/osmand/plus/activities/SettingsNavigationActivity.java b/OsmAnd/src/net/osmand/plus/activities/SettingsNavigationActivity.java index d31cf2f102..0215f66da8 100644 --- a/OsmAnd/src/net/osmand/plus/activities/SettingsNavigationActivity.java +++ b/OsmAnd/src/net/osmand/plus/activities/SettingsNavigationActivity.java @@ -238,8 +238,12 @@ public class SettingsNavigationActivity extends SettingsBaseActivity { return true; } else if (preference == speakAlarms) { showBooleanSettings(new String[] { getString(R.string.speak_street_names), getString(R.string.speak_traffic_warnings), getString(R.string.speak_cameras), - getString(R.string.speak_speed_limit) }, new OsmandPreference[] { settings.SPEAK_STREET_NAMES, settings.SPEAK_TRAFFIC_WARNINGS, - settings.SPEAK_SPEED_CAMERA , settings.SPEAK_SPEED_LIMIT}); + getString(R.string.speak_speed_limit), + getString(R.string.speak_favorites), + getString(R.string.speak_poi)}, + new OsmandPreference[] { settings.SPEAK_STREET_NAMES, settings.SPEAK_TRAFFIC_WARNINGS, + settings.SPEAK_SPEED_CAMERA , settings.SPEAK_SPEED_LIMIT, + settings.ANNOUNCE_NEARBY_FAVORITES, settings.ANNOUNCE_NEARBY_POI}); return true; } return false; diff --git a/OsmAnd/src/net/osmand/plus/helpers/WaypointDialogHelper.java b/OsmAnd/src/net/osmand/plus/helpers/WaypointDialogHelper.java index 2353cb925a..8ee7a952d8 100644 --- a/OsmAnd/src/net/osmand/plus/helpers/WaypointDialogHelper.java +++ b/OsmAnd/src/net/osmand/plus/helpers/WaypointDialogHelper.java @@ -4,6 +4,7 @@ import java.util.ArrayList; import java.util.List; import net.osmand.Location; +import net.osmand.data.LatLon; import net.osmand.data.LocationPoint; import net.osmand.plus.OsmAndFormatter; import net.osmand.plus.OsmAndLocationProvider.OsmAndLocationListener; @@ -13,6 +14,7 @@ import net.osmand.plus.activities.MapActivity; import net.osmand.plus.helpers.WaypointHelper.LocationPointWrapper; import net.osmand.plus.views.AnimateDraggingMapThread; import net.osmand.plus.views.MapControlsLayer; +import net.osmand.util.MapUtils; import android.app.Activity; import android.app.AlertDialog; import android.content.Context; @@ -83,7 +85,7 @@ public class WaypointDialogHelper implements OsmAndLocationListener { } updatePointInfoView(app, mapActivity, closePointDialog, point); View all = closePointDialog.findViewById(R.id.all_points); - all.setVisibility(many.size() <= 1 ? View.GONE : View.VISIBLE); + all.setVisibility(/*many.size() <= 1 ? View.GONE : */View.VISIBLE); if (created) { closePointDialog.setBackgroundColor(mapActivity.getResources().getColor(R.color.color_black)); ((TextView) closePointDialog.findViewById(R.id.waypoint_text)).setTextColor(Color.WHITE); @@ -94,18 +96,18 @@ public class WaypointDialogHelper implements OsmAndLocationListener { } }); - View btnN = closePointDialog.findViewById(R.id.info_close); - btnN.setOnClickListener(new View.OnClickListener() { - @Override - public void onClick(View view) { - waypointHelper.removeVisibleLocationPoint(point); - updateDialog(); - } - }); mainLayout.addView(closePointDialog, getDialogLayoutParams()); waitBeforeLayoutIsResized(closePointDialog); } + View btnN = closePointDialog.findViewById(R.id.info_close); + btnN.setOnClickListener(new View.OnClickListener() { + @Override + public void onClick(View view) { + waypointHelper.removeVisibleLocationPoint(point); + updateDialog(); + } + }); } } @@ -124,17 +126,14 @@ public class WaypointDialogHelper implements OsmAndLocationListener { }); TextView textDist = (TextView) localView.findViewById(R.id.waypoint_dist); ((ImageView) localView.findViewById(R.id.waypoint_icon)).setImageDrawable(ps.getDrawable(ctx)); - Location lastKnownMapLocation = app.getLocationProvider().getLastKnownLocation(); - String dd = ""; - if (lastKnownMapLocation != null) { - int dist = wh.getRouteDistance(ps); - dd = OsmAndFormatter.getFormattedDistance(dist, app) ; - if(ps.deviationDistance > 0 ) { - dd += "\n "+OsmAndFormatter.getFormattedDistance(ps.deviationDistance, app); - } +// Location lastKnownMapLocation = app.getLocationProvider().getLastKnownLocation(); + int dist = wh.getRouteDistance(ps); + String dd = OsmAndFormatter.getFormattedDistance(dist, app); + if (ps.deviationDistance > 0) { + dd += "\n " + OsmAndFormatter.getFormattedDistance(ps.deviationDistance, app); } textDist.setText(dd); - text.setText(point.getName()); + text.setText(point.getName(app)); // ((Spannable) text.getText()).setSpan( // new ForegroundColorSpan(ctx.getResources().getColor(R.color.color_distance)), 0, distance.length() - 1, // 0); @@ -211,6 +210,7 @@ public class WaypointDialogHelper implements OsmAndLocationListener { public void onClick(View view) { LocationPointWrapper point = visibleLocationPoints.get(position); remove(point); + deletedPoints.add(point); notifyDataSetChanged(); } }); @@ -244,9 +244,20 @@ public class WaypointDialogHelper implements OsmAndLocationListener { private static void showOnMap(OsmandApplication app, MapActivity ctx, LocationPoint locationPoint) { AnimateDraggingMapThread thread = ctx.getMapView().getAnimatedDraggingThread(); int fZoom = ctx.getMapView().getZoom() < 15 ? 15 : ctx.getMapView().getZoom(); - thread.startMoving(locationPoint.getLatitude(), locationPoint.getLongitude(), fZoom, true); -// ctx.getMapView().setIntZoom(fZoom); -// ctx.getMapView().setLatLon(point.getLatitude(), point.getLongitude()); + if (thread.isAnimating()) { + ctx.getMapView().setIntZoom(fZoom); + ctx.getMapView().setLatLon(locationPoint.getLatitude(), locationPoint.getLongitude()); + } else if (MapUtils.getDistance(ctx.getMapView().getLatitude(), ctx.getMapView().getLongitude(), + locationPoint.getLatitude(), locationPoint.getLongitude()) < 10) { + ctx.getMapLayers().getContextMenuLayer().setSelectedObject(locationPoint); + ctx.getMapLayers() + .getContextMenuLayer() + .setLocation(new LatLon(locationPoint.getLatitude(), locationPoint.getLongitude()), + locationPoint.getName(ctx)); + + } else { + thread.startMoving(locationPoint.getLatitude(), locationPoint.getLongitude(), fZoom, true); + } } diff --git a/OsmAnd/src/net/osmand/plus/helpers/WaypointHelper.java b/OsmAnd/src/net/osmand/plus/helpers/WaypointHelper.java index e7bf481a9d..531a916068 100644 --- a/OsmAnd/src/net/osmand/plus/helpers/WaypointHelper.java +++ b/OsmAnd/src/net/osmand/plus/helpers/WaypointHelper.java @@ -21,6 +21,7 @@ import net.osmand.data.LocationPoint; import net.osmand.osm.MapRenderingTypes; import net.osmand.plus.OsmAndFormatter; import net.osmand.plus.OsmandApplication; +import net.osmand.plus.R; import net.osmand.plus.OsmandSettings.MetricsConstants; import net.osmand.plus.PoiFilter; import net.osmand.plus.TargetPointsHelper.TargetPoint; @@ -240,7 +241,6 @@ public class WaypointHelper { Location lastKnownLocation = app.getRoutingHelper().getLastProjection(); if (lastKnownLocation != null && app.getRoutingHelper().isFollowingMode()) { for (int type = 0; type < locationPoints.size(); type++) { - String nameToAnnounce = null; int currentRoute = route.getCurrentRoute(); List approachPoints = new ArrayList(); List announcePoints = new ArrayList(); @@ -260,10 +260,10 @@ public class WaypointHelper { double d1 = MapUtils.getDistance(lastKnownLocation.getLatitude(), lastKnownLocation.getLongitude(), point.getLatitude(), point.getLongitude()); Integer state = locationPointsStates.get(point); + System.out.println("!!! " + d1 + " " + point.getName(app)); if (state != null && state.intValue() == ANNOUNCED_ONCE && getVoiceRouter() .isDistanceLess(lastKnownLocation.getSpeed(), d1, SHORT_ANNOUNCE_RADIUS)) { - nameToAnnounce = (nameToAnnounce == null ? "" : ", ") + point.getName(); locationPointsStates.remove(point); announcePoints.add(point); } else if ((state == null || state == NOT_ANNOUNCED) @@ -312,6 +312,10 @@ public class WaypointHelper { return app.getRoutingHelper().getVoiceRouter(); } + public boolean isRouteCalculated() { + return route != null && !route.isEmpty(); + } + public List getAllPoints() { List points = new ArrayList(); List> local = locationPoints; @@ -323,10 +327,16 @@ public class WaypointHelper { } } List wts = app.getTargetPointsHelper().getIntermediatePointsWithTarget(); - for(int k = 0; k < wts.size() ; k++) { - TargetPoint tp = wts.get(wts.size() - k - 1); - int routeIndex = k == 0 ? Integer.MAX_VALUE : route.getIndexOfIntermediate(k); - points.add(new LocationPointWrapper(route, TARGETS, new TargetPointHelper(tp), 0, routeIndex)); + for (int k = 0; k < wts.size(); k++) { + final int index = wts.size() - k - 1; + TargetPoint tp = wts.get(index); + int routeIndex ; + if(route == null) { + routeIndex = k == 0 ? Integer.MAX_VALUE : index; + } else { + routeIndex = k == 0 ? route.getImmutableAllLocations().size() - 1 : route.getIndexOfIntermediate(k - 1); + } + points.add(new LocationPointWrapper(route, TARGETS, tp, 0, routeIndex)); } sortList(points); return points; @@ -396,7 +406,10 @@ public class WaypointHelper { public int compare(LocationPointWrapper olhs, LocationPointWrapper orhs) { int lhs = olhs.routeIndex; int rhs = orhs.routeIndex; - return lhs < rhs ? -1 : (lhs == rhs ? 0 : 1); + if(lhs == rhs) { + return Float.compare(olhs.deviationDistance, orhs.deviationDistance); + } + return lhs < rhs ? -1 : 1; } }); } @@ -555,7 +568,10 @@ public class WaypointHelper { return uiCtx.getResources().getDrawable(RenderingIcons.getBigIconResourceId(value.toString())); } return null; -// } else if(type == TARGETS) { + } else if(type == TARGETS) { + return uiCtx.getResources().getDrawable( + !((TargetPoint)point).intermediate? R.drawable.list_destination: + R.drawable.list_intermediate); } else { return FavoriteImageDrawable.getOrCreate(uiCtx, point.getColor()); } @@ -603,8 +619,8 @@ public class WaypointHelper { } @Override - public String getName() { - return OsmAndFormatter.getPoiSimpleFormat(a, app, app.getSettings().usingEnglishNames()); + public String getName(Context ctx) { + return OsmAndFormatter.getPoiSimpleFormat(a, ctx, app.getSettings().usingEnglishNames()); } @Override @@ -618,41 +634,9 @@ public class WaypointHelper { } } + + - private class TargetPointHelper implements LocationPoint { - - private TargetPoint a; - - public TargetPointHelper(TargetPoint a) { - this.a = a; - } - - @Override - public double getLatitude() { - return a.point.getLatitude(); - } - - @Override - public double getLongitude() { - return a.point.getLongitude(); - } - - @Override - public String getName() { - return a.getVisibleName(app); - } - - @Override - public int getColor() { - return 0; - } - - @Override - public boolean isVisible() { - return false; - } - - } } diff --git a/OsmAnd/src/net/osmand/plus/routing/AlarmInfo.java b/OsmAnd/src/net/osmand/plus/routing/AlarmInfo.java index 9f9137496c..f998c0b6da 100644 --- a/OsmAnd/src/net/osmand/plus/routing/AlarmInfo.java +++ b/OsmAnd/src/net/osmand/plus/routing/AlarmInfo.java @@ -1,5 +1,6 @@ package net.osmand.plus.routing; +import android.content.Context; import net.osmand.Location; import net.osmand.binary.BinaryMapRouteReaderAdapter.RouteTypeRule; import net.osmand.data.LocationPoint; @@ -118,7 +119,7 @@ public class AlarmInfo implements LocationPoint { } @Override - public String getName() { + public String getName(Context ctx) { return type.name(); } diff --git a/OsmAnd/src/net/osmand/plus/routing/RouteCalculationResult.java b/OsmAnd/src/net/osmand/plus/routing/RouteCalculationResult.java index 1eadfeebc1..c93e3e8e76 100644 --- a/OsmAnd/src/net/osmand/plus/routing/RouteCalculationResult.java +++ b/OsmAnd/src/net/osmand/plus/routing/RouteCalculationResult.java @@ -870,7 +870,7 @@ public class RouteCalculationResult { public int getIndexOfIntermediate(int countFromLast) { final int j = intermediatePoints.length - countFromLast - 1; - if(j < intermediatePoints.length) { + if(j < intermediatePoints.length && j >= 0) { int i = intermediatePoints[j]; return directions.get(i).routePointOffset; } diff --git a/OsmAnd/src/net/osmand/plus/routing/RoutingHelper.java b/OsmAnd/src/net/osmand/plus/routing/RoutingHelper.java index 3c7cd38626..9cab25a3ce 100644 --- a/OsmAnd/src/net/osmand/plus/routing/RoutingHelper.java +++ b/OsmAnd/src/net/osmand/plus/routing/RoutingHelper.java @@ -94,6 +94,10 @@ public class RoutingHelper { return isFollowingMode; } + public OsmandApplication getApplication() { + return app; + } + public void setPauseNaviation(boolean b) { this.isPauseNavigation = b; } @@ -135,6 +139,7 @@ public class RoutingHelper { route = new RouteCalculationResult(""); isDeviatedFromRoute = false; evalWaitInterval = 3000; + app.getWaypointHelper().setNewRoute(route); app.runInUIThread(new Runnable() { @Override public void run() { diff --git a/OsmAnd/src/net/osmand/plus/routing/VoiceRouter.java b/OsmAnd/src/net/osmand/plus/routing/VoiceRouter.java index 239e7875de..1012b7c0a2 100644 --- a/OsmAnd/src/net/osmand/plus/routing/VoiceRouter.java +++ b/OsmAnd/src/net/osmand/plus/routing/VoiceRouter.java @@ -288,7 +288,7 @@ public class VoiceRouter { } else { text += ", "; } - text += point.getName(); + text += point.getName(router.getApplication()); } return text; } diff --git a/OsmAnd/src/net/osmand/plus/sherpafy/TourInformation.java b/OsmAnd/src/net/osmand/plus/sherpafy/TourInformation.java index 93532143ed..c72ffc8198 100644 --- a/OsmAnd/src/net/osmand/plus/sherpafy/TourInformation.java +++ b/OsmAnd/src/net/osmand/plus/sherpafy/TourInformation.java @@ -20,6 +20,7 @@ import net.osmand.util.Algorithms; import org.xmlpull.v1.XmlPullParser; import org.xmlpull.v1.XmlPullParserException; +import android.content.Context; import android.graphics.Bitmap; import android.graphics.BitmapFactory; import android.graphics.BitmapFactory.Options; @@ -300,6 +301,10 @@ public class TourInformation { return location.getLongitude(); } + public String getName(Context ctx) { + return name; + } + public String getName() { return name; } diff --git a/OsmAnd/src/net/osmand/plus/views/FavoritesLayer.java b/OsmAnd/src/net/osmand/plus/views/FavoritesLayer.java index 2b56428fcd..5044449f5a 100644 --- a/OsmAnd/src/net/osmand/plus/views/FavoritesLayer.java +++ b/OsmAnd/src/net/osmand/plus/views/FavoritesLayer.java @@ -151,7 +151,7 @@ public class FavoritesLayer extends OsmandMapLayer implements ContextMenuLayer. if (i++ > 0) { res.append("\n\n"); } - res.append(getObjName() + " : " + fav.getName()); //$NON-NLS-1$ + res.append(getObjName() + " : " + fav.getName(view.getContext())); //$NON-NLS-1$ } AccessibleToast.makeText(view.getContext(), res.toString(), Toast.LENGTH_LONG).show(); return true; @@ -164,7 +164,7 @@ public class FavoritesLayer extends OsmandMapLayer implements ContextMenuLayer. public String getObjectDescription(Object o) { Class fcl = getFavoriteClass(); if(o!= null && fcl.isInstance(o)) { - return getObjName() + " : " + ((LocationPoint)o).getName(); //$NON-NLS-1$ + return getObjName() + " : " + ((LocationPoint)o).getName(view.getContext()); //$NON-NLS-1$ } return null; } @@ -174,7 +174,7 @@ public class FavoritesLayer extends OsmandMapLayer implements ContextMenuLayer. @Override public String getObjectName(Object o) { if(o instanceof LocationPoint){ - return ((LocationPoint)o).getName(); //$NON-NLS-1$ + return ((LocationPoint)o).getName(view.getContext()); //$NON-NLS-1$ } return null; } @@ -233,7 +233,7 @@ public class FavoritesLayer extends OsmandMapLayer implements ContextMenuLayer. @Override public String getText(LocationPoint o) { - return o.getName(); + return o.getName(view.getContext()); }