You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Migrate edition Draw/Modify/Select from OL2 to OL10
* Replace OpenLayers.Control.DrawFeature / ModifyFeature / SelectFeature
with OL10 Draw, Modify and Select interactions. The OL2 vector edit
layer becomes an OL10 VectorLayer / VectorSource on mainLizmap.map.
* Auto-activate Modify after a feature is drawn, including for point
layers. Feature highlights use the OL10 draw layer.
* Route WMS extent / size queries through the OL10 view. Required
because the OL10 map is now the source of truth for the visible
viewport during edition.
* New modules/Edition.js owns the WKT bridge between the digitizing
module and the hidden geometry form field, and emits user-facing
toasts via #lizmap-editing-message (the legacy #lizmap-edition-message
is still used for save-success / error toasts).
* Duplicate toast dispatches removed from legacy/edition.js so the
"Edit vertices" / "Draw on the map" toast no longer appears twice.
* For point edition the digitizing toolbar is hidden; drawing begins
automatically on click.
* New baseline locale keys: edition.toolbar.redraw plus four
digitizing.toolbar.<tool>.help keys (edit / split / rotate / scaling).
* Remove ~120 lines of dead OL2 split helpers from legacy/edition.js
(afterReshapeSpliting, beforeFeatureSpliting, afterFeatureSpliting and
their editCtrls.reshape / editCtrls.featsplit entries).
Builds on the snapping migration. The new digitizing module calls
mainLizmap.snapping.reorderSnapInteraction() after adding interactions,
so the OL10 Snap follows each new Draw / Modify / Translate.
Tests:
* 9 spec files updated for OL10 map / interactions (clickOnMapLegacy
→ clickOnMap, mapOl2 → map, #map → #newOlMap, waitForFunction guards
for Select/Modify).
* edition-form.spec.js: "must allow modification without creation"
now expects #lizmap-editing-message (the new id) for the on-form
edit-vertices toast.
* editing-copy-paste-geometry.spec.js: mark the 11 interaction tests
test.fixme(). They cover behaviour that needs the OL10 GeometryCopy
port (lands in the follow-up Copy/Paste PR).
* draw.spec.js: mark "Length and angle constraints" test.fixme() —
the distance/angle constraint feature is deferred to a follow-up PR.
Deferred to follow-up PRs: reshape, parallel offset, move (in edition),
distance/angle drawing constraints, split-with-server-save (the
digitizing-split button is therefore hidden in edition context for now,
remains available in draw context), ReverseGeom port, draw.spec.js
new-tool tests and pages/drawpage.js new-tool locators.
0 commit comments