From 31a3ec3b05829a5fa450012898c2d607fa52b7cd Mon Sep 17 00:00:00 2001 From: Victor Shcherb Date: Fri, 11 Sep 2020 11:08:23 +0200 Subject: [PATCH] Fix viewport change --- OsmAnd/src/net/osmand/plus/render/MapVectorLayer.java | 3 ++- OsmAnd/src/net/osmand/plus/server/OsmAndHttpServer.java | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/OsmAnd/src/net/osmand/plus/render/MapVectorLayer.java b/OsmAnd/src/net/osmand/plus/render/MapVectorLayer.java index f3643b2617..86dfd6a301 100644 --- a/OsmAnd/src/net/osmand/plus/render/MapVectorLayer.java +++ b/OsmAnd/src/net/osmand/plus/render/MapVectorLayer.java @@ -156,7 +156,8 @@ public class MapVectorLayer extends BaseMapLayer { mapRenderer.setVisualZoomShift(zoomMagnifier - 1.0f); } else { if (!view.isZooming()) { - if (resourceManager.updateRenderedMapNeeded(tilesRect, drawSettings)) { + if (resourceManager.updateRenderedMapNeeded(tilesRect, drawSettings) && + !view.isScreenViewDetached()) { // pixRect.set(-view.getWidth(), -view.getHeight() / 2, 2 * view.getWidth(), 3 * // view.getHeight() / 2); final RotatedTileBox copy = tilesRect.copy(); diff --git a/OsmAnd/src/net/osmand/plus/server/OsmAndHttpServer.java b/OsmAnd/src/net/osmand/plus/server/OsmAndHttpServer.java index aa67eeeae2..a8524bd840 100644 --- a/OsmAnd/src/net/osmand/plus/server/OsmAndHttpServer.java +++ b/OsmAnd/src/net/osmand/plus/server/OsmAndHttpServer.java @@ -108,7 +108,7 @@ public class OsmAndHttpServer extends NanoHTTPD { } private void registerEndpoints() { - register("/tile", new TileEndpoint(mapActivity)); + register("/tile", new TileEndpoint(this)); } private void register(String path, ApiEndpoint endpoint) {