map syncronization fixed
This commit is contained in:
parent
463679afd3
commit
2851fd38cd
1 changed files with 2 additions and 2 deletions
|
@ -60,7 +60,7 @@ public class TileEndpoint implements OsmAndHttpServer.ApiEndpoint {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@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
|
// https://tile.osmand.net/hd/6/55/25.png
|
||||||
int extInd = url.indexOf('.');
|
int extInd = url.indexOf('.');
|
||||||
if (extInd >= 0) {
|
if (extInd >= 0) {
|
||||||
|
@ -107,7 +107,7 @@ public class TileEndpoint implements OsmAndHttpServer.ApiEndpoint {
|
||||||
final RotatedTileBox cp = mapActivity.getMapView().getCurrentRotatedTileBox();
|
final RotatedTileBox cp = mapActivity.getMapView().getCurrentRotatedTileBox();
|
||||||
final RotatedTileBox rotatedTileBox = new RotatedTileBox.RotatedTileBoxBuilder()
|
final RotatedTileBox rotatedTileBox = new RotatedTileBox.RotatedTileBoxBuilder()
|
||||||
.setLocation(lat, lon)
|
.setLocation(lat, lon)
|
||||||
.setMapDensity(cp.getMapDensity()).density(TILE_DENSITY)
|
.setMapDensity(TILE_DENSITY).density(TILE_DENSITY)
|
||||||
.setZoom(zoom)
|
.setZoom(zoom)
|
||||||
.setPixelDimensions(TILE_SIZE_PX * TILE_DENSITY * METATILE_SIZE, TILE_SIZE_PX * TILE_DENSITY * METATILE_SIZE, 0.5f, 0.5f).build();
|
.setPixelDimensions(TILE_SIZE_PX * TILE_DENSITY * METATILE_SIZE, TILE_SIZE_PX * TILE_DENSITY * METATILE_SIZE, 0.5f, 0.5f).build();
|
||||||
mapActivity.getMapView().setCurrentViewport(rotatedTileBox);
|
mapActivity.getMapView().setCurrentViewport(rotatedTileBox);
|
||||||
|
|
Loading…
Reference in a new issue