Leaflet.draw icon indicating copy to clipboard operation
Leaflet.draw copied to clipboard

Add rotate support

Open vladimir-shmidt opened this issue 13 years ago • 12 comments

It would be great to add support of rotating poligons while editting

vladimir-shmidt avatar Apr 03 '13 14:04 vladimir-shmidt

I second this. This would be awesome.

saamalik avatar Sep 03 '13 00:09 saamalik

I too agree this functionality would be EXTREMELY useful and awesome.

chrismblinn avatar Nov 26 '13 16:11 chrismblinn

+1

kidig avatar Sep 30 '14 15:09 kidig

+1 That would make a big difference.

Making them draggable while editing too (I haven't found the code to enable that).

kounips avatar Oct 10 '14 05:10 kounips

+1

JulianKingman avatar May 29 '15 15:05 JulianKingman

@jandm did a presentation today at Foss4G.be and showed us a convincing demo. Look at his work

mmeinert avatar Oct 29 '15 11:10 mmeinert

Thank you very much, Michael, nice meeting you there ! I added resize and rotation handles + made geometries draggable. Demo is here My first steps in Leaflet (i'm a Java guy), so all comments are welcome.

jandm avatar Oct 30 '15 09:10 jandm

@jandm hi thanks for your demo. I have a problem replacing original leaflet-draw with your one, i am using leaflet 1+ and when i click edit button i have

Uncaught TypeError: Cannot read property 'lat' of null at Object.project (?pkg=full&version=v3.5.4:formatted:10450) at Object.latLngToPoint (?pkg=full&version=v3.5.4:formatted:10465) at e.project (?pkg=full&version=v3.5.4:formatted:10808) at e._getMiddleLatLng (leaflet.draw-src.js:1381) at e._createMiddleMarker (leaflet.draw-src.js:1314) at e._initMarkers (leaflet.draw-src.js:1211) at e.addHooks (leaflet.draw-src.js:1160) at enable (?pkg=full&version=v3.5.4:formatted:14093) at e._enableLayerEdit (leaflet.draw-src.js:2793) at eachLayer (?pkg=full&version=v3.5.4:formatted:12662) at e.addHooks (leaflet.draw-src.js:2688) at enable (?pkg=full&version=v3.5.4:formatted:14093) at enable (leaflet.draw-src.js:2666) at HTMLAnchorElement.s (?pkg=full&version=v3.5.4:formatted:13906)

With original leaflet-draw it works fine.

could you help with fixing it? Thx

dreambit avatar Apr 14 '19 10:04 dreambit

+1 also very keen for this (I'd like to rotate a rectangle, but without the skewing that ocurs in @jandm's fork)... exploring options to contribute.

danwild avatar Dec 11 '20 03:12 danwild

FYI - I've made a start on a plugin to add rotate support for Leaflet.draw:

https://github.com/onaci/Leaflet.draw.rotate

Have only only implemented rectangle rotation so far, PR's are welcome!

danwild avatar Dec 15 '20 02:12 danwild

+1

zstarpak avatar Dec 19 '22 13:12 zstarpak