code cleaning

This commit is contained in:
Chumva 2019-05-29 19:10:51 +03:00
parent ddafc9b329
commit f41ccb8ff0
3 changed files with 1 additions and 21 deletions

View file

@ -166,10 +166,6 @@ public class AidlMapLayer extends OsmandMapLayer implements IContextMenuProvider
mapTextLayer.putData(this, displayedPoints); mapTextLayer.putData(this, displayedPoints);
} }
public String getLayerId() {
return aidlLayer.getId();
}
private void drawPoint(Canvas canvas, int x, int y, RotatedTileBox tb, AMapPoint point, Bitmap image, boolean selected) { private void drawPoint(Canvas canvas, int x, int y, RotatedTileBox tb, AMapPoint point, Bitmap image, boolean selected) {
if (image == null) { if (image == null) {
image = placeholder; image = placeholder;

View file

@ -209,12 +209,8 @@ public class ContextMenuLayer extends OsmandMapLayer {
x = r.getX(); x = r.getX();
y = r.getY(); y = r.getY();
} else if (selectedObject instanceof AMapPoint) { } else if (selectedObject instanceof AMapPoint) {
AMapPoint mapPoint = (AMapPoint) selectedObject;
AidlMapLayer aidlLayer = view.getAidlMapLayer(mapPoint.getLayerId());
if (aidlLayer != null) {
markerCustomized = true; markerCustomized = true;
} }
}
if (x != null && y != null && x.size() > 2) { if (x != null && y != null && x.size() > 2) {
double lat = MapUtils.get31LatitudeY(y.get(0)); double lat = MapUtils.get31LatitudeY(y.get(0));
double lon = MapUtils.get31LongitudeX(x.get(0)); double lon = MapUtils.get31LongitudeX(x.get(0));

View file

@ -311,18 +311,6 @@ public class OsmandMapTileView implements IMapDownloaderCallback {
return layers; return layers;
} }
public AidlMapLayer getAidlMapLayer(String layerId) {
for (OsmandMapLayer layer : layers) {
if (layer instanceof AidlMapLayer) {
AidlMapLayer aidlMapLayer = (AidlMapLayer) layer;
if (aidlMapLayer.getLayerId().equals(layerId)) {
return aidlMapLayer;
}
}
}
return null;
}
@SuppressWarnings("unchecked") @SuppressWarnings("unchecked")
public <T extends OsmandMapLayer> T getLayerByClass(Class<T> cl) { public <T extends OsmandMapLayer> T getLayerByClass(Class<T> cl) {
for (OsmandMapLayer lr : layers) { for (OsmandMapLayer lr : layers) {