Fix outdated location drawing
This commit is contained in:
parent
9dea30ca51
commit
77decbff8a
1 changed files with 3 additions and 3 deletions
|
@ -113,10 +113,9 @@ public class PointLocationLayer extends OsmandMapLayer implements ContextMenuLay
|
||||||
}
|
}
|
||||||
// draw bearing/direction/location
|
// draw bearing/direction/location
|
||||||
if (isLocationVisible(box, lastKnownLocation)) {
|
if (isLocationVisible(box, lastKnownLocation)) {
|
||||||
boolean isBearing = lastKnownLocation.hasBearing();
|
|
||||||
|
|
||||||
Float heading = locationProvider.getHeading();
|
Float heading = locationProvider.getHeading();
|
||||||
if (heading != null && mapViewTrackingUtilities.isShowViewAngle()) {
|
if (!locationOutdated && heading != null && mapViewTrackingUtilities.isShowViewAngle()) {
|
||||||
|
|
||||||
canvas.save();
|
canvas.save();
|
||||||
canvas.rotate(heading - 180, locationX, locationY);
|
canvas.rotate(heading - 180, locationX, locationY);
|
||||||
|
@ -125,7 +124,8 @@ public class PointLocationLayer extends OsmandMapLayer implements ContextMenuLay
|
||||||
canvas.restore();
|
canvas.restore();
|
||||||
|
|
||||||
}
|
}
|
||||||
if (isBearing) {
|
boolean isBearing = lastKnownLocation.hasBearing();
|
||||||
|
if (!locationOutdated && isBearing) {
|
||||||
float bearing = lastKnownLocation.getBearing();
|
float bearing = lastKnownLocation.getBearing();
|
||||||
canvas.rotate(bearing - 90, locationX, locationY);
|
canvas.rotate(bearing - 90, locationX, locationY);
|
||||||
canvas.drawBitmap(bearingIcon, locationX - bearingIcon.getWidth() / 2,
|
canvas.drawBitmap(bearingIcon, locationX - bearingIcon.getWidth() / 2,
|
||||||
|
|
Loading…
Reference in a new issue