How do I rotate the map marker (draw a line on the map at an angle)?

An alternative. Use a canvas (which has to be visible) and imagesprite. On button clicks you change the heading of the imageSprite image, then save the canvas image and set the marker. Thisw example done with Android 10 in companion mode (for file path location...)