aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormax-klaus <53395422+max-klaus@users.noreply.github.com>2019-10-21 18:24:21 +0300
committerGitHub <noreply@github.com>2019-10-21 18:24:21 +0300
commitba24e53d8a28cc1c37099c317e847bffa790b3ed (patch)
treea59cd69e7ac80e7bd78e45189c50015932f0ab3d
parent518f0329a3c9fa55c4e69baf0a273907efe729c0 (diff)
parentbfa97040b01515e947a0614c67865aacee373517 (diff)
downloadOsmand-ba24e53d8a28cc1c37099c317e847bffa790b3ed.tar.gz
Merge pull request #7711 from osmandapp/Fix_7305
Fix #7305
-rw-r--r--OsmAnd/src/net/osmand/plus/views/POIMapLayer.java13
1 files changed, 9 insertions, 4 deletions
diff --git a/OsmAnd/src/net/osmand/plus/views/POIMapLayer.java b/OsmAnd/src/net/osmand/plus/views/POIMapLayer.java
index edc4d8c87f..9f874881b8 100644
--- a/OsmAnd/src/net/osmand/plus/views/POIMapLayer.java
+++ b/OsmAnd/src/net/osmand/plus/views/POIMapLayer.java
@@ -38,8 +38,8 @@ import net.osmand.plus.R;
import net.osmand.plus.activities.MapActivity;
import net.osmand.plus.poi.PoiUIFilter;
import net.osmand.plus.render.RenderingIcons;
-import net.osmand.plus.routing.RoutingHelper;
import net.osmand.plus.routing.IRouteInformationListener;
+import net.osmand.plus.routing.RoutingHelper;
import net.osmand.plus.views.MapTextLayer.MapTextProvider;
import net.osmand.util.Algorithms;
@@ -185,7 +185,6 @@ public class POIMapLayer extends OsmandMapLayer implements ContextMenuLayer.ICon
mapTextLayer = view.getLayerByClass(MapTextLayer.class);
}
-
public int getRadiusPoi(RotatedTileBox tb) {
int r;
final double zoom = tb.getZoom();
@@ -200,6 +199,7 @@ public class POIMapLayer extends OsmandMapLayer implements ContextMenuLayer.ICon
} else {
r = 18;
}
+
return (int) (r * view.getScaleCoefficient());
}
@@ -405,8 +405,13 @@ public class POIMapLayer extends OsmandMapLayer implements ContextMenuLayer.ICon
}
@Override
- public int getTextShift(Amenity o, RotatedTileBox rb) {
- return getRadiusPoi(rb);
+ public int getTextShift(Amenity amenity, RotatedTileBox rb) {
+ int radiusPoi = getRadiusPoi(rb);
+ if (isPresentInFullObjects(amenity.getLocation())) {
+ radiusPoi += poiBackground.getHeight() / 2 - poiBackgroundSmall.getHeight() / 2;
+ }
+
+ return radiusPoi;
}
@Override