From 29d52e0fc69f16477fbfd6f5c08900890626f0be Mon Sep 17 00:00:00 2001 From: Pieter Vander Vennet Date: Mon, 2 Sep 2024 11:56:36 +0200 Subject: [PATCH] Themes: add 'allowMove' everywhere, make 'allowMove' obligated, see #2121 --- assets/layers/caravansites/caravansites.json | 5 +++-- assets/layers/dumpstations/dumpstations.json | 8 ++++++-- assets/themes/climbing/climbing.json | 4 ---- assets/themes/cyclenodes/cyclenodes.json | 8 +++++--- assets/themes/cyclestreets/cyclestreets.json | 9 ++++++--- assets/themes/postal_codes/postal_codes.json | 10 +++++++--- assets/themes/speelplekken/speelplekken.json | 3 ++- assets/themes/stations/stations.json | 9 +++++++-- assets/themes/street_lighting/street_lighting.json | 7 +++++-- assets/themes/uk_addresses/uk_addresses.json | 7 ++++++- assets/themes/walkingnodes/walkingnodes.json | 4 +++- assets/themes/width/width.json | 1 + src/Models/ThemeConfig/Conversion/PrevalidateLayer.ts | 2 +- 13 files changed, 52 insertions(+), 25 deletions(-) diff --git a/assets/layers/caravansites/caravansites.json b/assets/layers/caravansites/caravansites.json index 88ca53ee2..8964f3596 100644 --- a/assets/layers/caravansites/caravansites.json +++ b/assets/layers/caravansites/caravansites.json @@ -930,5 +930,6 @@ "color": "#00f", "width": "8" } - ] -} \ No newline at end of file + ], + "allowMove": true +} diff --git a/assets/layers/dumpstations/dumpstations.json b/assets/layers/dumpstations/dumpstations.json index dc1c6cbab..66003ad53 100644 --- a/assets/layers/dumpstations/dumpstations.json +++ b/assets/layers/dumpstations/dumpstations.json @@ -628,5 +628,9 @@ "color": "#00f", "width": "8" } - ] -} \ No newline at end of file + ], + "allowMove": { + "enableImproveAccuracy": true, + "enableRelocation": false + } +} diff --git a/assets/themes/climbing/climbing.json b/assets/themes/climbing/climbing.json index e724cf91a..03fed5b81 100644 --- a/assets/themes/climbing/climbing.json +++ b/assets/themes/climbing/climbing.json @@ -63,10 +63,6 @@ "climbing_opportunity" ], "override": { - "allowMove": { - "enableRelocation": false, - "enableImproveAccuracy": true - }, "+titleIcons": [ { "id": "climbing_length", diff --git a/assets/themes/cyclenodes/cyclenodes.json b/assets/themes/cyclenodes/cyclenodes.json index 7b0eb6636..c8b5be2ac 100644 --- a/assets/themes/cyclenodes/cyclenodes.json +++ b/assets/themes/cyclenodes/cyclenodes.json @@ -123,7 +123,8 @@ } } ], - "pointRendering": null + "pointRendering": null, + "allowMove": false }, { "id": "node_bicycle", @@ -324,7 +325,8 @@ "cycleways_and_roads" ] } - ] + ], + "allowMove": false }, { "builtin": [ @@ -407,4 +409,4 @@ } } ] -} \ No newline at end of file +} diff --git a/assets/themes/cyclestreets/cyclestreets.json b/assets/themes/cyclestreets/cyclestreets.json index ef774802f..7bf579ea6 100644 --- a/assets/themes/cyclestreets/cyclestreets.json +++ b/assets/themes/cyclestreets/cyclestreets.json @@ -172,7 +172,8 @@ "color": "#0000ff", "width": "10" } - ] + ], + "allowMove": false }, { "id": "toekomstige_fietsstraat", @@ -290,7 +291,8 @@ "color": "#09f9dd", "width": "5" } - ] + ], + "allowMove": false }, { "id": "not_cyclestreets", @@ -410,7 +412,8 @@ "width": "5" } ], - "isCounted": false + "isCounted": false, + "allowMove": false } ], "overrideAll": { diff --git a/assets/themes/postal_codes/postal_codes.json b/assets/themes/postal_codes/postal_codes.json index f3368867f..2cfbeda0f 100644 --- a/assets/themes/postal_codes/postal_codes.json +++ b/assets/themes/postal_codes/postal_codes.json @@ -144,7 +144,8 @@ "fill": "no", "dashArray": "8 8" } - ] + ], + "allowMove": false }, { "id": "wrong_postal_code", @@ -163,7 +164,9 @@ "color": "#f00", "width": 1 } - ] + ], + "allowMove": false + }, { "id": "town_hall", @@ -233,7 +236,8 @@ ], "anchor": "center" } - ] + ], + "allowMove": false } ], "overpassTimeout": 180, diff --git a/assets/themes/speelplekken/speelplekken.json b/assets/themes/speelplekken/speelplekken.json index ab7063201..9e2bcda94 100644 --- a/assets/themes/speelplekken/speelplekken.json +++ b/assets/themes/speelplekken/speelplekken.json @@ -196,7 +196,8 @@ }, "width": "9" } - ] + ], + "allowMove": false } ], "overrideAll": { diff --git a/assets/themes/stations/stations.json b/assets/themes/stations/stations.json index 34814f882..83a9cfd30 100644 --- a/assets/themes/stations/stations.json +++ b/assets/themes/stations/stations.json @@ -115,7 +115,8 @@ { "color": "green" } - ] + ], + "allowMove": false }, { "builtin": [ @@ -454,7 +455,11 @@ ], "lineRendering": [ {} - ] + ], + "allowMove": { + "enableImproveAccuracy": true, + "enableRelocation": false + } } ] } diff --git a/assets/themes/street_lighting/street_lighting.json b/assets/themes/street_lighting/street_lighting.json index b4ace4e2d..970246e67 100644 --- a/assets/themes/street_lighting/street_lighting.json +++ b/assets/themes/street_lighting/street_lighting.json @@ -196,7 +196,8 @@ { "color": "#ff0" } - ] + ], + "allowMove": false }, { "id": "all_streets", @@ -367,7 +368,9 @@ ] } } - ] + ], + "allowMove": false + } ] } diff --git a/assets/themes/uk_addresses/uk_addresses.json b/assets/themes/uk_addresses/uk_addresses.json index f86ae5f9d..52ea31313 100644 --- a/assets/themes/uk_addresses/uk_addresses.json +++ b/assets/themes/uk_addresses/uk_addresses.json @@ -681,7 +681,12 @@ }, "width": "3" } - ] + ], + "allowMove": { + "enableImproveAccuraccy": true, + "enableRelocation": false + } + }, "named_streets" ], diff --git a/assets/themes/walkingnodes/walkingnodes.json b/assets/themes/walkingnodes/walkingnodes.json index c6a3ada63..4dc29796e 100644 --- a/assets/themes/walkingnodes/walkingnodes.json +++ b/assets/themes/walkingnodes/walkingnodes.json @@ -91,6 +91,7 @@ } ], "pointRendering": null, + "allowMove": false, "tagRenderings": [ { "builtin": "survey_date", @@ -195,6 +196,7 @@ } ] }, + "allowMove": false, "tagRenderings": [ { "id": "node-rwn_ref", @@ -370,4 +372,4 @@ } } ] -} \ No newline at end of file +} diff --git a/assets/themes/width/width.json b/assets/themes/width/width.json index e68bcce7c..59a07a5db 100644 --- a/assets/themes/width/width.json +++ b/assets/themes/width/width.json @@ -200,6 +200,7 @@ "anchor": "center" } ], + "allowMove": false, "lineRendering": [ { "width": "4", diff --git a/src/Models/ThemeConfig/Conversion/PrevalidateLayer.ts b/src/Models/ThemeConfig/Conversion/PrevalidateLayer.ts index 103bc6a5f..5412fe52e 100644 --- a/src/Models/ThemeConfig/Conversion/PrevalidateLayer.ts +++ b/src/Models/ThemeConfig/Conversion/PrevalidateLayer.ts @@ -141,7 +141,7 @@ export class PrevalidateLayer extends DesugaringStep { } } - if(json.allowMove === undefined){ + if(json.allowMove === undefined && json.source["geoJson"] === undefined){ if (!Constants.priviliged_layers.find((x) => x == json.id)) { context.err( "Layer " +