Search code examples
javascriptrotationleaflet

how to rotate leaflet.js map


I'm trying to rotate the map (or tileLayer) by x degrees. My research didn't produced any results that are not really dirty hacks and in my case doesn't work.

Is there a native leaflet.js way of rotating the map ?

(css rotate doesn't affect the mouse movement)


Solution

  • Sorry to say, there is no way of natively rotating a Leaflet map. You'll need one of those ugly hacks or switch away from Leaflet and take a look at Mapbox GL JS or Open Layers 3: