L.ImageOverlay dragging

29 views
Skip to first unread message

freeze2000f

unread,
Sep 1, 2016, 3:42:47 AM9/1/16
to Leaflet
I need to make ImageOverlays draggable. Since one can drag markers, polygons and polylines (L.Path.Drag) I am wondering how to adapt this function for georeferenced images.

This question has already been asked in other forums/on github but no working solution has been provided. (see e.g. https://github.com/Leaflet/Leaflet/issues/3883)

Either an adaption of the plugins Leaflet.ImageTransform, Leaflet.PathDrag or a DOM drag event should (maybe) do the trick.

Thanks for your help!

freeze2000f

unread,
Sep 3, 2016, 2:31:26 PM9/3/16
to Leaflet
One workaround is to bind the imageOverlay to a draggable Polygon and redraw it on every update to the next postition (credits to alexander milevski).
See jsfiddle


Reply all
Reply to author
Forward
0 new messages