I'm trying to make a custom map pin rotate when a slider is dragged.

I have a slider that you can drag to choose an hour in the day. When the slider moves, the map pin in the custom map renderer must rotate to match the wind direction at the given time. How can I make a slider in my UI map control the rotation of a custom map pin in a custom map renderer? Both iOS and Android custom map renderers.