Skip to content

fix(editable-layers) Update nearestPointOnLine so it saves distance correctly#629

Open
jake-goldsmith wants to merge 2 commits into
visgl:masterfrom
jake-goldsmith:FixNearestPointOnLineDistance
Open

fix(editable-layers) Update nearestPointOnLine so it saves distance correctly#629
jake-goldsmith wants to merge 2 commits into
visgl:masterfrom
jake-goldsmith:FixNearestPointOnLineDistance

Conversation

@jake-goldsmith
Copy link
Copy Markdown

Simplifies the nearestPointOnLine function - also removes dead code for handling multi part geometries since they are handled at higher levels.

The key bugfix here is setting dist: minDist on the returned object. Previously it was returning a different distance metric so when handling features with multiple lines the results were being compared incorrectly. (See issue #622).

Modify Mode intermediate points are now working as expected:

Screen.Recording.2026-05-07.144827.mp4

Also removes dead code for handling multi part geometries since they are handled at higher levels
@jake-goldsmith jake-goldsmith marked this pull request as ready for review May 7, 2026 14:07
@jake-goldsmith jake-goldsmith changed the title Update nearestPointOnLine so it saves distance correctly fix(editable-layers) Update nearestPointOnLine so it saves distance correctly May 7, 2026
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

Successfully merging this pull request may close these issues.

2 participants