After changing compass orientation, the plan route line starts to float separately from the position.

This commit is contained in:
androiddevkotlin 2021-04-23 20:20:03 +03:00
parent 6ec3c371cd
commit 1237f8a891

View file

@ -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<TrkSegment> before = editingCtx.getBeforeSegments();
List<TrkSegment> 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());
}
}