From aaea2442792f46fb4e53d7d90d335d1596b57c4c Mon Sep 17 00:00:00 2001 From: vshcherb Date: Mon, 23 Mar 2020 17:59:06 +0100 Subject: [PATCH] Update TerrainLayer.java --- OsmAnd/src/net/osmand/plus/srtmplugin/TerrainLayer.java | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/OsmAnd/src/net/osmand/plus/srtmplugin/TerrainLayer.java b/OsmAnd/src/net/osmand/plus/srtmplugin/TerrainLayer.java index 32325adf50..9db62e83a0 100644 --- a/OsmAnd/src/net/osmand/plus/srtmplugin/TerrainLayer.java +++ b/OsmAnd/src/net/osmand/plus/srtmplugin/TerrainLayer.java @@ -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) {