This commit is contained in:
simon 2020-08-31 15:26:28 +03:00
parent 3f9b0f03d4
commit 8a8fcd8d58
3 changed files with 6 additions and 12 deletions

View file

@ -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;

View file

@ -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);

View file

@ -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);
}