Closed moovida closed 3 years ago
Can you confirm if you have the latest version (was updated about 27 days ago)...I thought there was a fix for that, so just wanted to make sure it's not something already fixed.
If you're on the latest one, could you add a minimal example case, and I'll take a peek when I get chance.
Yes, I have the latest version. I see you added addClosePathMarker in the last commits.
I will try to create an example, thanks.
@ibrierley , just opened PR #8 to see the issue. Thanks.
What are you setting addClosePathMarker to when creating your PolyEditor instance ? I think you have that missing (think that's my fault as I should include it in test example, it is in the readme) ?
eg addClosePathMarker: false, // set to true if polygon, false if polyline,
No, I got it right from either your code or the readme. I am setting: addClosePathMarker: true, when I am handling a polygon.
Just looking at your code (I'm not able to test just atm), you are using a polyline, but addClosePathMarker: true... I suspect you want this to be false, as you're actually using a polyline in the code, not polygon ?
OMG! it was too obvious. I though this would edit only polylines, but in case of polygons I am allowed to use polygon! Sorry sorry for all the noise. I just tested and it works perfect.
No problem :)
Hi, I finally have been able to test this plugin properly (thanks a ton for it). While it works nicely for lines, I incurred in an issue for polygons. Let's see if I am able to explain it.
If I load the polygon using the right coordinates (i.e. first and last equal), I get this:
which has the following problem, if editing the startpoint:
![image](https://user-images.githubusercontent.com/390250/95439133-800be500-0957-11eb-9210-1acb78036cad.png)
I am thinking about a possible workaround but nothing clean comes to my mind. I think the best would be to remove the last point during editing and then add it back once editing finished (it is anyways the same as the first).
The problem is that while the drag markers should have one less, the editing Polyline shown below the markers, needs to be closed, else one edge is missing.
And since the two share the same list of coordinates in order to be able to "move" consistently during dragging... I have no idea what would be best to do here. Do you have any idea? :-)