From 1237f8a891645d4f0999bb84f199ea9e3caecec6 Mon Sep 17 00:00:00 2001 From: androiddevkotlin <64539346+androiddevkotlin@users.noreply.github.com> Date: Fri, 23 Apr 2021 20:20:03 +0300 Subject: [PATCH] After changing compass orientation, the plan route line starts to float separately from the position. --- .../net/osmand/plus/measurementtool/MeasurementToolLayer.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/OsmAnd/src/net/osmand/plus/measurementtool/MeasurementToolLayer.java b/OsmAnd/src/net/osmand/plus/measurementtool/MeasurementToolLayer.java index 4da4e357f5..9a587bb6c7 100644 --- a/OsmAnd/src/net/osmand/plus/measurementtool/MeasurementToolLayer.java +++ b/OsmAnd/src/net/osmand/plus/measurementtool/MeasurementToolLayer.java @@ -333,6 +333,7 @@ public class MeasurementToolLayer extends OsmandMapLayer implements ContextMenuL } private void drawBeforeAfterPath(Canvas canvas, RotatedTileBox tb) { + canvas.rotate(-tb.getRotate(), tb.getCenterPixelX(), tb.getCenterPixelY()); List before = editingCtx.getBeforeSegments(); List after = editingCtx.getAfterSegments(); if (before.size() > 0 || after.size() > 0) { @@ -379,6 +380,7 @@ public class MeasurementToolLayer extends OsmandMapLayer implements ContextMenuL GeometryWay.calculatePath(tb, tx, ty, path); canvas.drawPath(path, lineAttrs.paint); } + canvas.rotate(tb.getRotate(), tb.getCenterPixelX(), tb.getCenterPixelY()); } }