Fix map marker name
This commit is contained in:
parent
c10cb196f3
commit
c9a0232ff1
3 changed files with 14 additions and 10 deletions
|
@ -50,6 +50,17 @@ public class MapMarkersHelper {
|
|||
getOnlyName());
|
||||
}
|
||||
|
||||
public String getName(Context ctx) {
|
||||
String name;
|
||||
PointDescription pd = getPointDescription(ctx);
|
||||
if (Algorithms.isEmpty(pd.getName())) {
|
||||
name = pd.getTypeName();
|
||||
} else {
|
||||
name = pd.getName();
|
||||
}
|
||||
return name;
|
||||
}
|
||||
|
||||
public PointDescription getOriginalPointDescription() {
|
||||
return pointDescription;
|
||||
}
|
||||
|
|
|
@ -531,14 +531,7 @@ public class MapMarkerDialogHelper {
|
|||
|
||||
waypointDeviation.setVisibility(View.GONE);
|
||||
|
||||
String descr;
|
||||
PointDescription pd = marker.getPointDescription(app);
|
||||
if (Algorithms.isEmpty(pd.getName())) {
|
||||
descr = pd.getTypeName();
|
||||
} else {
|
||||
descr = pd.getName();
|
||||
}
|
||||
|
||||
String descr = marker.getName(app);
|
||||
if (textShadow != null) {
|
||||
textShadow.setText(descr);
|
||||
}
|
||||
|
|
|
@ -799,13 +799,13 @@ public class MapRouteInfoMenu implements IRouteInformationListener {
|
|||
MapMarker m = markers.get(0);
|
||||
actions.add(new RouteSpinnerRow(SPINNER_MAP_MARKER_1_ID,
|
||||
MapMarkerDialogHelper.getMapMarkerIcon(mapActivity.getMyApplication(), m.colorIndex),
|
||||
m.getOnlyName()));
|
||||
m.getName(mapActivity)));
|
||||
}
|
||||
if (markers.size() > 1) {
|
||||
MapMarker m = markers.get(1);
|
||||
actions.add(new RouteSpinnerRow(SPINNER_MAP_MARKER_2_ID,
|
||||
MapMarkerDialogHelper.getMapMarkerIcon(mapActivity.getMyApplication(), m.colorIndex),
|
||||
m.getOnlyName()));
|
||||
m.getName(mapActivity)));
|
||||
}
|
||||
/*
|
||||
if (markers.size() > 2) {
|
||||
|
|
Loading…
Reference in a new issue