leaflet-geoman icon indicating copy to clipboard operation
leaflet-geoman copied to clipboard

Mutliselect / box select for vertex / helper-markers in Edit Mode

Open vanHekthor opened this issue 1 year ago β€’ 4 comments
trafficstars

Hello, I need a mutliselect / box select for the vertex / helper-marker of the layers in the Edit Mode. This would allow you to select multiple vertices and then move them around or even delete them etc. I didn't find any feature that is currently able to provide that functionality. So, I was thinking of extending geoman myself.

Before going in too deep, did I miss anything? Is there an existing feature request or even, does this functionality already exist?

If not, I was wondering, if you could give me some guidance. Creating the selection box (similar to the leaflet box zoom feature) and checking which markers it contains should be easy. What troubles me is:

  • Where in the source code are the helper-markers controlled (visibility, click-, drag-, move-interactions, connection to the actual layer coordinates)?
  • Is there a similar way to getGeomanLayers or L.PM.Utils.findLayers to get these markers?

Hopefully, my questions aren't too silly.

vanHekthor avatar Apr 05 '24 11:04 vanHekthor

Hi @vanHekthor,

you are right, currently there is no feature like that available.

The markers are created here and over the drag events the markers are moved: https://github.com/geoman-io/leaflet-geoman/blob/b4918546acce6c374a8467f16027f578b463aa2e/src/js/Edit/L.PM.Edit.Line.js#L196-L200

All markers of the layer are in layer.pm._markers

Falke-Design avatar Apr 05 '24 13:04 Falke-Design

@vanHekthor did you have any luck with this? Was wondering if you could share the code if so. Many thanks

plarner30 avatar Aug 27 '24 11:08 plarner30

@Falke-Design Any plans to implement something like this in the pro version? It would be good to be able to drag multiple marker nodes and also delete

plarner30 avatar Sep 09 '24 10:09 plarner30

Hi @plarner30,

we are considering to implement this into pro. It looks like a nice feature but we don't have it currently on the road map

Falke-Design avatar Sep 18 '24 19:09 Falke-Design