refactored some code

This commit is contained in:
Chumva 2018-03-12 13:05:52 +02:00
parent 2838bb127b
commit dd868bda4c

View file

@ -578,8 +578,7 @@ public class MapMarkersLayer extends OsmandMapLayer implements IContextMenuProvi
if (o instanceof MapMarker) { if (o instanceof MapMarker) {
return ((MapMarker) o).point; return ((MapMarker) o).point;
} else if (o instanceof Amenity && amenities.contains(o)) { } else if (o instanceof Amenity && amenities.contains(o)) {
Amenity amenity = (Amenity) o; return ((Amenity) o).getLocation();
return amenity.getLocation();
} }
return null; return null;
} }