Rotate map

Hi All,

I’m new to OSM. I’ve created an HTML page that creates a map with a marker and centers it to that location. I have a javascript function that when called it moves the marker to the specified lonlat and pans the map. What I’d like to do is add functionality to rotate the map before i move the marker so the marker always moves up. Any ideas?


No idea what JS library you’re using, but just in case you haven’t seen it, have a look at . That contains some links that might be useful (not just for Leaflet).

Thanks for the reply. I am using LeafletJS and according to the documentation there is no rotate function. However, i found Mapbox map control: However there is no way (that i can see) to rotate programmatically.