Closed GoogleCodeExporter closed 9 years ago
I suppose you're talking about the MyLocationOverlay class, right?
Original comment by mpr....@gmail.com
on 29 Sep 2010 at 10:42
Issue 140 has been merged into this issue.
Original comment by kurtzm...@gmail.com
on 24 Jan 2011 at 3:37
This issue was closed by revision r756.
Original comment by kurtzm...@gmail.com
on 24 Jan 2011 at 3:48
I took a look into this and it does make sense - when the orientation of the
phone changes, Android changes the screen coordinate system by rotating it,
however the physical orientation sensor also rotates with the device but does
not change its orientation along with the screen (since it doesn't know that
the screen orientation changed). So we have to offset by +90 manually. This
assumes that Android only allows two screen rotations - 0 degrees (portrait)
and 90 degrees (landscape) and does not permit 180 or 270 degrees (upside-down
portrait and upside-down landscape respectively). This is probably a bad
assumption, so maybe there is a better way to do this.
SensorManager.remapCoordinateSystem might be able to help.
But for now, it works. The above issues are notated in the code.
Original comment by kurtzm...@gmail.com
on 24 Jan 2011 at 3:48
Original issue reported on code.google.com by
claur...@gmail.com
on 25 Sep 2010 at 5:03