Search code examples
androidgoogle-mapsgoogle-maps-markersgoogle-maps-android-api-2android-sensors

How to rotate markers using sensor manager in google maps android?


In my project I should rotate the marker on a google map same as the compass functionality in android ,my doubt is should I use an imageview or can I rotate the marker directly.Help me out guys if any mistakes please don't mind I'm a newbie.


Solution

  • You can rotate the marker directly using this

    Animate the rotation of the Marker in google map v2

    In sensor manager use this :

    Android: Problems calculating the Orientation of the Device