add name display for waypoint markers

This commit is contained in:
sonora 2013-06-11 21:17:38 +02:00
parent 2c3d2e8b9e
commit eb14744b83

View file

@ -158,6 +158,7 @@ public class PointNavigationLayer extends OsmandMapLayer implements IContextMenu
public void collectObjectsFromPoint(PointF point, List<Object> o) { public void collectObjectsFromPoint(PointF point, List<Object> o) {
TargetPointsHelper tg = map.getMyApplication().getTargetPointsHelper(); TargetPointsHelper tg = map.getMyApplication().getTargetPointsHelper();
List<LatLon> intermediatePoints = tg.getIntermediatePointsWithTarget(); List<LatLon> intermediatePoints = tg.getIntermediatePointsWithTarget();
List<String> names = tg.getIntermediatePointNamesWithTarget();
int r = getRadiusPoi(view.getZoom()); int r = getRadiusPoi(view.getZoom());
for (int i = 0; i < intermediatePoints.size(); i++) { for (int i = 0; i < intermediatePoints.size(); i++) {
LatLon latLon = intermediatePoints.get(i); LatLon latLon = intermediatePoints.get(i);
@ -172,9 +173,9 @@ public class PointNavigationLayer extends OsmandMapLayer implements IContextMenu
tp.location = latLon; tp.location = latLon;
tp.intermediate = !target; tp.intermediate = !target;
if (target) { if (target) {
tp.name = view.getContext().getString(R.string.destination_point, ""); tp.name = view.getContext().getString(R.string.destination_point, "") + " : " + names.get(i);
} else { } else {
tp.name = (i + 1) + ". " + view.getContext().getString(R.string.intermediate_point, ""); tp.name = (i + 1) + ". " + view.getContext().getString(R.string.intermediate_point, "") + " : " + names.get(i);
} }
tp.index = i; tp.index = i;
o.add(tp); o.add(tp);