Update TerrainLayer.java

This commit is contained in:
vshcherb 2020-03-23 17:59:06 +01:00 committed by GitHub
parent 259a6169f2
commit aaea244279
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -61,10 +61,15 @@ public class TerrainLayer extends MapTileLayer {
int zoom = tileBox.getZoom();
if (zoom >= srtmPlugin.getTerrainMinZoom() && zoom <= srtmPlugin.getTerrainMaxZoom()) {
setAlpha(srtmPlugin.getTerrainTransparency());
super.onPrepareBufferImage(canvas, tileBox, drawSettings);
} else if(zoom > srtmPlugin.getTerrainMaxZoom()) {
// backward compatibility 100 -> 20 with overscale
setAlpha(srtmPlugin.getTerrainTransparency() / 5);
super.onPrepareBufferImage(canvas, tileBox, drawSettings);
} else {
setAlpha(0);
// ignore
}
super.onPrepareBufferImage(canvas, tileBox, drawSettings);
}
private void indexTerrainFiles(final OsmandApplication app) {