• After 15+ years, we've made a big change: Android Forums is now Early Bird Club. Learn more here.

Apps Rotate Map Without Compass sensor

concave

Lurker
Hi all, im a newbie in here. and it's my first thread
Anyway , know i develop an map application. One feature from my map is, it can rotate.
I already develop map that can rotate using orientation sensor. But now, i need to develop it without sensor.
So, it's possible to get an angle from 2 coordinates (last position and current position )with atan2 and use it to rotate the map ?
Please really need the help
Thanks in advance
 
Already found the solution,but have another problem :confused:
It's possible to use atan2 and use the value to rotate it in canvas, but another problem that i found is
How to save the latitude and longitude before the location changed ?
As i described it i need 2 coordinates (where it before the coordinate changed, and after the coordinate changed)
I think for changed coordinate, i can use the latitude in the onLocationChanged.
But i don't know how to get the before location changed.
Can anybody help me with this problem ?
 
Back
Top Bottom