Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
vanHekthor opened this issue Apr 5, 2024 · 4 comments
Open
Labels
feature request Pro ⭐ Related to Leaflet-Geoman Pro ⭐

Comments

@vanHekthor
Copy link

vanHekthor commented Apr 5, 2024

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 vanHekthor changed the title Mutliselect / box select for vertex / helper-marker in Edit Mode Mutliselect / box select for vertex / helper-markers in Edit Mode Apr 5, 2024
@Falke-Design
Copy link
Collaborator

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:

marker.on('click', this._onVertexClick, this);
marker.on('dragstart', this._onMarkerDragStart, this);
marker.on('move', this._onMarkerDrag, this);
marker.on('dragend', this._onMarkerDragEnd, this);

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

@plarner30
Copy link

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

@plarner30
Copy link

plarner30 commented Sep 9, 2024

@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

@Falke-Design
Copy link
Collaborator

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 Falke-Design added feature request Pro ⭐ Related to Leaflet-Geoman Pro ⭐ labels Sep 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request Pro ⭐ Related to Leaflet-Geoman Pro ⭐
Projects
None yet
Development

No branches or pull requests

3 participants