2

I am looking for a Leaflet pluging for move (drag and drop), rotate or change a polygon or polyline feature. Also I´d like to capture the feature vertex coordinates once it has been moved to the new position. Otherwise is it posible to do that using perhaps OpenLayers o TurfJS? Which is the most appropiated way to do that, including saving modified feature into the backend?

2

A quick search found this answer, so your question is possibly a duplicate question:

Using Leaflet.Path.Transform to rotate polygons in Mapbox

which leads to this leaflet plugin:

Leaflet.Path.Transform which has this beautiful demo page.

That looks like the answer to your question, minus the getting the feature coordinates, which might be solved by exploring the answers to this question: Coordinates of Leaflet.Draw rectangle

As for saving to the back-end, I would search something like 'leaflet draw save to [backend]'

  • 1
    I have been exploring some plugins but not the mentioned. I will check that – kamome Apr 3 '18 at 1:37

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.