Fix show personal parking point as Parking point
This commit is contained in:
parent
e5ee6bde78
commit
c3637d72ca
3 changed files with 15 additions and 3 deletions
|
@ -704,8 +704,14 @@ public class FavoritesTreeFragment extends OsmandExpandableListFragment implemen
|
|||
selectedGroupPos = groupPos;
|
||||
selectedChildPos = childPos;
|
||||
LatLon location = new LatLon(point.getLatitude(), point.getLongitude());
|
||||
String pointType;
|
||||
if (point.isPersonal() && point.getName().equals(FavouritePoint.PointType.PARKING.getName())) {
|
||||
pointType = PointDescription.POINT_TYPE_PARKING_MARKER;
|
||||
} else {
|
||||
pointType = PointDescription.POINT_TYPE_FAVORITE;
|
||||
}
|
||||
FavoritesActivity.showOnMap(requireActivity(), this, location.getLatitude(), location.getLongitude(),
|
||||
settings.getLastKnownMapZoom(), new PointDescription(PointDescription.POINT_TYPE_FAVORITE, point.getName(app)), true, point);
|
||||
settings.getLastKnownMapZoom(), new PointDescription(pointType, point.getName(app)), true, point);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -184,7 +184,11 @@ public abstract class MenuController extends BaseMenuController implements Colla
|
|||
if (object instanceof Amenity) {
|
||||
menuController = new AmenityMenuController(mapActivity, pointDescription, (Amenity) object);
|
||||
} else if (object instanceof FavouritePoint) {
|
||||
menuController = new FavouritePointMenuController(mapActivity, pointDescription, (FavouritePoint) object);
|
||||
if (pointDescription.isParking()) {
|
||||
menuController = new ParkingPositionMenuController(mapActivity, pointDescription);
|
||||
} else {
|
||||
menuController = new FavouritePointMenuController(mapActivity, pointDescription, (FavouritePoint) object);
|
||||
}
|
||||
} else if (object instanceof SearchHistoryHelper.HistoryEntry) {
|
||||
menuController = new HistoryMenuController(mapActivity, pointDescription, (SearchHistoryHelper.HistoryEntry) object);
|
||||
} else if (object instanceof TargetPoint) {
|
||||
|
|
|
@ -204,7 +204,9 @@ public class FavouritesLayer extends OsmandMapLayer implements ContextMenuLayer.
|
|||
int x = (int) tb.getPixXFromLatLon(n.getLatitude(), n.getLongitude());
|
||||
int y = (int) tb.getPixYFromLatLon(n.getLatitude(), n.getLongitude());
|
||||
if (calculateBelongs(ex, ey, x, y, r)) {
|
||||
res.add(n);
|
||||
if (!n.getName().equals(FavouritePoint.PointType.PARKING.getName())) {
|
||||
res.add(n);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue