Fix route/track on map in direction compass mode

This commit is contained in:
max-klaus 2020-01-05 21:59:12 +03:00
parent 61f786e082
commit c0ed1d1eca

View file

@ -950,8 +950,9 @@ public class OsmandMapTileView implements IMapDownloaderCallback {
}
} else if (tileBoxHeightPx > 0) {
tbh = (int) (tileBoxHeightPx * border);
dy = (tb.getCenterPixelY() * 2 - tileBoxHeightPx) / 2 - marginTopPx;
dy = (tb.getPixHeight() - tileBoxHeightPx) / 2 - marginTopPx;
}
dy += tb.getCenterPixelY() - tb.getPixHeight() / 2;
tb.setPixelDimensions(tbw, tbh);
double clat = bottom / 2 + top / 2;
@ -983,6 +984,7 @@ public class OsmandMapTileView implements IMapDownloaderCallback {
tbh = (int) (tileBoxHeightPx * border);
dy = (tb.getPixHeight() - tileBoxHeightPx) / 2 - marginTopPx;
}
dy += tb.getCenterPixelY() - tb.getPixHeight() / 2;
tb.setPixelDimensions(tbw, tbh);
if (dy != 0) {
@ -1006,6 +1008,7 @@ public class OsmandMapTileView implements IMapDownloaderCallback {
tbh = tileBoxHeightPx;
dy = (tb.getPixHeight() - tileBoxHeightPx) / 2 - marginTopPx;
}
dy += tb.getCenterPixelY() - tb.getPixHeight() / 2;
tb.setPixelDimensions(tbw, tbh);
tb.setLatLonCenter(clat, clon);
tb.setZoom(zoom);