From 8d7d5ce460b9e9999c5451d9d26c5ea0b4990fee Mon Sep 17 00:00:00 2001 From: Victor Shcherb Date: Fri, 7 Apr 2017 10:41:22 +0200 Subject: [PATCH] Single point objects --- OsmAnd/src/net/osmand/plus/views/ContextMenuLayer.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/OsmAnd/src/net/osmand/plus/views/ContextMenuLayer.java b/OsmAnd/src/net/osmand/plus/views/ContextMenuLayer.java index f01120fc96..0a2715c609 100644 --- a/OsmAnd/src/net/osmand/plus/views/ContextMenuLayer.java +++ b/OsmAnd/src/net/osmand/plus/views/ContextMenuLayer.java @@ -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); }