remove unnecessary changes

This commit is contained in:
Chumva 2019-10-21 12:45:10 +03:00
parent ed698a6b3f
commit bfa97040b0

View file

@ -149,7 +149,7 @@ public class POIMapLayer extends OsmandMapLayer implements ContextMenuLayer.ICon
if (objects != null) { if (objects != null) {
int ex = (int) point.x; int ex = (int) point.x;
int ey = (int) point.y; int ey = (int) point.y;
final int rp = getRadiusPoi(null, tb); final int rp = getRadiusPoi(tb);
int compare = rp; int compare = rp;
int radius = rp * 3 / 2; int radius = rp * 3 / 2;
try { try {
@ -185,7 +185,7 @@ public class POIMapLayer extends OsmandMapLayer implements ContextMenuLayer.ICon
mapTextLayer = view.getLayerByClass(MapTextLayer.class); mapTextLayer = view.getLayerByClass(MapTextLayer.class);
} }
public int getRadiusPoi(Amenity amenity, RotatedTileBox tb) { public int getRadiusPoi(RotatedTileBox tb) {
int r; int r;
final double zoom = tb.getZoom(); final double zoom = tb.getZoom();
if (zoom < startZoom) { if (zoom < startZoom) {
@ -200,11 +200,7 @@ public class POIMapLayer extends OsmandMapLayer implements ContextMenuLayer.ICon
r = 18; r = 18;
} }
int radiusPoi = (int) (r * view.getScaleCoefficient()); return (int) (r * view.getScaleCoefficient());
if (amenity != null && isPresentInFullObjects(amenity.getLocation())) {
radiusPoi += poiBackground.getHeight() / 2 - poiBackgroundSmall.getHeight() / 2;
}
return radiusPoi;
} }
@Override @Override
@ -409,8 +405,13 @@ public class POIMapLayer extends OsmandMapLayer implements ContextMenuLayer.ICon
} }
@Override @Override
public int getTextShift(Amenity o, RotatedTileBox rb) { public int getTextShift(Amenity amenity, RotatedTileBox rb) {
return getRadiusPoi(o, rb); int radiusPoi = getRadiusPoi(rb);
if (isPresentInFullObjects(amenity.getLocation())) {
radiusPoi += poiBackground.getHeight() / 2 - poiBackgroundSmall.getHeight() / 2;
}
return radiusPoi;
} }
@Override @Override