From 2851fd38cd45e5ee3421089e8ec0803272754c31 Mon Sep 17 00:00:00 2001 From: simon Date: Tue, 8 Sep 2020 16:23:43 +0300 Subject: [PATCH] map syncronization fixed --- OsmAnd/src/net/osmand/plus/server/endpoints/TileEndpoint.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/OsmAnd/src/net/osmand/plus/server/endpoints/TileEndpoint.java b/OsmAnd/src/net/osmand/plus/server/endpoints/TileEndpoint.java index 949f503f7f..9a6c6dbdfb 100644 --- a/OsmAnd/src/net/osmand/plus/server/endpoints/TileEndpoint.java +++ b/OsmAnd/src/net/osmand/plus/server/endpoints/TileEndpoint.java @@ -60,7 +60,7 @@ public class TileEndpoint implements OsmAndHttpServer.ApiEndpoint { } @Override - public NanoHTTPD.Response process(NanoHTTPD.IHTTPSession session, String url) { + public synchronized NanoHTTPD.Response process(NanoHTTPD.IHTTPSession session, String url) { // https://tile.osmand.net/hd/6/55/25.png int extInd = url.indexOf('.'); if (extInd >= 0) { @@ -107,7 +107,7 @@ public class TileEndpoint implements OsmAndHttpServer.ApiEndpoint { final RotatedTileBox cp = mapActivity.getMapView().getCurrentRotatedTileBox(); final RotatedTileBox rotatedTileBox = new RotatedTileBox.RotatedTileBoxBuilder() .setLocation(lat, lon) - .setMapDensity(cp.getMapDensity()).density(TILE_DENSITY) + .setMapDensity(TILE_DENSITY).density(TILE_DENSITY) .setZoom(zoom) .setPixelDimensions(TILE_SIZE_PX * TILE_DENSITY * METATILE_SIZE, TILE_SIZE_PX * TILE_DENSITY * METATILE_SIZE, 0.5f, 0.5f).build(); mapActivity.getMapView().setCurrentViewport(rotatedTileBox);