Fix for Issue 5538
This commit is contained in:
parent
f1d34a3335
commit
c00394fc43
1 changed files with 2 additions and 1 deletions
|
@ -123,7 +123,8 @@ public class PointLocationLayer extends OsmandMapLayer implements ContextMenuLay
|
|||
canvas.restore();
|
||||
|
||||
}
|
||||
boolean isBearing = lastKnownLocation.hasBearing();
|
||||
// Issue 5538: Some devices return positives for hasBearing() at rest, hence add 0.0 check:
|
||||
boolean isBearing = lastKnownLocation.hasBearing() && (lastKnownLocation.getBearing() != 0.0);
|
||||
if (!locationOutdated && isBearing) {
|
||||
float bearing = lastKnownLocation.getBearing();
|
||||
canvas.rotate(bearing - 90, locationX, locationY);
|
||||
|
|
Loading…
Reference in a new issue