how to rotate leaflet.js map

后端 未结 1 955
温柔的废话
温柔的废话 2021-02-20 18:42

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 ther

相关标签:
1条回答
  • 2021-02-20 19:16

    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:

    • http://www.mapbox.com/mapbox-gl-js/example/navigation/
    • http://openlayers.org/en/latest/examples/rotation.html
    0 讨论(0)
提交回复
热议问题