Skip to content

OpenLayers draw snapping fixed to avoid cross-bundle projection transform - #520

Merged
dannyleech merged 1 commit into
mainfrom
openlayers-draw-snapping-fix
Sep 11, 2026
Merged

dannyleech merged 1 commit into
mainfrom
openlayers-draw-snapping-fix

Conversation

@dannyleech

Copy link
Copy Markdown
Contributor

OpenLayers draw snapping fixed to avoid cross-bundle projection transform

Problem: With the draw plugin and OpenLayers provider loaded as separate bundles, enabling snapping threw No transform available between EPSG:27700 and EPSG:27700 and broke vertex dragging in edit mode. Each bundle vendors its own private ol/proj registry, and only the provider's bundle registers EPSG:27700 — the draw plugin's snapEngine.js calls transform() against its own separate, unregistered registry.

Fix: snapEngine.js now skips the transform() call when source and view projection codes already match, avoiding the cross-bundle registry dependency entirely.

@sonarqubecloud

Copy link
Copy Markdown

@dannyleech
dannyleech merged commit 9054a2c into main Sep 11, 2026
2 checks passed
@dannyleech
dannyleech deleted the openlayers-draw-snapping-fix branch September 11, 2026 14:49
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