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

Snap Interaction #2159

Open
DiffPetrovich opened this issue Sep 21, 2024 · 0 comments
Open

Snap Interaction #2159

DiffPetrovich opened this issue Sep 21, 2024 · 0 comments

Comments

@DiffPetrovich
Copy link

DiffPetrovich commented Sep 21, 2024

Is your feature request related to a problem? Please describe.
Please make snapping/sticking feature, e.g. when we draw new line/point, it can be attached exactly to an existing one, just like in any CAD system or OSM data editor. Umap very lacks this.

Describe the solution you'd like
One of these:

  1. While drawing a line/point, when the mouse is near an existing one, the latter is highlighted. When we click during this highlight, the new point is creating at the nearest position from the mouse exactly on top of the highlighted one (CADs usually use this approach).
  2. While drawing a line/point, when the mouse is near an existing one, the point instantly sticks to it and we can adjust the position and click the mouse to create (see example below).

Also the snapping should be when a line ends on itself.

Describe alternatives you've considered
None. I import some OSM data and want to draw manually on top of that, connecting points/lines, but the precise mapping with this soft is impossible since new geometry's points are created at some distance from the existing vector's axis/center and this distors the final map.

Additional context
You can see the example here: https://openlayers.org/en/latest/examples/snap.html
(I understand, that you use Leaflet and this may be its problem, but decided to put the issue here, the final product, for more people to know about it).

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

No branches or pull requests

1 participant