question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Editing polygon after setLatLngs

See original GitHub issue

When you set new lat/lngs on a polygon and enable editing after that, you can move the handles around, but the layer will not resize with it.

See: http://jsbin.com/hucapobizi/edit?html,js,output This is the example modified with a setLatLngs on the polygon.

  • Leaflet version I’m using: 1.0.2
  • Leaflet Draw version I’m using: 0.4.7
  • Browser (with version) I’m using: Chrome/Firefox/IE11 tested
  • OS/Platform (with version) I’m using: Linux+Windows

Issue Analytics

  • State:open
  • Created 7 years ago
  • Reactions:1
  • Comments:6

github_iconTop GitHub Comments

3reactions
alexmipegocommented, Jan 19, 2018

Had the same issue, quickest workaround I’ve found is, before starting the edit, to reset the edit plugin such as:

shape.editing = new L.Edit.Poly(shape);
shape.editing.enable()
0reactions
mike-kellycommented, Apr 30, 2021

I’m still seeing this behaviour in Leaflet Draw 1.0.4.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Leaflet Draw - Editing Polygon: changing Polygon points does ...
i am currently working on a functionality, where a user can create and edit zones (polygons). Therefore I am using a class Zone...
Read more >
FeatureGroup polygon and polyline cannot be edited with ...
If you want to edit your combined polygon that consists of two different styled polygons, you have to edit only one and then...
Read more >
Continue sketching a feature—ArcGIS Pro | Documentation
On the Edit tab, in the Features group, click Modify · Expand Reshape and click Continue Feature · In the pane, click Active...
Read more >
Documentation - a JavaScript library for interactive maps
Some of the Map methods which modify the zoom level take in an options parameter. This is a plain javascript object with the...
Read more >
Edit Vector Polygon Layer - CGA Web Maps
Go to any POLYGON layer that you want to practice editing. ... Then, after saving those edits, begin editing the ADJACENT polygons, one...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found