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 · 1 comment
Open

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants