added check if selectedObj is amenity and get it`s location
This commit is contained in:
parent
2bf028a675
commit
b6cc4e4c14
1 changed files with 6 additions and 1 deletions
|
@ -654,7 +654,12 @@ public class ContextMenuLayer extends OsmandMapLayer {
|
|||
pointDescription = provider.getObjectName(selectedObj);
|
||||
}
|
||||
if (latLon == null) {
|
||||
latLon = getLatLon(point, tileBox);
|
||||
if (selectedObj instanceof Amenity) {
|
||||
Amenity a = ((Amenity) selectedObj);
|
||||
latLon = a.getLocation();
|
||||
} else {
|
||||
latLon = getLatLon(point, tileBox);
|
||||
}
|
||||
}
|
||||
if (mInAddGpxPointMode) {
|
||||
String title = pointDescription == null ? "" : pointDescription.getName();
|
||||
|
|
Loading…
Reference in a new issue