5

I want to rotate an ImageView with an arrow from the current user location to some previously saved GPS location. How do I do this?

Is the Initial Bearing got from the Location.distanceBetween method the right way to go on this? If so, how do I use it with the compass readings?

Bill the Lizard
  • 398,270
  • 210
  • 566
  • 880
DArkO
  • 15,880
  • 12
  • 60
  • 88

1 Answers1

1

You can use the bearingTo method in Location class, then retrieve the current bearing using the SensorManager.getOrientation method.

Finally, adding both results, draw the arrow.

Hope it helps.

Mister Smith
  • 27,417
  • 21
  • 110
  • 193