From 8a8fcd8d58c260af50bfd3540d26e6d2c808a717 Mon Sep 17 00:00:00 2001 From: simon Date: Mon, 31 Aug 2020 15:26:28 +0300 Subject: [PATCH] cleanup --- OsmAnd/src/net/osmand/plus/server/ApiRouter.java | 8 +------- OsmAnd/src/net/osmand/plus/server/map/LayersDraw.java | 6 +++--- .../net/osmand/plus/server/map/OsmandMapTileMiniView.java | 4 ++-- 3 files changed, 6 insertions(+), 12 deletions(-) diff --git a/OsmAnd/src/net/osmand/plus/server/ApiRouter.java b/OsmAnd/src/net/osmand/plus/server/ApiRouter.java index bb36c3f215..3cbb192cb5 100644 --- a/OsmAnd/src/net/osmand/plus/server/ApiRouter.java +++ b/OsmAnd/src/net/osmand/plus/server/ApiRouter.java @@ -75,13 +75,6 @@ public class ApiRouter { //canvas.drawBitmap(bitmap ,0, 0, null); boolean nightMode = androidContext.getDaynightHelper().isNightMode(); OsmandMapMiniLayer.DrawSettings drawSettings = new OsmandMapMiniLayer.DrawSettings(nightMode, false); - tileView.refreshMapInternal(drawSettings); - tileView.refreshMap(); - MapTileMiniLayer mapTileLayer = new MapTileMiniLayer(true); - //mapView.addLayer(mapTileLayer, 0.0f); - //mapTileLayer.drawTileMap(canvas,tileView.getCurrentRotatedTileBox()); - tileView.drawOverMap(canvas,tileView.getCurrentRotatedTileBox(),drawSettings); - //androidContext.getApplicationContext().get ByteArrayOutputStream stream = new ByteArrayOutputStream(); //bitmap = tileView.currentCanvas; final QuadRect tilesRect = tileView.getCurrentRotatedTileBox().getTileBounds(); @@ -91,6 +84,7 @@ public class ApiRouter { int height = (int) Math.ceil(tilesRect.bottom - top); int dzoom = 1; int div = (int) Math.pow(2.0, dzoom); + tileView.drawOverMap(canvas,tileView.getCurrentRotatedTileBox(),drawSettings); ResourceManager mgr = androidContext.getResourceManager(); int tileX = (left ) / div; diff --git a/OsmAnd/src/net/osmand/plus/server/map/LayersDraw.java b/OsmAnd/src/net/osmand/plus/server/map/LayersDraw.java index 27787fb8ab..6b3e3e2e80 100644 --- a/OsmAnd/src/net/osmand/plus/server/map/LayersDraw.java +++ b/OsmAnd/src/net/osmand/plus/server/map/LayersDraw.java @@ -35,9 +35,9 @@ public class LayersDraw { // 0.5 layer MapVectorMiniLayer mapVectorLayer = new MapVectorMiniLayer(mapTileLayer, false); mapView.addLayer(mapVectorLayer, 0.5f); - mapVectorLayer.onPrepareBufferImage(canvas, - currentTileBlock, - new OsmandMapMiniLayer.DrawSettings(false)); +// mapVectorLayer.onPrepareBufferImage(canvas, +// currentTileBlock, +// new OsmandMapMiniLayer.DrawSettings(false)); //DownloadedRegionsLayer downloadedRegionsLayer = new DownloadedRegionsLayer(activity); //mapView.addLayer(downloadedRegionsLayer, 0.5f); diff --git a/OsmAnd/src/net/osmand/plus/server/map/OsmandMapTileMiniView.java b/OsmAnd/src/net/osmand/plus/server/map/OsmandMapTileMiniView.java index 785c2a9961..ed51b76e78 100644 --- a/OsmAnd/src/net/osmand/plus/server/map/OsmandMapTileMiniView.java +++ b/OsmAnd/src/net/osmand/plus/server/map/OsmandMapTileMiniView.java @@ -715,9 +715,9 @@ public class OsmandMapTileMiniView implements MapTileDownloader.IMapDownloaderCa if (!layer.drawInScreenPixels()) { canvas.rotate(tileBox.getRotate(), c.x, c.y); } - if (mapRenderer != null) { + //if (mapRenderer != null) { layer.onPrepareBufferImage(canvas, tileBox, drawSettings); - } + //} try{ layer.onDraw(canvas, tileBox, drawSettings); }