Fix in New Zealand, green map coverage overlay sometimes doesn't match map #1749
This commit is contained in:
parent
868c39ff55
commit
f8d99c4623
1 changed files with 15 additions and 13 deletions
|
@ -5,6 +5,8 @@ import net.osmand.core.android.TileSourceProxyProvider;
|
|||
import net.osmand.core.jni.MapLayerConfiguration;
|
||||
import net.osmand.core.jni.PointI;
|
||||
import net.osmand.data.LatLon;
|
||||
import net.osmand.data.QuadPointDouble;
|
||||
import net.osmand.data.QuadRect;
|
||||
import net.osmand.data.RotatedTileBox;
|
||||
import net.osmand.map.ITileSource;
|
||||
import net.osmand.plus.OsmandSettings;
|
||||
|
@ -174,19 +176,19 @@ public class MapVectorLayer extends BaseMapLayer {
|
|||
canvas.rotate(rot, currentViewport.getCenterPixelX(), currentViewport.getCenterPixelY());
|
||||
final RotatedTileBox calc = currentViewport.copy();
|
||||
calc.setRotate(bmpLoc.getRotate());
|
||||
// int cz = currentViewport.getZoom();
|
||||
// QuadPointDouble lt = bmpLoc.getLeftTopTile(cz);
|
||||
// QuadPointDouble rb = bmpLoc.getRightBottomTile(cz);
|
||||
// final float x1 = calc.getPixXFromTile(lt.x, lt.y, cz);
|
||||
// final float x2 = calc.getPixXFromTile(rb.x, rb.y, cz);
|
||||
// final float y1 = calc.getPixYFromTile(lt.x, lt.y, cz);
|
||||
// final float y2 = calc.getPixYFromTile(rb.x, rb.y, cz);
|
||||
LatLon lt = bmpLoc.getLeftTopLatLon();
|
||||
LatLon rb = bmpLoc.getRightBottomLatLon();
|
||||
final float x1 = calc.getPixXFromLatLon(lt.getLatitude(), lt.getLongitude());
|
||||
final float x2 = calc.getPixXFromLatLon(rb.getLatitude(), rb.getLongitude());
|
||||
final float y1 = calc.getPixYFromLatLon(lt.getLatitude(), lt.getLongitude());
|
||||
final float y2 = calc.getPixYFromLatLon(rb.getLatitude(), rb.getLongitude());
|
||||
QuadPointDouble lt = calc.getLeftTopTile(bmpLoc.getZoom());
|
||||
QuadPointDouble rb = calc.getRightBottomTile(bmpLoc.getZoom());
|
||||
final float x1 = calc.getPixXFromTile(lt.x, lt.y, bmpLoc.getZoom());
|
||||
final float x2 = calc.getPixXFromTile(lt.x, lt.y, bmpLoc.getZoom());
|
||||
final float y1 = calc.getPixYFromTile(rb.x, rb.y, bmpLoc.getZoom());
|
||||
final float y2 = calc.getPixYFromTile(rb.x, rb.y, bmpLoc.getZoom());
|
||||
|
||||
// LatLon lt = bmpLoc.getLeftTopLatLon();
|
||||
// LatLon rb = bmpLoc.getRightBottomLatLon();
|
||||
// final float x1 = calc.getPixXFromLatLon(lt.getLatitude(), lt.getLongitude());
|
||||
// final float x2 = calc.getPixXFromLatLon(rb.getLatitude(), rb.getLongitude());
|
||||
// final float y1 = calc.getPixYFromLatLon(lt.getLatitude(), lt.getLongitude());
|
||||
// final float y2 = calc.getPixYFromLatLon(rb.getLatitude(), rb.getLongitude());
|
||||
destImage.set(x1, y1, x2, y2);
|
||||
if (!bmp.isRecycled()) {
|
||||
canvas.drawBitmap(bmp, null, destImage, paintImg);
|
||||
|
|
Loading…
Reference in a new issue