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

Feature proposal: Additional custom SnapList #1459

Open
beig opened this issue Feb 22, 2024 · 2 comments
Open

Feature proposal: Additional custom SnapList #1459

beig opened this issue Feb 22, 2024 · 2 comments

Comments

@beig
Copy link
Contributor

beig commented Feb 22, 2024

Hi,

I want to combine https://github.com/manubb/Leaflet.PixiOverlay with Geoman without losing the functionality of snapping to marker.
My current take on it would be to expose an Array in L.PM.Utils and combining it with the created SnapList in the Snapping._createSnapList function (and also in other places where the SnapMixin is used)

This would give the user a SnapList which he himself can populate/update without changing much of the Snapping function.

Would love to hear your thoughts on this approach.
If it's something you think is useful I would gladly provide a pull request.

Thanks

@Falke-Design
Copy link
Collaborator

The easiest would be to create for each coordinate an invisible marker: L.marker(latlng, {opacity: 0, snapIgnore: false, pmIgnore: true}).addTo(map) But maybe that are then to much markers.

Another approche would be to add the markers to _otherSnapLayers for each layer / draw-pm instance.

@beig
Copy link
Contributor Author

beig commented Feb 22, 2024

Another advantage would be that the second snaplist can be updated with whats in the viewport.
Having lots of markers in the SnapList makes the mouse pretty laggy

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