diff --git a/package-lock.json b/package-lock.json
index d8f39ad9..bb42c803 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -2737,46 +2737,6 @@
"integrity": "sha512-s8UhlNe7vPKomQhC1qFelMokr/Sc3AgNbso3n74mVPA5LTZwkB9NlXf4XPamLxJE8h0gh73rM94xvwRT2CVInw==",
"dev": true
},
- "node_modules/maplibre-draw-polygon": {
- "version": "0.0.1",
- "resolved": "git+ssh://git@github.com/dabreegster/maplibre-draw-polygon.git#7230f333701b2663a77df9cb6bf375f35c0a9d61",
- "dependencies": {
- "@turf/nearest-point-on-line": "^6.5.0",
- "svelte-maplibre": "^0.8.2"
- },
- "peerDependencies": {
- "svelte": "^4.0.0"
- }
- },
- "node_modules/maplibre-draw-polygon/node_modules/svelte-maplibre": {
- "version": "0.8.5",
- "resolved": "https://registry.npmjs.org/svelte-maplibre/-/svelte-maplibre-0.8.5.tgz",
- "integrity": "sha512-BMLlrENxFC7ezMf4l9HJJEvDSGpoA8SLcVjyV87nV/aN6OCLh5PAjMBtE4Yck7phynrZininzmV4Q13LAD3bjg==",
- "dependencies": {
- "d3-geo": "^3.1.0",
- "just-compare": "^2.3.0",
- "just-flush": "^2.3.0",
- "maplibre-gl": "^4.0.0",
- "pmtiles": "^3.0.3"
- },
- "peerDependencies": {
- "@deck.gl/core": "^8.8.0",
- "@deck.gl/layers": "^8.8.0",
- "@deck.gl/mapbox": "^8.8.0",
- "svelte": "^3.54.0 || ^4.0.0"
- },
- "peerDependenciesMeta": {
- "@deck.gl/core": {
- "optional": true
- },
- "@deck.gl/layers": {
- "optional": true
- },
- "@deck.gl/mapbox": {
- "optional": true
- }
- }
- },
"node_modules/maplibre-gl": {
"version": "4.0.2",
"resolved": "https://registry.npmjs.org/maplibre-gl/-/maplibre-gl-4.0.2.tgz",
@@ -3227,9 +3187,9 @@
}
},
"node_modules/route-snapper": {
- "version": "0.4.4",
- "resolved": "https://registry.npmjs.org/route-snapper/-/route-snapper-0.4.4.tgz",
- "integrity": "sha512-G12I5dpUyKGS0slqoIBexs2DKLn5gPKGA8ZgybZb32N58Ld94p6c0kTBGgL1KrhYRo3Wf9mR6HIVKYjT5eiVfQ=="
+ "version": "0.4.9",
+ "resolved": "https://registry.npmjs.org/route-snapper/-/route-snapper-0.4.9.tgz",
+ "integrity": "sha512-SjkZfWnQm45hawSS8w0CttpvnQlPISBlX/gn0Ssj5+9+lJiAI5ct0D6zAqf0ijn5/o5PZO2wPubBsJJ/rDKqgw=="
},
"node_modules/route-snapper-ts": {
"version": "0.0.8",
@@ -3336,19 +3296,18 @@
},
"node_modules/scheme-sketcher-lib": {
"version": "0.0.1",
- "resolved": "git+ssh://git@github.com/acteng/scheme-sketcher-lib.git#224ac1782be387671364d5cb71bf44e70888032f",
+ "resolved": "git+ssh://git@github.com/acteng/scheme-sketcher-lib.git#b0d5fb526d32b945b9adcd7fe6bcb7ffc0cc8b07",
"dependencies": {
"@maptiler/geocoding-control": "1.2.3",
"@turf/mask": "^7.0.0",
"@turf/nearest-point-on-line": "^7.0.0",
"govuk-frontend": "^5.4.1",
"govuk-svelte": "github:acteng/govuk-svelte",
- "maplibre-draw-polygon": "github:dabreegster/maplibre-draw-polygon",
"maplibre-gl": "^4.0.2",
- "route-snapper": "^0.4.1",
+ "route-snapper": "^0.4.9",
"route-snapper-ts": "^0.0.8",
"sass": "^1.77.8",
- "svelte-maplibre": "^0.9.7",
+ "svelte-maplibre": "^0.9.14",
"uuid": "^10.0.0"
},
"peerDependencies": {
@@ -3737,11 +3696,12 @@
}
},
"node_modules/svelte-maplibre": {
- "version": "0.9.7",
- "resolved": "https://registry.npmjs.org/svelte-maplibre/-/svelte-maplibre-0.9.7.tgz",
- "integrity": "sha512-Z0FNCDMcoan/7ZzlICWU2j+BO32Xs3tyGL8YvCzeO5zxzTdIKo3mqHKXkmkKslL87+2cSbFyc2TSqLDNIOOoeA==",
+ "version": "0.9.14",
+ "resolved": "https://registry.npmjs.org/svelte-maplibre/-/svelte-maplibre-0.9.14.tgz",
+ "integrity": "sha512-5HBvibzU/Uf3g8eEz4Hty5XAwoBhW9Tp7NQEvb80U/glR/M1IHyzUKss6XMq8Zbci2wtsASeoPc6dA5R4+0e0w==",
"dependencies": {
"d3-geo": "^3.1.0",
+ "dequal": "^2.0.3",
"just-compare": "^2.3.0",
"just-flush": "^2.3.0",
"maplibre-gl": "^4.0.0",
diff --git a/src/lib/browse/layers/points/UserData.svelte b/src/lib/browse/layers/points/UserData.svelte
index deab8306..ae33a929 100644
--- a/src/lib/browse/layers/points/UserData.svelte
+++ b/src/lib/browse/layers/points/UserData.svelte
@@ -38,7 +38,11 @@
-
Note this file doesn't leave your computer; it's not uploaded anywhere
+
+
+ Note this file doesn't leave your computer; it's not uploaded anywhere
+
+
Currently showing {data.features.length.toLocaleString()} features
diff --git a/src/lib/maplibre/zorder.ts b/src/lib/maplibre/zorder.ts
index dfc57117..ab2f8f4d 100644
--- a/src/lib/maplibre/zorder.ts
+++ b/src/lib/maplibre/zorder.ts
@@ -104,16 +104,8 @@ export let layerZorder = [
// Problem points are one layer that should display on top of scheme data
browse("problems"),
- sketch("edit-polygon-fill"),
- sketch("edit-polygon-lines"),
- sketch("edit-polygon-vertices"),
-
sketch("draw-split-route"),
- sketch("route-points"),
- sketch("route-lines"),
- sketch("route-polygons"),
-
// Draw most things beneath text road labels. These IDs come from the
// MapTiler basemap, and there are different ones for each basemap. Note for
// OS raster basemaps, we draw everything on top of the rasters.
diff --git a/src/pages/LandingPage.svelte b/src/pages/LandingPage.svelte
index 0bb7e864..b7ad1c83 100644
--- a/src/pages/LandingPage.svelte
+++ b/src/pages/LandingPage.svelte
@@ -43,5 +43,10 @@
Start
Accessibility
- Our accessibility statement can be found here.
+
+ Our accessibility statement can be found
+ here
+
+ .
+
diff --git a/src/pages/SketchSchemes.svelte b/src/pages/SketchSchemes.svelte
index 62829425..06f19964 100644
--- a/src/pages/SketchSchemes.svelte
+++ b/src/pages/SketchSchemes.svelte
@@ -7,8 +7,6 @@
BoundaryLayer,
ImageLayer,
InterventionLayer,
- PolygonToolLayer,
- RouteSnapperLayer,
Toolbox,
NewFeatureForm,
} from "scheme-sketcher-lib/draw";
@@ -107,7 +105,7 @@
{#if $mode.mode == "list" || $mode.mode == "split-route" || $mode.mode == "set-image" || $mode.mode == "streetview"}
- {:else if $mode.mode == "new-point" || $mode.mode == "new-freehand-polygon" || $mode.mode == "new-snapped-polygon" || $mode.mode == "new-route"}
+ {:else if $mode.mode == "new-point" || $mode.mode == "new-area" || $mode.mode == "new-route"}
{:else if $mode.mode == "edit"}
@@ -125,8 +123,6 @@
-
-
{/if}
diff --git a/tests/edits.spec.ts b/tests/edits.spec.ts
index e37cfd48..1c39c7bc 100644
--- a/tests/edits.spec.ts
+++ b/tests/edits.spec.ts
@@ -5,8 +5,8 @@ test.beforeEach(async ({ page }) => {
await resetSketch(page);
});
-test("edit a freehand area, then cancel", async ({ page }) => {
- await page.getByRole("button", { name: "New area (freehand)" }).click();
+test("edit an area, then cancel", async ({ page }) => {
+ await page.getByRole("button", { name: "New area" }).click();
await clickMap(page, 500, 500);
await clickMap(page, 400, 500);
await clickMap(page, 400, 600);
@@ -21,22 +21,6 @@ test("edit a freehand area, then cancel", async ({ page }) => {
await expectListMode(page);
});
-test("edit a snapped area, then cancel", async ({ page }) => {
- await page.getByRole("button", { name: "New area (snapped)" }).click();
- await clickMap(page, 500, 500);
- await clickMap(page, 400, 500);
- await clickMap(page, 400, 600);
- await page.getByRole("button", { name: "Finish" }).click();
-
- await page.getByRole("link", { name: "Untitled area" }).click();
- await clickMap(page, 430, 515);
- // This button indicates the mode is working
- await expect(page.getByRole("button", { name: "Cancel" })).toBeVisible();
-
- await page.keyboard.down("Escape");
- await expectListMode(page);
-});
-
// TODO Edit each type of object without saving, and verify the edits are
// retained. Or cancel and make sure they're reverted. (How to test for
// geometry changes?)
diff --git a/tests/modes.spec.ts b/tests/modes.spec.ts
index b044c605..ed0e6ab4 100644
--- a/tests/modes.spec.ts
+++ b/tests/modes.spec.ts
@@ -15,8 +15,8 @@ test("creating a new point opens a form", async ({ page }) => {
await page.getByRole("link", { name: "Point name" }).click();
});
-test("creating a new freehand area opens a form", async ({ page }) => {
- await page.getByRole("button", { name: "New area (freehand)" }).click();
+test("creating a new area opens a form", async ({ page }) => {
+ await page.getByRole("button", { name: "New area" }).click();
await page.getByLabel("Name").fill("Area name");
await page.getByLabel("Description").click();
@@ -28,10 +28,10 @@ test("creating a new freehand area opens a form", async ({ page }) => {
await page.getByRole("link", { name: "Area name" }).click();
});
-test("creating a new freehand area and canceling doesn't save anything", async ({
+test("creating a new area and canceling doesn't save anything", async ({
page,
}) => {
- await page.getByRole("button", { name: "New area (freehand)" }).click();
+ await page.getByRole("button", { name: "New area" }).click();
await clickMap(page, 500, 500);
await clickMap(page, 400, 500);
await clickMap(page, 400, 600);
@@ -44,19 +44,6 @@ test("creating a new freehand area and canceling doesn't save anything", async (
// TODO Repeat canceling for other draw tools
-test("creating a new snapped area opens a form", async ({ page }) => {
- await page.getByRole("button", { name: "New area (snapped)" }).click();
- await page.getByLabel("Name").fill("Area name");
- await page.getByLabel("Description").click();
-
- await clickMap(page, 500, 500);
- await clickMap(page, 400, 500);
- await clickMap(page, 400, 600);
- await page.getByRole("button", { name: "Finish" }).click();
-
- await page.getByRole("link", { name: "Area name" }).click();
-});
-
test("creating a new route opens a form, and auto-fill sets its name", async ({
page,
}) => {
@@ -83,9 +70,9 @@ test("creating a new route opens a form, and auto-fill sets its name", async ({
).toBeVisible();
});
-test("editing geometry of a area works", async ({ page }) => {
+test("editing geometry of an area works", async ({ page }) => {
// Create an area
- await page.getByRole("button", { name: "New area (snapped)" }).click();
+ await page.getByRole("button", { name: "New area" }).click();
await clickMap(page, 241, 509);
await clickMap(page, 235, 431);
await clickMap(page, 465, 459);
@@ -135,8 +122,7 @@ test("escape key works from every mode", async ({ page }) => {
// From each tool, make sure escape goes back to list mode
for (let mode of [
"New point",
- "New area (freehand)",
- "New area (snapped)",
+ "New area",
"New route",
"Split route",
"StreetView",