Single point objects

This commit is contained in:
Victor Shcherb 2017-04-07 10:41:22 +02:00
parent fa40a3ad21
commit 8d7d5ce460

View file

@ -459,12 +459,12 @@ public class ContextMenuLayer extends OsmandMapLayer {
}
IContextMenuProvider poiMenuProvider = activity.getMapLayers().getPoiMapLayer();
for (RenderedObject renderedObject : renderedObjects) {
if(renderedObject.getLabelLatLon() != null) {
customLatLon = renderedObject.getLabelLatLon();
} else if (renderedObject.getX() != null && renderedObject.getX().size() == 1
if (renderedObject.getX() != null && renderedObject.getX().size() == 1
&& renderedObject.getY() != null && renderedObject.getY().size() == 1) {
customLatLon = new LatLon(MapUtils.get31LatitudeY(renderedObject.getY().get(0)),
MapUtils.get31LongitudeX(renderedObject.getX().get(0)));
} else if(renderedObject.getLabelLatLon() != null) {
customLatLon = renderedObject.getLabelLatLon();
} else {
customLatLon = tileBox.getLatLonFromPixel(point.x, point.y);
}