Raruto / leaflet-rotate

Leaflet plugin that allows to add rotation functionality to map tiles
GNU General Public License v3.0
77 stars 21 forks source link

Bearing, rotating, pitch, tilt, angle #42

Closed josuelmm closed 9 months ago

josuelmm commented 10 months ago

Good day, it is possible in the near future to add the option of Bearing, rotating, pitch, tilt, angle ?

Examples:

  1. https://maplibre.org/maplibre-gl-js/docs/examples/set-perspective/
  2. https://docs.mapbox.com/mapbox-gl-js/example/set-perspective/
  3. https://developers.google.com/maps/documentation/javascript/webgl/tilt-rotation?hl=es-419
Raruto commented 10 months ago

Hi Josuรจ,

in the near future

๐Ÿ‘‰ https://stackoverflow.com/a/39972340

I don't think so, no one has ever sponsored such developments.


Examples:

  1. https://maplibre.org/maplibre-gl-js/docs/examples/set-perspective/
  2. https://docs.mapbox.com/mapbox-gl-js/example/set-perspective/
  3. https://developers.google.com/maps/documentation/javascript/webgl/tilt-rotation?hl=es-419

๐Ÿ‘‰ https://www.wrld3d.com/wrld.js/latest/docs/examples/adjusting-heading-and-tilt/

That library supports tilt/pitch angles (and is based on leaflet).

I don't know how popular it is..


๐Ÿ‘‰ https://gis.stackexchange.com/a/124997 ๐Ÿ‘‰ https://developer.mozilla.org/en-US/docs/Web/CSS/transform-function/translate3d

If you want to improve this library, below the most notable portion of code from which you can start studying:

https://github.com/Raruto/leaflet-rotate/blob/48e97a6408df7796b3e06e6d8eb0729eb504b1be/src/dom/DomUtil.js#L11-L66

https://github.com/Raruto/leaflet-rotate/blob/48e97a6408df7796b3e06e6d8eb0729eb504b1be/src/map/Map.js#L13-L611

๐Ÿ‘‹ Raruto