From 8d52bbc637e1d4693ac4cba3d8ba7f534a1b3be2 Mon Sep 17 00:00:00 2001
From: pietervdvn
Date: Fri, 23 Jul 2021 15:51:51 +0200
Subject: [PATCH 1/8] Fix version number
---
Models/Constants.ts | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Models/Constants.ts b/Models/Constants.ts
index 75423405e4..33a52c40f6 100644
--- a/Models/Constants.ts
+++ b/Models/Constants.ts
@@ -2,7 +2,7 @@ import { Utils } from "../Utils";
export default class Constants {
- public static vNumber = "0.8.4-rc3";
+ public static vNumber = "0.8.4";
// The user journey states thresholds when a new feature gets unlocked
public static userJourney = {
From af18870bf842885d22c1b44aab68a4dedc0cbcd7 Mon Sep 17 00:00:00 2001
From: pietervdvn
Date: Sat, 24 Jul 2021 02:42:37 +0200
Subject: [PATCH 2/8] Update docs
---
Docs/SpecialInputElements.md | 12 ++-
Docs/TagInfo/mapcomplete_cyclofix.json | 19 ++++
Docs/URL_Parameters.md | 124 +++++++++++--------------
3 files changed, 79 insertions(+), 76 deletions(-)
diff --git a/Docs/SpecialInputElements.md b/Docs/SpecialInputElements.md
index 3eb09bbb2b..3249c0b918 100644
--- a/Docs/SpecialInputElements.md
+++ b/Docs/SpecialInputElements.md
@@ -14,6 +14,14 @@ A string, but allows input of longer strings more comfortably (a text area)
A date
+## direction
+
+A geographical direction, in degrees. 0° is north, 90° is east, ... Will return a value between 0 (incl) and 360 (excl)
+
+## length
+
+A geographical length in meters (rounded at two points). Will give an extra minimap with a measurement tool. Arguments: [ zoomlevel, preferredBackgroundMapType (comma seperated) ], e.g. `["21", "map,photo"]
+
## wikidata
A wikidata identifier, e.g. Q42
@@ -30,10 +38,6 @@ A positive number or zero
A strict positive number
-## direction
-
-A geographical direction, in degrees. 0° is north, 90° is east, ... Will return a value between 0 (incl) and 360 (excl)
-
## float
A decimal
diff --git a/Docs/TagInfo/mapcomplete_cyclofix.json b/Docs/TagInfo/mapcomplete_cyclofix.json
index fc5f1d19d2..7e266843e8 100644
--- a/Docs/TagInfo/mapcomplete_cyclofix.json
+++ b/Docs/TagInfo/mapcomplete_cyclofix.json
@@ -588,6 +588,25 @@
"description": "Layer 'Bike stations (repair, pump or both)' shows manometer=broken with a fixed text, namely 'There is manometer but it is broken' and allows to pick this as a default answer (in the MapComplete.osm.be theme 'Cyclofix - an open map for cyclists')",
"value": "broken"
},
+ {
+ "key": "level",
+ "description": "Layer 'Bike stations (repair, pump or both)' shows and asks freeform values for key 'level' (in the MapComplete.osm.be theme 'Cyclofix - an open map for cyclists')"
+ },
+ {
+ "key": "location",
+ "description": "Layer 'Bike stations (repair, pump or both)' shows location=underground with a fixed text, namely 'Located underground' (in the MapComplete.osm.be theme 'Cyclofix - an open map for cyclists')",
+ "value": "underground"
+ },
+ {
+ "key": "level",
+ "description": "Layer 'Bike stations (repair, pump or both)' shows level=0 with a fixed text, namely 'Located on the ground floor' and allows to pick this as a default answer (in the MapComplete.osm.be theme 'Cyclofix - an open map for cyclists')",
+ "value": "0"
+ },
+ {
+ "key": "level",
+ "description": "Layer 'Bike stations (repair, pump or both)' shows level=1 with a fixed text, namely 'Located on the first floor' and allows to pick this as a default answer (in the MapComplete.osm.be theme 'Cyclofix - an open map for cyclists')",
+ "value": "1"
+ },
{
"key": "service:bicycle:cleaning:charge",
"description": "Layer 'Bike stations (repair, pump or both)' shows and asks freeform values for key 'service:bicycle:cleaning:charge' (in the MapComplete.osm.be theme 'Cyclofix - an open map for cyclists')"
diff --git a/Docs/URL_Parameters.md b/Docs/URL_Parameters.md
index 5c3158fd7e..5b62d45996 100644
--- a/Docs/URL_Parameters.md
+++ b/Docs/URL_Parameters.md
@@ -20,158 +20,138 @@ the URL-parameters are stated in the part between the `?` and the `#`. There are
Finally, the URL-hash is the part after the `#`. It is `node/1234` in this case.
-backend
----------
-
-The OSM backend to use - can be used to redirect mapcomplete to the testing backend when using 'osm-test' The default value is _osm_
-
-
-test
-------
-
-If true, 'dryrun' mode is activated. The app will behave as normal, except that changes to OSM will be printed onto the console instead of actually uploaded to osm.org The default value is _false_
-
-
-layout
---------
-
-The layout to load into MapComplete The default value is __
-
-
-userlayout
-------------
-
-If not 'false', a custom (non-official) theme is loaded. This custom layout can be done in multiple ways:
-
-- The hash of the URL contains a base64-encoded .json-file containing the theme definition
-- The hash of the URL contains a lz-compressed .json-file, as generated by the custom theme generator
-- The parameter itself is an URL, in which case that URL will be downloaded. It should point to a .json of a theme The default value is _false_
-
-
-layer-control-toggle
+ layer-control-toggle
----------------------
-Whether or not the layer control is shown The default value is _false_
+ Whether or not the layer control is shown The default value is _false_
-tab
+ tab
-----
-The tab that is shown in the welcome-message. 0 = the explanation of the theme,1 = OSM-credits, 2 = sharescreen, 3 = more themes, 4 = about mapcomplete (user must be logged in and have >50 changesets) The default value is _0_
+ The tab that is shown in the welcome-message. 0 = the explanation of the theme,1 = OSM-credits, 2 = sharescreen, 3 = more themes, 4 = about mapcomplete (user must be logged in and have >50 changesets) The default value is _0_
-z
+ z
---
-The initial/current zoom level The default value is _14_
+ The initial/current zoom level The default value is _0_
-lat
+ lat
-----
-The initial/current latitude The default value is _51.2095_
+ The initial/current latitude The default value is _0_
-lon
+ lon
-----
-The initial/current longitude of the app The default value is _3.2228_
+ The initial/current longitude of the app The default value is _0_
-fs-userbadge
+ fs-userbadge
--------------
-Disables/Enables the user information pill (userbadge) at the top left. Disabling this disables logging in and thus disables editing all together, effectively putting MapComplete into read-only mode. The default value is _true_
+ Disables/Enables the user information pill (userbadge) at the top left. Disabling this disables logging in and thus disables editing all together, effectively putting MapComplete into read-only mode. The default value is _true_
-fs-search
+ fs-search
-----------
-Disables/Enables the search bar The default value is _true_
+ Disables/Enables the search bar The default value is _true_
-fs-layers
+ fs-layers
-----------
-Disables/Enables the layer control The default value is _true_
+ Disables/Enables the layer control The default value is _true_
-fs-add-new
+ fs-add-new
------------
-Disables/Enables the 'add new feature'-popup. (A theme without presets might not have it in the first place) The default value is _true_
+ Disables/Enables the 'add new feature'-popup. (A theme without presets might not have it in the first place) The default value is _true_
-fs-welcome-message
+ fs-welcome-message
--------------------
-Disables/enables the help menu or welcome message The default value is _true_
+ Disables/enables the help menu or welcome message The default value is _true_
-fs-iframe
+ fs-iframe
-----------
-Disables/Enables the iframe-popup The default value is _false_
+ Disables/Enables the iframe-popup The default value is _false_
-fs-more-quests
+ fs-more-quests
----------------
-Disables/Enables the 'More Quests'-tab in the welcome message The default value is _true_
+ Disables/Enables the 'More Quests'-tab in the welcome message The default value is _true_
-fs-share-screen
+ fs-share-screen
-----------------
-Disables/Enables the 'Share-screen'-tab in the welcome message The default value is _true_
+ Disables/Enables the 'Share-screen'-tab in the welcome message The default value is _true_
-fs-geolocation
+ fs-geolocation
----------------
-Disables/Enables the geolocation button The default value is _true_
+ Disables/Enables the geolocation button The default value is _true_
-fs-all-questions
+ fs-all-questions
------------------
-Always show all questions The default value is _false_
+ Always show all questions The default value is _false_
-fs-export
+ fs-export
-----------
-If set, enables the 'download'-button to download everything as geojson The default value is _false_
+ If set, enables the 'download'-button to download everything as geojson The default value is _false_
-fake-user
+ test
+------
+
+ If true, 'dryrun' mode is activated. The app will behave as normal, except that changes to OSM will be printed onto the console instead of actually uploaded to osm.org The default value is _false_
+
+
+ fake-user
-----------
-If true, 'dryrun' mode is activated and a fake user account is loaded The default value is _false_
+ If true, 'dryrun' mode is activated and a fake user account is loaded The default value is _false_
-debug
+ debug
-------
-If true, shows some extra debugging help such as all the available tags on every object The default value is _false_
+ If true, shows some extra debugging help such as all the available tags on every object The default value is _false_
-custom-css
+ backend
+---------
+
+ The OSM backend to use - can be used to redirect mapcomplete to the testing backend when using 'osm-test' The default value is _osm_
+
+
+ custom-css
------------
-If specified, the custom css from the given link will be loaded additionaly The default value is __
+ If specified, the custom css from the given link will be loaded additionaly The default value is __
-background
+ background
------------
-The id of the background layer to start with The default value is _osm_
+ The id of the background layer to start with The default value is _osm_
-oauth_token
--------------
-
-Used to complete the login No default value set
layer-
------------------
From 124220feaabb6c052880ce98dfa6c10df0b80a65 Mon Sep 17 00:00:00 2001
From: pietervdvn
Date: Sat, 24 Jul 2021 13:24:33 +0200
Subject: [PATCH 3/8] Add taginfo for openwindpower
---
.../TagInfo/mapcomplete_openwindpowermap.json | 55 +++++++++++++++++++
1 file changed, 55 insertions(+)
create mode 100644 Docs/TagInfo/mapcomplete_openwindpowermap.json
diff --git a/Docs/TagInfo/mapcomplete_openwindpowermap.json b/Docs/TagInfo/mapcomplete_openwindpowermap.json
new file mode 100644
index 0000000000..6fe84a82b8
--- /dev/null
+++ b/Docs/TagInfo/mapcomplete_openwindpowermap.json
@@ -0,0 +1,55 @@
+{
+ "data_format": 1,
+ "project": {
+ "name": "MapComplete OpenWindPowerMap",
+ "description": "A map for showing and editing wind turbines",
+ "project_url": "https://mapcomplete.osm.be/openwindpowermap",
+ "doc_url": "https://github.com/pietervdvn/MapComplete/tree/master/assets/themes/",
+ "icon_url": "https://mapcomplete.osm.be/assets/themes/openwindpowermap/wind_turbine.svg",
+ "contact_name": "Pieter Vander Vennet, Seppe Santens",
+ "contact_email": "pietervdvn@posteo.net"
+ },
+ "tags": [
+ {
+ "key": "generator:source",
+ "description": "The MapComplete theme OpenWindPowerMap has a layer wind turbine showing features with this tag",
+ "value": "wind"
+ },
+ {
+ "key": "generator:output:electricity",
+ "description": "Layer 'wind turbine' shows and asks freeform values for key 'generator:output:electricity' (in the MapComplete.osm.be theme 'OpenWindPowerMap')"
+ },
+ {
+ "key": "operator",
+ "description": "Layer 'wind turbine' shows and asks freeform values for key 'operator' (in the MapComplete.osm.be theme 'OpenWindPowerMap')"
+ },
+ {
+ "key": "height",
+ "description": "Layer 'wind turbine' shows and asks freeform values for key 'height' (in the MapComplete.osm.be theme 'OpenWindPowerMap')"
+ },
+ {
+ "key": "rotor:diameter",
+ "description": "Layer 'wind turbine' shows and asks freeform values for key 'rotor:diameter' (in the MapComplete.osm.be theme 'OpenWindPowerMap')"
+ },
+ {
+ "key": "start_date",
+ "description": "Layer 'wind turbine' shows and asks freeform values for key 'start_date' (in the MapComplete.osm.be theme 'OpenWindPowerMap')"
+ },
+ {
+ "key": "image",
+ "description": "The layer 'wind turbine allows to upload images and adds them under the 'image'-tag (and image:0, image:1, ... for multiple images). Furhtermore, this layer shows images based on the keys image, wikidata, wikipedia, wikimedia_commons and mapillary"
+ },
+ {
+ "key": "mapillary",
+ "description": "The layer 'wind turbine allows to upload images and adds them under the 'image'-tag (and image:0, image:1, ... for multiple images). Furhtermore, this layer shows images based on the keys image, wikidata, wikipedia, wikimedia_commons and mapillary"
+ },
+ {
+ "key": "wikidata",
+ "description": "The layer 'wind turbine allows to upload images and adds them under the 'image'-tag (and image:0, image:1, ... for multiple images). Furhtermore, this layer shows images based on the keys image, wikidata, wikipedia, wikimedia_commons and mapillary"
+ },
+ {
+ "key": "wikipedia",
+ "description": "The layer 'wind turbine allows to upload images and adds them under the 'image'-tag (and image:0, image:1, ... for multiple images). Furhtermore, this layer shows images based on the keys image, wikidata, wikipedia, wikimedia_commons and mapillary"
+ }
+ ]
+}
\ No newline at end of file
From 3b48e3f7694ec9e3e20cfe75a8599ec4de8f5e56 Mon Sep 17 00:00:00 2001
From: pietervdvn
Date: Sat, 24 Jul 2021 13:28:11 +0200
Subject: [PATCH 4/8] Add missing license
---
assets/svg/license_info.json | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/assets/svg/license_info.json b/assets/svg/license_info.json
index 2d0848c432..4e1b331445 100644
--- a/assets/svg/license_info.json
+++ b/assets/svg/license_info.json
@@ -1,4 +1,12 @@
[
+ {
+ "authors": [
+ "Pieter Vander Vennet"
+ ],
+ "path": "length-crosshair.svg",
+ "license": "CC0",
+ "sources": []
+ },
{
"authors": [
"Pieter Vander Vennet"
From df6a6bbbde457d7f63df2cea8957cbdf0f900e41 Mon Sep 17 00:00:00 2001
From: pietervdvn
Date: Mon, 26 Jul 2021 09:46:54 +0200
Subject: [PATCH 5/8] Enable high accuracy for watchPosition, possible fix for
#444
---
Logic/Actors/GeoLocationHandler.ts | 499 +++++++++++++++--------------
1 file changed, 251 insertions(+), 248 deletions(-)
diff --git a/Logic/Actors/GeoLocationHandler.ts b/Logic/Actors/GeoLocationHandler.ts
index 6d37e6f4ed..7bf736e3fa 100644
--- a/Logic/Actors/GeoLocationHandler.ts
+++ b/Logic/Actors/GeoLocationHandler.ts
@@ -1,262 +1,265 @@
import * as L from "leaflet";
-import { UIEventSource } from "../UIEventSource";
-import { Utils } from "../../Utils";
+import {UIEventSource} from "../UIEventSource";
+import {Utils} from "../../Utils";
import Svg from "../../Svg";
import Img from "../../UI/Base/Img";
-import { LocalStorageSource } from "../Web/LocalStorageSource";
+import {LocalStorageSource} from "../Web/LocalStorageSource";
import LayoutConfig from "../../Customizations/JSON/LayoutConfig";
-import { VariableUiElement } from "../../UI/Base/VariableUIElement";
+import {VariableUiElement} from "../../UI/Base/VariableUIElement";
export default class GeoLocationHandler extends VariableUiElement {
- /**
- * Wether or not the geolocation is active, aka the user requested the current location
- * @private
- */
- private readonly _isActive: UIEventSource;
+ /**
+ * Wether or not the geolocation is active, aka the user requested the current location
+ * @private
+ */
+ private readonly _isActive: UIEventSource;
- /**
- * Wether or not the geolocation is locked, aka the user requested the current location and wants the crosshair to follow the user
- * @private
- */
- private readonly _isLocked: UIEventSource;
+ /**
+ * Wether or not the geolocation is locked, aka the user requested the current location and wants the crosshair to follow the user
+ * @private
+ */
+ private readonly _isLocked: UIEventSource;
- /**
- * The callback over the permission API
- * @private
- */
- private readonly _permission: UIEventSource;
- /***
- * The marker on the map, in order to update it
- * @private
- */
- private _marker: L.Marker;
- /**
- * Literally: _currentGPSLocation.data != undefined
- * @private
- */
- private readonly _hasLocation: UIEventSource;
- private readonly _currentGPSLocation: UIEventSource<{
- latlng: any;
- accuracy: number;
- }>;
- /**
- * Kept in order to update the marker
- * @private
- */
- private readonly _leafletMap: UIEventSource;
- /**
- * The date when the user requested the geolocation. If we have a location, it'll autozoom to it the first 30 secs
- * @private
- */
- private _lastUserRequest: Date;
- /**
- * A small flag on localstorage. If the user previously granted the geolocation, it will be set.
- * On firefox, the permissions api is broken (probably fingerprint resistiance) and "granted + don't ask again" doesn't stick between sessions.
- *
- * Instead, we set this flag. If this flag is set upon loading the page, we start geolocating immediately.
- * If the user denies the geolocation this time, we unset this flag
- * @private
- */
- private readonly _previousLocationGrant: UIEventSource;
- private readonly _layoutToUse: UIEventSource;
+ /**
+ * The callback over the permission API
+ * @private
+ */
+ private readonly _permission: UIEventSource;
+ /***
+ * The marker on the map, in order to update it
+ * @private
+ */
+ private _marker: L.Marker;
+ /**
+ * Literally: _currentGPSLocation.data != undefined
+ * @private
+ */
+ private readonly _hasLocation: UIEventSource;
+ private readonly _currentGPSLocation: UIEventSource<{
+ latlng: any;
+ accuracy: number;
+ }>;
+ /**
+ * Kept in order to update the marker
+ * @private
+ */
+ private readonly _leafletMap: UIEventSource;
+ /**
+ * The date when the user requested the geolocation. If we have a location, it'll autozoom to it the first 30 secs
+ * @private
+ */
+ private _lastUserRequest: Date;
+ /**
+ * A small flag on localstorage. If the user previously granted the geolocation, it will be set.
+ * On firefox, the permissions api is broken (probably fingerprint resistiance) and "granted + don't ask again" doesn't stick between sessions.
+ *
+ * Instead, we set this flag. If this flag is set upon loading the page, we start geolocating immediately.
+ * If the user denies the geolocation this time, we unset this flag
+ * @private
+ */
+ private readonly _previousLocationGrant: UIEventSource;
+ private readonly _layoutToUse: UIEventSource;
- constructor(
- currentGPSLocation: UIEventSource<{ latlng: any; accuracy: number }>,
- leafletMap: UIEventSource,
- layoutToUse: UIEventSource
- ) {
- const hasLocation = currentGPSLocation.map(
- (location) => location !== undefined
- );
- const previousLocationGrant = LocalStorageSource.Get(
- "geolocation-permissions"
- );
- const isActive = new UIEventSource(false);
- const isLocked = new UIEventSource(false);
-
- super(
- hasLocation.map(
- (hasLocationData) => {
- if (isLocked.data) {
- return Svg.crosshair_locked_ui();
- } else if (hasLocationData) {
- return Svg.crosshair_blue_ui();
- } else if (isActive.data) {
- return Svg.crosshair_blue_center_ui();
- } else {
- return Svg.crosshair_ui();
- }
- },
- [isActive, isLocked]
- )
- );
- this._isActive = isActive;
- this._isLocked = isLocked;
- this._permission = new UIEventSource("");
- this._previousLocationGrant = previousLocationGrant;
- this._currentGPSLocation = currentGPSLocation;
- this._leafletMap = leafletMap;
- this._layoutToUse = layoutToUse;
- this._hasLocation = hasLocation;
- const self = this;
-
- const currentPointer = this._isActive.map(
- (isActive) => {
- if (isActive && !self._hasLocation.data) {
- return "cursor-wait";
- }
- return "cursor-pointer";
- },
- [this._hasLocation]
- );
- currentPointer.addCallbackAndRun((pointerClass) => {
- self.SetClass(pointerClass);
- });
-
- this.onClick(() => {
- if (self._hasLocation.data) {
- self._isLocked.setData(!self._isLocked.data);
- }
- self.init(true);
- });
- this.init(false);
-
- this._currentGPSLocation.addCallback((location) => {
- self._previousLocationGrant.setData("granted");
-
- const timeSinceRequest =
- (new Date().getTime() - (self._lastUserRequest?.getTime() ?? 0)) / 1000;
- if (timeSinceRequest < 30) {
- self.MoveToCurrentLoction(16);
- } else if (self._isLocked.data) {
- self.MoveToCurrentLoction();
- }
-
- let color = "#1111cc";
- try {
- color = getComputedStyle(document.body).getPropertyValue(
- "--catch-detail-color"
- );
- } catch (e) {
- console.error(e);
- }
- const icon = L.icon({
- iconUrl: Img.AsData(Svg.crosshair.replace(/#000000/g, color)),
- iconSize: [40, 40], // size of the icon
- iconAnchor: [20, 20], // point of the icon which will correspond to marker's location
- });
-
- const map = self._leafletMap.data;
-
- const newMarker = L.marker(location.latlng, { icon: icon });
- newMarker.addTo(map);
-
- if (self._marker !== undefined) {
- map.removeLayer(self._marker);
- }
- self._marker = newMarker;
- });
- }
-
- private init(askPermission: boolean) {
- const self = this;
-
- if (self._isActive.data) {
- self.MoveToCurrentLoction(16);
- return;
- }
-
- try {
- navigator?.permissions
- ?.query({ name: "geolocation" })
- ?.then(function (status) {
- console.log("Geolocation is already", status);
- if (status.state === "granted") {
- self.StartGeolocating(false);
- }
- self._permission.setData(status.state);
- status.onchange = function () {
- self._permission.setData(status.state);
- };
- });
- } catch (e) {
- console.error(e);
- }
-
- if (askPermission) {
- self.StartGeolocating(true);
- } else if (this._previousLocationGrant.data === "granted") {
- this._previousLocationGrant.setData("");
- self.StartGeolocating(false);
- }
- }
-
- private MoveToCurrentLoction(targetZoom?: number) {
- const location = this._currentGPSLocation.data;
- this._lastUserRequest = undefined;
-
- if (
- this._currentGPSLocation.data.latlng[0] === 0 &&
- this._currentGPSLocation.data.latlng[1] === 0
+ constructor(
+ currentGPSLocation: UIEventSource<{ latlng: any; accuracy: number }>,
+ leafletMap: UIEventSource,
+ layoutToUse: UIEventSource
) {
- console.debug("Not moving to GPS-location: it is null island");
- return;
- }
+ const hasLocation = currentGPSLocation.map(
+ (location) => location !== undefined
+ );
+ const previousLocationGrant = LocalStorageSource.Get(
+ "geolocation-permissions"
+ );
+ const isActive = new UIEventSource(false);
+ const isLocked = new UIEventSource(false);
- // We check that the GPS location is not out of bounds
- const b = this._layoutToUse.data.lockLocation;
- let inRange = true;
- if (b) {
- if (b !== true) {
- // B is an array with our locklocation
- inRange =
- b[0][0] <= location.latlng[0] &&
- location.latlng[0] <= b[1][0] &&
- b[0][1] <= location.latlng[1] &&
- location.latlng[1] <= b[1][1];
- }
- }
- if (!inRange) {
- console.log(
- "Not zooming to GPS location: out of bounds",
- b,
- location.latlng
- );
- } else {
- this._leafletMap.data.setView(location.latlng, targetZoom);
- }
- }
+ super(
+ hasLocation.map(
+ (hasLocationData) => {
+ if (isLocked.data) {
+ return Svg.crosshair_locked_ui();
+ } else if (hasLocationData) {
+ return Svg.crosshair_blue_ui();
+ } else if (isActive.data) {
+ return Svg.crosshair_blue_center_ui();
+ } else {
+ return Svg.crosshair_ui();
+ }
+ },
+ [isActive, isLocked]
+ )
+ );
+ this._isActive = isActive;
+ this._isLocked = isLocked;
+ this._permission = new UIEventSource("");
+ this._previousLocationGrant = previousLocationGrant;
+ this._currentGPSLocation = currentGPSLocation;
+ this._leafletMap = leafletMap;
+ this._layoutToUse = layoutToUse;
+ this._hasLocation = hasLocation;
+ const self = this;
- private StartGeolocating(zoomToGPS = true) {
- const self = this;
- console.log("Starting geolocation");
-
- this._lastUserRequest = zoomToGPS ? new Date() : new Date(0);
- if (self._permission.data === "denied") {
- self._previousLocationGrant.setData("");
- return "";
- }
- if (this._currentGPSLocation.data !== undefined) {
- this.MoveToCurrentLoction(16);
- }
-
- console.log("Searching location using GPS");
-
- if (self._isActive.data) {
- return;
- }
- self._isActive.setData(true);
-
- navigator.geolocation.watchPosition(
- function (position) {
- self._currentGPSLocation.setData({
- latlng: [position.coords.latitude, position.coords.longitude],
- accuracy: position.coords.accuracy,
+ const currentPointer = this._isActive.map(
+ (isActive) => {
+ if (isActive && !self._hasLocation.data) {
+ return "cursor-wait";
+ }
+ return "cursor-pointer";
+ },
+ [this._hasLocation]
+ );
+ currentPointer.addCallbackAndRun((pointerClass) => {
+ self.SetClass(pointerClass);
});
- },
- function () {
- console.warn("Could not get location with navigator.geolocation");
- }
- );
- }
+
+ this.onClick(() => {
+ if (self._hasLocation.data) {
+ self._isLocked.setData(!self._isLocked.data);
+ }
+ self.init(true);
+ });
+ this.init(false);
+
+ this._currentGPSLocation.addCallback((location) => {
+ self._previousLocationGrant.setData("granted");
+
+ const timeSinceRequest =
+ (new Date().getTime() - (self._lastUserRequest?.getTime() ?? 0)) / 1000;
+ if (timeSinceRequest < 30) {
+ self.MoveToCurrentLoction(16);
+ } else if (self._isLocked.data) {
+ self.MoveToCurrentLoction();
+ }
+
+ let color = "#1111cc";
+ try {
+ color = getComputedStyle(document.body).getPropertyValue(
+ "--catch-detail-color"
+ );
+ } catch (e) {
+ console.error(e);
+ }
+ const icon = L.icon({
+ iconUrl: Img.AsData(Svg.crosshair.replace(/#000000/g, color)),
+ iconSize: [40, 40], // size of the icon
+ iconAnchor: [20, 20], // point of the icon which will correspond to marker's location
+ });
+
+ const map = self._leafletMap.data;
+
+ const newMarker = L.marker(location.latlng, {icon: icon});
+ newMarker.addTo(map);
+
+ if (self._marker !== undefined) {
+ map.removeLayer(self._marker);
+ }
+ self._marker = newMarker;
+ });
+ }
+
+ private init(askPermission: boolean) {
+ const self = this;
+
+ if (self._isActive.data) {
+ self.MoveToCurrentLoction(16);
+ return;
+ }
+
+ try {
+ navigator?.permissions
+ ?.query({name: "geolocation"})
+ ?.then(function (status) {
+ console.log("Geolocation is already", status);
+ if (status.state === "granted") {
+ self.StartGeolocating(false);
+ }
+ self._permission.setData(status.state);
+ status.onchange = function () {
+ self._permission.setData(status.state);
+ };
+ });
+ } catch (e) {
+ console.error(e);
+ }
+
+ if (askPermission) {
+ self.StartGeolocating(true);
+ } else if (this._previousLocationGrant.data === "granted") {
+ this._previousLocationGrant.setData("");
+ self.StartGeolocating(false);
+ }
+ }
+
+ private MoveToCurrentLoction(targetZoom?: number) {
+ const location = this._currentGPSLocation.data;
+ this._lastUserRequest = undefined;
+
+ if (
+ this._currentGPSLocation.data.latlng[0] === 0 &&
+ this._currentGPSLocation.data.latlng[1] === 0
+ ) {
+ console.debug("Not moving to GPS-location: it is null island");
+ return;
+ }
+
+ // We check that the GPS location is not out of bounds
+ const b = this._layoutToUse.data.lockLocation;
+ let inRange = true;
+ if (b) {
+ if (b !== true) {
+ // B is an array with our locklocation
+ inRange =
+ b[0][0] <= location.latlng[0] &&
+ location.latlng[0] <= b[1][0] &&
+ b[0][1] <= location.latlng[1] &&
+ location.latlng[1] <= b[1][1];
+ }
+ }
+ if (!inRange) {
+ console.log(
+ "Not zooming to GPS location: out of bounds",
+ b,
+ location.latlng
+ );
+ } else {
+ this._leafletMap.data.setView(location.latlng, targetZoom);
+ }
+ }
+
+ private StartGeolocating(zoomToGPS = true) {
+ const self = this;
+ console.log("Starting geolocation");
+
+ this._lastUserRequest = zoomToGPS ? new Date() : new Date(0);
+ if (self._permission.data === "denied") {
+ self._previousLocationGrant.setData("");
+ return "";
+ }
+ if (this._currentGPSLocation.data !== undefined) {
+ this.MoveToCurrentLoction(16);
+ }
+
+ console.log("Searching location using GPS");
+
+ if (self._isActive.data) {
+ return;
+ }
+ self._isActive.setData(true);
+
+ navigator.geolocation.watchPosition(
+ function (position) {
+ self._currentGPSLocation.setData({
+ latlng: [position.coords.latitude, position.coords.longitude],
+ accuracy: position.coords.accuracy,
+ });
+ },
+ function () {
+ console.warn("Could not get location with navigator.geolocation");
+ },
+ {
+ enableHighAccuracy: true
+ }
+ );
+ }
}
From bca995b985615137f7835155e0bd15edc5686e68 Mon Sep 17 00:00:00 2001
From: pietervdvn
Date: Mon, 26 Jul 2021 09:50:55 +0200
Subject: [PATCH 6/8] s/maps.me/organic maps/g; fix #443
---
langs/en.json | 2 +-
langs/ja.json | 2 +-
langs/nl.json | 2 +-
langs/ru.json | 2 +-
langs/zh_Hant.json | 2 +-
5 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/langs/en.json b/langs/en.json
index aac35335c1..bc1098e34d 100644
--- a/langs/en.json
+++ b/langs/en.json
@@ -56,7 +56,7 @@
"loginWithOpenStreetMap": "Login with OpenStreetMap",
"welcomeBack": "You are logged in, welcome back!",
"loginToStart": "Login to answer this question",
- "openStreetMapIntro": "An Open Map
Wouldn't it be cool if there was a single map, which everyone could freely use and edit? A single place to store all geo-information? Then, all those websites with different, small and incompatible maps (which are always outdated) wouldn't be needed anymore.
OpenStreetMap is this map. The map data can be used for free (with attribution and publication of changes to that data). On top of that, everyone can freely add new data and fix errors. This website uses OpenStreetMap as well. All the data is from there, and your answers and corrections are added there as well.
A ton of people and application already use OpenStreetMap: Maps.me, OsmAnd, but also the maps at Facebook, Instagram, Apple-maps and Bing-maps are (partly) powered by OpenStreetMap. If you change something here, it'll be reflected in those applications too - after their next update!
",
+ "openStreetMapIntro": "An Open Map
Wouldn't it be cool if there was a single map, which everyone could freely use and edit? A single place to store all geo-information? Then, all those websites with different, small and incompatible maps (which are always outdated) wouldn't be needed anymore.
OpenStreetMap is this map. The map data can be used for free (with attribution and publication of changes to that data). On top of that, everyone can freely add new data and fix errors. This website uses OpenStreetMap as well. All the data is from there, and your answers and corrections are added there as well.
A ton of people and application already use OpenStreetMap: Organic Maps, OsmAnd, but also the maps at Facebook, Instagram, Apple-maps and Bing-maps are (partly) powered by OpenStreetMap. If you change something here, it'll be reflected in those applications too - after their next update!
",
"search": {
"search": "Search a location",
"searching": "Searching…",
diff --git a/langs/ja.json b/langs/ja.json
index a2ecbc58c2..908681485d 100644
--- a/langs/ja.json
+++ b/langs/ja.json
@@ -126,7 +126,7 @@
"goToInbox": "受信トレイを開く",
"fewChangesBefore": "新しいポイントを追加する前に、既存のポイントに関するいくつかの質問に答えてください。",
"readYourMessages": "新しいポイントを追加する前に、OpenStreetMapのメッセージをすべて読んでください。",
- "openStreetMapIntro": "オープン地図
誰もが自由に使用して編集できる1つのマップがあればクールではないでしょうか?すべての地理情報を格納するための単一の場所?そうすれば、異なる、小さくて互換性のない地図(常に時代遅れのもの)を持つウェブサイトは、必要なくなるでしょう。
OpenStreetMapこそが地図です。地図データは、(データ変更の公開と帰属表示をすれば)無料で利用できます。さらに、誰でも自由に新しいデータを追加したり、間違いを修正したりすることができます。このサイトでもOpenStreetMapを使っています。すべてのデータは、OSMからのものであり、あなたの答えと訂正もOSMに追加されます。
すでに多くの人やアプリケーションがOpenStreetMapを使っています:Maps.meや、OsmAndなど。Fさらに、acebook、Instagram、Apple-maps、Bing-mapsも(部分的に)OpenStreetMapを利用しています。ここで何かを変更すると、次の更新後にアプリケーションにも反映されます。
",
+ "openStreetMapIntro": "オープン地図
誰もが自由に使用して編集できる1つのマップがあればクールではないでしょうか?すべての地理情報を格納するための単一の場所?そうすれば、異なる、小さくて互換性のない地図(常に時代遅れのもの)を持つウェブサイトは、必要なくなるでしょう。
OpenStreetMapこそが地図です。地図データは、(データ変更の公開と帰属表示をすれば)無料で利用できます。さらに、誰でも自由に新しいデータを追加したり、間違いを修正したりすることができます。このサイトでもOpenStreetMapを使っています。すべてのデータは、OSMからのものであり、あなたの答えと訂正もOSMに追加されます。
すでに多くの人やアプリケーションがOpenStreetMapを使っています:Maps.meや、OsmAndなど。Fさらに、acebook、Instagram、Apple-maps、Bing-mapsも(部分的に)OpenStreetMapを利用しています。ここで何かを変更すると、次の更新後にアプリケーションにも反映されます。
",
"noNameCategory": "名前のない {category}",
"pickLanguage": "言語を選択します: ",
"number": "number",
diff --git a/langs/nl.json b/langs/nl.json
index 31b6109ff4..9b54b354d0 100644
--- a/langs/nl.json
+++ b/langs/nl.json
@@ -69,7 +69,7 @@
"emailOf": "Wat is het email-adres van {category}?",
"emailIs": "Het email-adres van {category} is {email}"
},
- "openStreetMapIntro": "Een open kaart
Zou het niet fantastisch zijn als er een open kaart zou zijn die door iedereen aangepast én gebruikt kan worden? Een kaart waar iedereen zijn interesses aan zou kunnen toevoegen? Dan zouden er geen duizend-en-één verschillende kleine kaartjes, websites, ... meer nodig zijn
OpenStreetMap is deze open kaart. Je mag de kaartdata gratis gebruiken (mits bronvermelding en herpublicatie van aanpassingen). Daarenboven mag je de kaart ook gratis aanpassen als je een account maakt. Ook deze website is gebaseerd op OpenStreetMap. Als je hier een vraag beantwoord, gaat het antwoord daar ook naartoe
Tenslotte zijn er reeds vele gebruikers van OpenStreetMap. Denk maar Maps.me, OsmAnd, verschillende gespecialiseerde routeplanners, de achtergrondkaarten op Facebook, Instagram,...
Zelfs Apple Maps en Bing-Maps gebruiken OpenStreetMap in hun kaarten!
Kortom, als je hier een punt toevoegd of een vraag beantwoord, zal dat na een tijdje ook in al dié applicaties te zien zijn.
",
+ "openStreetMapIntro": "Een open kaart
Zou het niet fantastisch zijn als er een open kaart zou zijn die door iedereen aangepast én gebruikt kan worden? Een kaart waar iedereen zijn interesses aan zou kunnen toevoegen? Dan zouden er geen duizend-en-één verschillende kleine kaartjes, websites, ... meer nodig zijn
OpenStreetMap is deze open kaart. Je mag de kaartdata gratis gebruiken (mits bronvermelding en herpublicatie van aanpassingen). Daarenboven mag je de kaart ook gratis aanpassen als je een account maakt. Ook deze website is gebaseerd op OpenStreetMap. Als je hier een vraag beantwoord, gaat het antwoord daar ook naartoe
Tenslotte zijn er reeds vele gebruikers van OpenStreetMap. Denk maar Organic Maps, OsmAnd, verschillende gespecialiseerde routeplanners, de achtergrondkaarten op Facebook, Instagram,...
Zelfs Apple Maps en Bing-Maps gebruiken OpenStreetMap in hun kaarten!
Kortom, als je hier een punt toevoegd of een vraag beantwoord, zal dat na een tijdje ook in al dié applicaties te zien zijn.
",
"attribution": {
"attributionTitle": "Met dank aan",
"attributionContent": "Alle data is voorzien door OpenStreetMap, gratis en vrij te hergebruiken onder de Open DataBase Licentie.
",
diff --git a/langs/ru.json b/langs/ru.json
index 19feb61d8f..af43acac2e 100644
--- a/langs/ru.json
+++ b/langs/ru.json
@@ -121,7 +121,7 @@
"attributionContent": "Все данные предоставлены OpenStreetMap, свободное повторное использование согласно Open DataBase License.
",
"attributionTitle": "Уведомление об авторстве"
},
- "openStreetMapIntro": "Свободная карта
Было бы здорово если бы была одна карта, которую каждый может свободно использовать и редактировать? Использовать как общее хранилище для всей гео-информации? Тогда, все сайты с разной, неполной и несовместимой информацией (которая обычно устарела) будут больше не нужны.
OpenStreetMap такая карта. Данные карты могу быть свободно использованы (с аннотацией и публикацией изменений к данным). Более того, каждый может свободно добавлять информацию и исправлять ошибки. Этот сайт также использует OpenStreetMap. Все данные берутся оттуда, а ваши ответы и исправления отправляются обратно туда.
Огромное количество людей уже использует OpenStreetMap: Maps.me, OsmAnd, а также карты в Facebook, Instagram, Apple-карты и Bing-карты (частично) используют OpenStreetMap. Если вы что-то измените здесь, это также будет отражено в этих приложениях - после их следующего обновления!
"
+ "openStreetMapIntro": "Свободная карта
Было бы здорово если бы была одна карта, которую каждый может свободно использовать и редактировать? Использовать как общее хранилище для всей гео-информации? Тогда, все сайты с разной, неполной и несовместимой информацией (которая обычно устарела) будут больше не нужны.
OpenStreetMap такая карта. Данные карты могу быть свободно использованы (с аннотацией и публикацией изменений к данным). Более того, каждый может свободно добавлять информацию и исправлять ошибки. Этот сайт также использует OpenStreetMap. Все данные берутся оттуда, а ваши ответы и исправления отправляются обратно туда.
Огромное количество людей уже использует OpenStreetMap: Organic Maps, OsmAnd, а также карты в Facebook, Instagram, Apple-карты и Bing-карты (частично) используют OpenStreetMap. Если вы что-то измените здесь, это также будет отражено в этих приложениях - после их следующего обновления!
"
},
"index": {
"pickTheme": "Выберите тему ниже, чтобы начать.",
diff --git a/langs/zh_Hant.json b/langs/zh_Hant.json
index 4aae9b875c..e98a31535f 100644
--- a/langs/zh_Hant.json
+++ b/langs/zh_Hant.json
@@ -101,7 +101,7 @@
"attributionContent": "所有資料由開放街圖提供,在開放資料庫授權條款之下自由再利用。
",
"attributionTitle": "署名通知"
},
- "openStreetMapIntro": "開放的地圖
如果有一份地圖,任何人都能自由使用與編輯,單一的地圖能夠儲存所有地理相關資訊?這樣不就很酷嗎?接著,所有的網站使用不同的、範圍小的,不相容的地圖 (通常也都過時了),也就不再需要了。
開放街圖就是這樣的地圖,人人都能免費這些圖資 (只要署名與公開變動這資料)。只要遵循這些,任何人都能自由新增新資料與修正錯誤,這些網站也都使用開放街圖,資料也都來自開放街圖,你的答案與修正也會加到開放街圖上面。
許多人與應用程式已經採用開放街圖了:Maps.me、OsmAnd,還有 Facebook、Instagram,蘋果地圖、Bing 地圖(部分)採用開放街圖。如果你在開放街圖上變動資料,也會同時影響這些應用 - 在他們下次更新資料之後!
",
+ "openStreetMapIntro": "開放的地圖
如果有一份地圖,任何人都能自由使用與編輯,單一的地圖能夠儲存所有地理相關資訊?這樣不就很酷嗎?接著,所有的網站使用不同的、範圍小的,不相容的地圖 (通常也都過時了),也就不再需要了。
開放街圖就是這樣的地圖,人人都能免費這些圖資 (只要署名與公開變動這資料)。只要遵循這些,任何人都能自由新增新資料與修正錯誤,這些網站也都使用開放街圖,資料也都來自開放街圖,你的答案與修正也會加到開放街圖上面。
許多人與應用程式已經採用開放街圖了:Organic Maps、OsmAnd,還有 Facebook、Instagram,蘋果地圖、Bing 地圖(部分)採用開放街圖。如果你在開放街圖上變動資料,也會同時影響這些應用 - 在他們下次更新資料之後!
",
"questions": {
"emailIs": "{category} 的電子郵件地址是{email}",
"emailOf": "{category} 的電子郵件地址是?",
From 177649614dfed99777988468640e4cd1dc158538 Mon Sep 17 00:00:00 2001
From: pietervdvn
Date: Mon, 26 Jul 2021 10:13:50 +0200
Subject: [PATCH 7/8] Rename some themes for more consistency, check of
theme-ids, see #431
---
assets/themes/artwork/artwork.json | 4 +--
.../bicyclelib.json} | 0
.../license_info.json | 0
.../{bicycle_library => bicyclelib}/logo.svg | 0
.../{Bookcases.json => bookcases.json} | 0
.../Barßel_Wohnmobilstellplatz.jpg | Bin
.../campersite.json} | 0
.../{campersites => campersite}/caravan.svg | 0
.../caravan_green.svg | 0
.../license_info.json | 0
.../sanitary_dump_station.svg | 0
assets/themes/cyclestreets/cyclestreets.json | 6 ++---
assets/themes/fruit_trees/fruit_trees.json | 4 +--
.../personal.json} | 0
.../cam_left.svg | 0
.../cam_right.svg | 0
.../custom_theme.css | 0
.../dome.svg | 0
.../license_info.json | 0
.../logo.svg | 0
.../surveillance.json} | 0
langs/layers/ru.json | 10 ++------
langs/shared-questions/de.json | 23 +----------------
langs/shared-questions/ru.json | 16 +-----------
langs/themes/de.json | 2 +-
langs/themes/en.json | 4 +--
langs/themes/es.json | 2 +-
langs/themes/fr.json | 2 +-
langs/themes/hu.json | 2 +-
langs/themes/id.json | 2 +-
langs/themes/it.json | 4 +--
langs/themes/ja.json | 4 +--
langs/themes/nb_NO.json | 4 +--
langs/themes/nl.json | 8 +++---
langs/themes/ru.json | 4 +--
langs/themes/sv.json | 2 +-
langs/themes/zh_Hant.json | 4 +--
scripts/generateLayerOverview.ts | 24 ++++++++++++------
38 files changed, 49 insertions(+), 82 deletions(-)
rename assets/themes/{bicycle_library/bicycle_library.json => bicyclelib/bicyclelib.json} (100%)
rename assets/themes/{bicycle_library => bicyclelib}/license_info.json (100%)
rename assets/themes/{bicycle_library => bicyclelib}/logo.svg (100%)
rename assets/themes/bookcases/{Bookcases.json => bookcases.json} (100%)
rename assets/themes/{campersites => campersite}/Barßel_Wohnmobilstellplatz.jpg (100%)
rename assets/themes/{campersites/campersites.json => campersite/campersite.json} (100%)
rename assets/themes/{campersites => campersite}/caravan.svg (100%)
rename assets/themes/{campersites => campersite}/caravan_green.svg (100%)
rename assets/themes/{campersites => campersite}/license_info.json (100%)
rename assets/themes/{campersites => campersite}/sanitary_dump_station.svg (100%)
rename assets/themes/{personalLayout/personalLayout.json => personal/personal.json} (100%)
rename assets/themes/{surveillance_cameras => surveillance}/cam_left.svg (100%)
rename assets/themes/{surveillance_cameras => surveillance}/cam_right.svg (100%)
rename assets/themes/{surveillance_cameras => surveillance}/custom_theme.css (100%)
rename assets/themes/{surveillance_cameras => surveillance}/dome.svg (100%)
rename assets/themes/{surveillance_cameras => surveillance}/license_info.json (100%)
rename assets/themes/{surveillance_cameras => surveillance}/logo.svg (100%)
rename assets/themes/{surveillance_cameras/surveillance_cameras.json => surveillance/surveillance.json} (100%)
diff --git a/assets/themes/artwork/artwork.json b/assets/themes/artwork/artwork.json
index c3b7b7c552..454ff9eac1 100644
--- a/assets/themes/artwork/artwork.json
+++ b/assets/themes/artwork/artwork.json
@@ -1,5 +1,5 @@
{
- "id": "artworks",
+ "id": "artwork",
"version": "2020-08-30",
"title": {
"en": "Open Artwork Map",
@@ -429,4 +429,4 @@
]
}
]
-}
\ No newline at end of file
+}
diff --git a/assets/themes/bicycle_library/bicycle_library.json b/assets/themes/bicyclelib/bicyclelib.json
similarity index 100%
rename from assets/themes/bicycle_library/bicycle_library.json
rename to assets/themes/bicyclelib/bicyclelib.json
diff --git a/assets/themes/bicycle_library/license_info.json b/assets/themes/bicyclelib/license_info.json
similarity index 100%
rename from assets/themes/bicycle_library/license_info.json
rename to assets/themes/bicyclelib/license_info.json
diff --git a/assets/themes/bicycle_library/logo.svg b/assets/themes/bicyclelib/logo.svg
similarity index 100%
rename from assets/themes/bicycle_library/logo.svg
rename to assets/themes/bicyclelib/logo.svg
diff --git a/assets/themes/bookcases/Bookcases.json b/assets/themes/bookcases/bookcases.json
similarity index 100%
rename from assets/themes/bookcases/Bookcases.json
rename to assets/themes/bookcases/bookcases.json
diff --git a/assets/themes/campersites/Barßel_Wohnmobilstellplatz.jpg b/assets/themes/campersite/Barßel_Wohnmobilstellplatz.jpg
similarity index 100%
rename from assets/themes/campersites/Barßel_Wohnmobilstellplatz.jpg
rename to assets/themes/campersite/Barßel_Wohnmobilstellplatz.jpg
diff --git a/assets/themes/campersites/campersites.json b/assets/themes/campersite/campersite.json
similarity index 100%
rename from assets/themes/campersites/campersites.json
rename to assets/themes/campersite/campersite.json
diff --git a/assets/themes/campersites/caravan.svg b/assets/themes/campersite/caravan.svg
similarity index 100%
rename from assets/themes/campersites/caravan.svg
rename to assets/themes/campersite/caravan.svg
diff --git a/assets/themes/campersites/caravan_green.svg b/assets/themes/campersite/caravan_green.svg
similarity index 100%
rename from assets/themes/campersites/caravan_green.svg
rename to assets/themes/campersite/caravan_green.svg
diff --git a/assets/themes/campersites/license_info.json b/assets/themes/campersite/license_info.json
similarity index 100%
rename from assets/themes/campersites/license_info.json
rename to assets/themes/campersite/license_info.json
diff --git a/assets/themes/campersites/sanitary_dump_station.svg b/assets/themes/campersite/sanitary_dump_station.svg
similarity index 100%
rename from assets/themes/campersites/sanitary_dump_station.svg
rename to assets/themes/campersite/sanitary_dump_station.svg
diff --git a/assets/themes/cyclestreets/cyclestreets.json b/assets/themes/cyclestreets/cyclestreets.json
index b3b3abbf4c..a09314b9d3 100644
--- a/assets/themes/cyclestreets/cyclestreets.json
+++ b/assets/themes/cyclestreets/cyclestreets.json
@@ -1,5 +1,5 @@
{
- "id": "fietsstraten",
+ "id": "cyclestreets",
"version": "2020-08-30",
"title": {
"nl": "Fietsstraten",
@@ -68,7 +68,7 @@
]
},
"then": {
- "nl": "Deze straat is een fietsstraat",
+ "nl": "Deze straat i een fietsstraat",
"en": "This street is a cyclestreet",
"ja": "この通りはcyclestreetだ",
"nb_NO": "Denne gaten er en sykkelvei"
@@ -279,4 +279,4 @@
]
}
]
-}
\ No newline at end of file
+}
diff --git a/assets/themes/fruit_trees/fruit_trees.json b/assets/themes/fruit_trees/fruit_trees.json
index dc59132c91..d16dd377be 100644
--- a/assets/themes/fruit_trees/fruit_trees.json
+++ b/assets/themes/fruit_trees/fruit_trees.json
@@ -1,5 +1,5 @@
{
- "id": "boomgaarden",
+ "id": "fruit_trees",
"title": {
"nl": "Open Boomgaardenkaart"
},
@@ -172,4 +172,4 @@
}
],
"roamingRenderings": []
-}
\ No newline at end of file
+}
diff --git a/assets/themes/personalLayout/personalLayout.json b/assets/themes/personal/personal.json
similarity index 100%
rename from assets/themes/personalLayout/personalLayout.json
rename to assets/themes/personal/personal.json
diff --git a/assets/themes/surveillance_cameras/cam_left.svg b/assets/themes/surveillance/cam_left.svg
similarity index 100%
rename from assets/themes/surveillance_cameras/cam_left.svg
rename to assets/themes/surveillance/cam_left.svg
diff --git a/assets/themes/surveillance_cameras/cam_right.svg b/assets/themes/surveillance/cam_right.svg
similarity index 100%
rename from assets/themes/surveillance_cameras/cam_right.svg
rename to assets/themes/surveillance/cam_right.svg
diff --git a/assets/themes/surveillance_cameras/custom_theme.css b/assets/themes/surveillance/custom_theme.css
similarity index 100%
rename from assets/themes/surveillance_cameras/custom_theme.css
rename to assets/themes/surveillance/custom_theme.css
diff --git a/assets/themes/surveillance_cameras/dome.svg b/assets/themes/surveillance/dome.svg
similarity index 100%
rename from assets/themes/surveillance_cameras/dome.svg
rename to assets/themes/surveillance/dome.svg
diff --git a/assets/themes/surveillance_cameras/license_info.json b/assets/themes/surveillance/license_info.json
similarity index 100%
rename from assets/themes/surveillance_cameras/license_info.json
rename to assets/themes/surveillance/license_info.json
diff --git a/assets/themes/surveillance_cameras/logo.svg b/assets/themes/surveillance/logo.svg
similarity index 100%
rename from assets/themes/surveillance_cameras/logo.svg
rename to assets/themes/surveillance/logo.svg
diff --git a/assets/themes/surveillance_cameras/surveillance_cameras.json b/assets/themes/surveillance/surveillance.json
similarity index 100%
rename from assets/themes/surveillance_cameras/surveillance_cameras.json
rename to assets/themes/surveillance/surveillance.json
diff --git a/langs/layers/ru.json b/langs/layers/ru.json
index c0f5353343..0cd328a6ae 100644
--- a/langs/layers/ru.json
+++ b/langs/layers/ru.json
@@ -487,11 +487,6 @@
}
}
}
- },
- "presets": {
- "0": {
- "title": "Обслуживание велосипедов/магазин"
- }
}
},
"defibrillator": {
@@ -1069,7 +1064,6 @@
"1": {
"question": "Вы хотите добавить описание?"
}
- },
- "name": "Смотровая площадка"
+ }
}
-}
+}
\ No newline at end of file
diff --git a/langs/shared-questions/de.json b/langs/shared-questions/de.json
index 6faff774e2..ff0b97af86 100644
--- a/langs/shared-questions/de.json
+++ b/langs/shared-questions/de.json
@@ -6,27 +6,6 @@
"opening_hours": {
"question": "Was sind die Öffnungszeiten von {name}?",
"render": "Öffnungszeiten
{opening_hours_table(opening_hours)}"
- },
- "level": {
- "mappings": {
- "2": {
- "then": "Ist im ersten Stock"
- },
- "1": {
- "then": "Ist im Erdgeschoss"
- }
- },
- "render": "Befindet sich im {level}ten Stock",
- "question": "In welchem Stockwerk befindet sich dieses Objekt?"
- },
- "description": {
- "question": "Gibt es noch etwas, das die vorhergehenden Fragen nicht abgedeckt haben? Hier wäre Platz dafür.
Bitte keine bereits erhobenen Informationen."
- },
- "website": {
- "question": "Was ist die Website von {name}?"
- },
- "email": {
- "question": "Was ist die Mail-Adresse von {name}?"
}
}
-}
+}
\ No newline at end of file
diff --git a/langs/shared-questions/ru.json b/langs/shared-questions/ru.json
index 93c56dc441..a06bc76078 100644
--- a/langs/shared-questions/ru.json
+++ b/langs/shared-questions/ru.json
@@ -15,20 +15,6 @@
"opening_hours": {
"question": "Какое время работы у {name}?",
"render": "Часы работы
{opening_hours_table(opening_hours)}"
- },
- "level": {
- "mappings": {
- "2": {
- "then": "Расположено на первом этаже"
- },
- "1": {
- "then": "Расположено на первом этаже"
- },
- "0": {
- "then": "Расположено под землей"
- }
- },
- "render": "Расположено на {level}ом этаже"
}
}
-}
+}
\ No newline at end of file
diff --git a/langs/themes/de.json b/langs/themes/de.json
index 6a0b29fad1..48972b7683 100644
--- a/langs/themes/de.json
+++ b/langs/themes/de.json
@@ -3,7 +3,7 @@
"title": "AED-Karte öffnen",
"description": "Auf dieser Karte kann man nahe gelegene Defibrillatoren finden und markieren"
},
- "artworks": {
+ "artwork": {
"title": "Freie Kunstwerk-Karte",
"description": "Willkommen bei der Freien Kunstwerk-Karte, einer Karte von Statuen, Büsten, Grafitti, ... auf der ganzen Welt",
"layers": {
diff --git a/langs/themes/en.json b/langs/themes/en.json
index f5db488b97..dd70beaf6a 100644
--- a/langs/themes/en.json
+++ b/langs/themes/en.json
@@ -3,7 +3,7 @@
"title": "Open AED Map",
"description": "On this map, one can find and mark nearby defibrillators"
},
- "artworks": {
+ "artwork": {
"title": "Open Artwork Map",
"description": "Welcome to Open Artwork Map, a map of statues, busts, grafittis and other artwork all over the world",
"layers": {
@@ -692,7 +692,7 @@
}
}
},
- "fietsstraten": {
+ "cyclestreets": {
"title": "Cyclestreets",
"shortDescription": "A map of cyclestreets",
"description": "A cyclestreet is is a street where motorized traffic is not allowed to overtake cyclists. They are signposted by a special traffic sign. Cyclestreets can be found in the Netherlands and Belgium, but also in Germany and France. ",
diff --git a/langs/themes/es.json b/langs/themes/es.json
index 03668a5d5c..91a123d7f0 100644
--- a/langs/themes/es.json
+++ b/langs/themes/es.json
@@ -3,7 +3,7 @@
"title": "Mapa abierto de desfibriladores (DEA)",
"description": "En este mapa , cualquiera puede encontrar y marcar los desfibriladores externos automáticos más cercanos"
},
- "artworks": {
+ "artwork": {
"description": "Bienvenido a Open Artwork Map, un mapa de estatuas, bustos, grafitis y otras obras de arte de todo el mundo",
"layers": {
"0": {
diff --git a/langs/themes/fr.json b/langs/themes/fr.json
index 25bff80566..9d927b6183 100644
--- a/langs/themes/fr.json
+++ b/langs/themes/fr.json
@@ -3,7 +3,7 @@
"title": "Carte des défibrillateurs (DAE)",
"description": "Sur cette carte, vous pouvez trouver et améliorer les informations sur les défibrillateurs"
},
- "artworks": {
+ "artwork": {
"title": "Carte ouverte des œuvres d'art",
"description": "Bienvenue sur la carte ouverte des œuvres d'art, une carte des statues, fresques, ... du monde entier",
"layers": {
diff --git a/langs/themes/hu.json b/langs/themes/hu.json
index 10a97477f6..cb8f0fd7ff 100644
--- a/langs/themes/hu.json
+++ b/langs/themes/hu.json
@@ -2,7 +2,7 @@
"aed": {
"title": "Nyílt AED Térkép"
},
- "artworks": {
+ "artwork": {
"title": "Nyít Műalkotás Térkép"
}
}
\ No newline at end of file
diff --git a/langs/themes/id.json b/langs/themes/id.json
index 31649d682e..c436e745eb 100644
--- a/langs/themes/id.json
+++ b/langs/themes/id.json
@@ -3,7 +3,7 @@
"title": "Buka Peta AED",
"description": "Di peta ini, seseorang dapat menemukan dan menandai defibrillator terdekat"
},
- "artworks": {
+ "artwork": {
"title": "Buka Peta Karya Seni",
"description": "Selamat datang di Open Artwork Map, peta untuk patung, grafiti, dan karya seni lain di seluruh dunia",
"layers": {
diff --git a/langs/themes/it.json b/langs/themes/it.json
index 89189d3aec..313e2715f9 100644
--- a/langs/themes/it.json
+++ b/langs/themes/it.json
@@ -3,7 +3,7 @@
"title": "Mappa dei defibrillatori (DAE)",
"description": "Su questa mappa puoi trovare e segnalare i defibrillatori nelle vicinanze"
},
- "artworks": {
+ "artwork": {
"title": "Mappa libera delle opere d'arte",
"description": "Benvenuto/a sulla mappa libera dell’arte, una mappa delle statue, i busti, i graffiti e le altre realizzazioni artistiche di tutto il mondo",
"layers": {
@@ -396,7 +396,7 @@
}
}
},
- "fietsstraten": {
+ "cyclestreets": {
"roamingRenderings": {
"0": {
"mappings": {
diff --git a/langs/themes/ja.json b/langs/themes/ja.json
index 2754b88120..3dfd0a2e4a 100644
--- a/langs/themes/ja.json
+++ b/langs/themes/ja.json
@@ -3,7 +3,7 @@
"title": "オープンAEDマップ",
"description": "この地図では近くにある除細動器(AED)を見つけてマークします"
},
- "artworks": {
+ "artwork": {
"title": "オープン アートワーク マップ",
"description": "オープン アートワーク マップへようこそ。世界中の銅像や胸像、壁の落書きなどのアートワークの地図です",
"layers": {
@@ -583,7 +583,7 @@
}
}
},
- "fietsstraten": {
+ "cyclestreets": {
"title": "Cyclestreets",
"shortDescription": "cyclestreetsの地図",
"description": "cyclestreetとは、自動車がサイクリストを追い越すことができない道です。専用の道路標識で表示されます。Cyclestreetsはオランダやベルギーにもありますが、ドイツやフランスにもあります。 ",
diff --git a/langs/themes/nb_NO.json b/langs/themes/nb_NO.json
index 9792f7c736..29f14be05b 100644
--- a/langs/themes/nb_NO.json
+++ b/langs/themes/nb_NO.json
@@ -2,7 +2,7 @@
"aed": {
"title": "Åpne AED-kart"
},
- "artworks": {
+ "artwork": {
"layers": {
"0": {
"name": "Kunstverk",
@@ -213,7 +213,7 @@
}
}
},
- "fietsstraten": {
+ "cyclestreets": {
"shortDescription": "Et kart over sykkelveier",
"roamingRenderings": {
"0": {
diff --git a/langs/themes/nl.json b/langs/themes/nl.json
index e1ab2203fd..550fc1bcd8 100644
--- a/langs/themes/nl.json
+++ b/langs/themes/nl.json
@@ -7,7 +7,7 @@
"title": "Open AED-kaart - Brugge edition",
"description": "Op deze kaart kan je informatie over AEDs vinden en verbeteren + een export van de brugse defibrillatoren"
},
- "artworks": {
+ "artwork": {
"title": "Kunstwerkenkaart",
"description": "Welkom op de Open Kunstwerken Kaart",
"layers": {
@@ -580,7 +580,7 @@
}
}
},
- "fietsstraten": {
+ "cyclestreets": {
"title": "Fietsstraten",
"shortDescription": "Een kaart met alle gekende fietsstraten",
"description": "Een fietsstraat is een straat waar - automobilisten geen fietsers mogen inhalen
- Er een maximumsnelheid van 30km/u geldt
- Fietsers gemotoriseerde voortuigen links mogen inhalen
- Fietsers nog steeds voorrang aan rechts moeten verlenen - ook aan auto's en voetgangers op het zebrapad
Op deze open kaart kan je alle gekende fietsstraten zien en kan je ontbrekende fietsstraten aanduiden. Om de kaart aan te passen, moet je je aanmelden met OpenStreetMap en helemaal inzoomen tot straatniveau.",
@@ -592,7 +592,7 @@
"then": "Deze straat is een fietsstraat (en dus zone 30)"
},
"1": {
- "then": "Deze straat is een fietsstraat"
+ "then": "Deze straat i een fietsstraat"
},
"2": {
"then": "Deze straat wordt binnenkort een fietsstraat"
@@ -820,7 +820,7 @@
}
}
},
- "boomgaarden": {
+ "fruit_trees": {
"title": "Open Boomgaardenkaart",
"shortDescription": "Boomgaarden en fruitbomen",
"description": "Op deze kaart vindt je boomgaarden en fruitbomen",
diff --git a/langs/themes/ru.json b/langs/themes/ru.json
index 74f15b8753..ccc9571e3f 100644
--- a/langs/themes/ru.json
+++ b/langs/themes/ru.json
@@ -3,7 +3,7 @@
"title": "Открытая карта АВД (Автоматизированных внешних дефибрилляторов)",
"description": "На этой карте вы можете найти и отметить ближайшие дефибрилляторы"
},
- "artworks": {
+ "artwork": {
"title": "Открытая карта произведений искусства",
"description": "Добро пожаловать на Open Artwork Map, карту статуй, бюстов, граффити и других произведений искусства по всему миру",
"layers": {
@@ -407,7 +407,7 @@
}
}
},
- "fietsstraten": {
+ "cyclestreets": {
"layers": {
"2": {
"name": "Все улицы",
diff --git a/langs/themes/sv.json b/langs/themes/sv.json
index 2a881c73c7..59d44792db 100644
--- a/langs/themes/sv.json
+++ b/langs/themes/sv.json
@@ -3,7 +3,7 @@
"title": "Öppna AED-karta",
"description": "På denna karta kan man hitta och markera närliggande defibrillatorer"
},
- "artworks": {
+ "artwork": {
"title": "Öppen konstverkskarta"
}
}
\ No newline at end of file
diff --git a/langs/themes/zh_Hant.json b/langs/themes/zh_Hant.json
index 73063a9d78..cd855a4a4f 100644
--- a/langs/themes/zh_Hant.json
+++ b/langs/themes/zh_Hant.json
@@ -3,7 +3,7 @@
"title": "開放AED地圖",
"description": "在這份地圖上,你可以找到與標記附近的除顫器"
},
- "artworks": {
+ "artwork": {
"title": "開放藝術品地圖",
"description": "歡迎來到開放藝術品地圖,這份地圖會顯示全世界的雕像、半身像、塗鴉以及其他類型的藝術品",
"layers": {
@@ -294,7 +294,7 @@
}
}
},
- "fietsstraten": {
+ "cyclestreets": {
"title": "單車街道",
"shortDescription": "單車街道的地圖",
"description": "單車街道是機動車輛受限制,只允許單車通行的道路。通常會有路標顯示特別的交通指標。單車街道通常在荷蘭、比利時看到,但德國與法國也有。 ",
diff --git a/scripts/generateLayerOverview.ts b/scripts/generateLayerOverview.ts
index d903867c84..3ea75e290f 100644
--- a/scripts/generateLayerOverview.ts
+++ b/scripts/generateLayerOverview.ts
@@ -78,9 +78,8 @@ class LayerOverviewUtils {
main(args: string[]) {
- const lt = this.loadThemesAndLayers();
- const layerFiles = lt.layers;
- const themeFiles = lt.themes;
+ const layerFiles = ScriptUtils.getLayerFiles();
+ const themeFiles = ScriptUtils.getThemeFiles();
console.log(" ---------- VALIDATING ---------")
const licensePaths = []
@@ -98,7 +97,9 @@ class LayerOverviewUtils {
}
let themeErrorCount = []
- for (const themeFile of themeFiles) {
+ for (const themeInfo of themeFiles) {
+ const themeFile = themeInfo.parsed
+ const themePath = themeInfo.path
if (typeof themeFile.language === "string") {
themeErrorCount.push("The theme " + themeFile.id + " has a string as language. Please use a list of strings")
}
@@ -108,12 +109,13 @@ class LayerOverviewUtils {
themeErrorCount.push(`Unknown layer id: ${layer} in theme ${themeFile.id}`)
}
} else {
- if (layer.builtin !== undefined) {
- if (!knownLayerIds.has(layer.builtin)) {
- themeErrorCount.push("Unknown layer id: " + layer.builtin + "(which uses inheritance)")
+ if (layer["builtin"] !== undefined) {
+ if (!knownLayerIds.has(layer["builtin"])) {
+ themeErrorCount.push("Unknown layer id: " + layer["builtin"] + "(which uses inheritance)")
}
} else {
// layer.builtin contains layer overrides - we can skip those
+ // @ts-ignore
layerErrorCount.push(...this.validateLayer(layer, undefined, knownPaths, themeFile.id))
}
}
@@ -121,7 +123,7 @@ class LayerOverviewUtils {
themeFile.layers = themeFile.layers
.filter(l => typeof l != "string") // We remove all the builtin layer references as they don't work with ts-node for some weird reason
- .filter(l => l.builtin === undefined)
+ .filter(l => l["builtin"] === undefined)
try {
@@ -129,6 +131,12 @@ class LayerOverviewUtils {
if (theme.id !== theme.id.toLowerCase()) {
themeErrorCount.push("Theme ids should be in lowercase, but it is " + theme.id)
}
+ let filename = themePath.substring(themePath.lastIndexOf("/") + 1, themePath.length - 5)
+ if(theme.id !== filename){
+ themeErrorCount.push("Theme ids should be the same as the name.json, but we got id: " + theme.id + " and filename "+filename+" ("+themePath+")")
+ }
+
+
} catch (e) {
themeErrorCount.push("Could not parse theme " + themeFile["id"] + "due to", e)
}
From 00e2f56d3e85b84bc3fe8e510b82b78ff5f613e7 Mon Sep 17 00:00:00 2001
From: pietervdvn
Date: Mon, 26 Jul 2021 10:37:11 +0200
Subject: [PATCH 8/8] Remove all old 'hideUnderlayingFeaturePercentages' as
they aren't used anymore; check in script; fix #431
---
assets/layers/bench/bench.json | 1 -
assets/layers/bench_at_pt/bench_at_pt.json | 1 -
assets/layers/bicycle_library/bicycle_library.json | 1 -
assets/layers/bike_cafe/bike_cafe.json | 1 -
.../bike_monitoring_station/bike_monitoring_station.json | 1 -
assets/layers/bike_shop/bike_shop.json | 1 -
assets/layers/bike_themed_object/bike_themed_object.json | 1 -
assets/layers/information_board/information_board.json | 1 -
assets/layers/map/map.json | 1 -
assets/layers/nature_reserve/nature_reserve.json | 1 -
assets/layers/picnic_table/picnic_table.json | 1 -
assets/layers/play_forest/play_forest.json | 1 -
assets/layers/playground/playground.json | 1 -
assets/layers/slow_roads/slow_roads.json | 1 -
assets/layers/sport_pitch/sport_pitch.json | 1 -
assets/layers/surveillance_camera/surveillance_camera.json | 1 -
assets/layers/tree_node/tree_node.json | 1 -
assets/themes/campersite/campersite.json | 2 --
assets/themes/charging_stations/charging_stations.json | 1 -
assets/themes/climbing/climbing.json | 5 -----
assets/themes/facadegardens/facadegardens.json | 1 -
assets/themes/fruit_trees/fruit_trees.json | 2 --
assets/themes/grb.json | 1 -
assets/themes/hailhydrant/hailhydrant.json | 4 ----
assets/themes/shops/shops.json | 1 -
assets/themes/widths/width.json | 1 -
scripts/generateLayerOverview.ts | 4 ++++
27 files changed, 4 insertions(+), 35 deletions(-)
diff --git a/assets/layers/bench/bench.json b/assets/layers/bench/bench.json
index 312b21cfcc..1eacb6f63b 100644
--- a/assets/layers/bench/bench.json
+++ b/assets/layers/bench/bench.json
@@ -517,7 +517,6 @@
]
}
],
- "hideUnderlayingFeaturesMinPercentage": 0,
"icon": {
"render": "./assets/themes/benches/bench_poi.svg",
"mappings": []
diff --git a/assets/layers/bench_at_pt/bench_at_pt.json b/assets/layers/bench_at_pt/bench_at_pt.json
index bb2661e25f..fc80219b38 100644
--- a/assets/layers/bench_at_pt/bench_at_pt.json
+++ b/assets/layers/bench_at_pt/bench_at_pt.json
@@ -126,7 +126,6 @@
}
}
],
- "hideUnderlayingFeaturesMinPercentage": 0,
"icon": {
"render": "./assets/themes/benches/bench_public_transport.svg"
},
diff --git a/assets/layers/bicycle_library/bicycle_library.json b/assets/layers/bicycle_library/bicycle_library.json
index d56f3bc428..dd9ec5741c 100644
--- a/assets/layers/bicycle_library/bicycle_library.json
+++ b/assets/layers/bicycle_library/bicycle_library.json
@@ -210,7 +210,6 @@
},
"description"
],
- "hideUnderlayingFeaturesMinPercentage": 1,
"presets": [
{
"title": {
diff --git a/assets/layers/bike_cafe/bike_cafe.json b/assets/layers/bike_cafe/bike_cafe.json
index 30dcb1760a..9bf3d61a82 100644
--- a/assets/layers/bike_cafe/bike_cafe.json
+++ b/assets/layers/bike_cafe/bike_cafe.json
@@ -293,7 +293,6 @@
}
}
],
- "hideUnderlayingFeaturesMinPercentage": 0,
"icon": {
"render": "./assets/layers/bike_cafe/bike_cafe.svg"
},
diff --git a/assets/layers/bike_monitoring_station/bike_monitoring_station.json b/assets/layers/bike_monitoring_station/bike_monitoring_station.json
index 34b4d1b630..86209610e3 100644
--- a/assets/layers/bike_monitoring_station/bike_monitoring_station.json
+++ b/assets/layers/bike_monitoring_station/bike_monitoring_station.json
@@ -63,7 +63,6 @@
}
}
],
- "hideUnderlayingFeaturesMinPercentage": 0,
"icon": {
"render": "./assets/layers/bike_monitoring_station/monitoring_station.svg"
},
diff --git a/assets/layers/bike_shop/bike_shop.json b/assets/layers/bike_shop/bike_shop.json
index 7f60ced897..c974ab3395 100644
--- a/assets/layers/bike_shop/bike_shop.json
+++ b/assets/layers/bike_shop/bike_shop.json
@@ -601,7 +601,6 @@
]
}
],
- "hideUnderlayingFeaturesMinPercentage": 1,
"presets": [
{
"title": {
diff --git a/assets/layers/bike_themed_object/bike_themed_object.json b/assets/layers/bike_themed_object/bike_themed_object.json
index e3960b9d69..bae9e790ec 100644
--- a/assets/layers/bike_themed_object/bike_themed_object.json
+++ b/assets/layers/bike_themed_object/bike_themed_object.json
@@ -56,7 +56,6 @@
"phone",
"opening_hours"
],
- "hideUnderlayingFeaturesMinPercentage": 0,
"icon": {
"render": "./assets/layers/bike_themed_object/other_services.svg"
},
diff --git a/assets/layers/information_board/information_board.json b/assets/layers/information_board/information_board.json
index 017f3aeb63..48f0ab6a4a 100644
--- a/assets/layers/information_board/information_board.json
+++ b/assets/layers/information_board/information_board.json
@@ -29,7 +29,6 @@
"tagRenderings": [
"images"
],
- "hideUnderlayingFeaturesMinPercentage": 0,
"icon": {
"render": "./assets/layers/information_board/board.svg"
},
diff --git a/assets/layers/map/map.json b/assets/layers/map/map.json
index 2c3cf3ea74..453a7f0b7f 100644
--- a/assets/layers/map/map.json
+++ b/assets/layers/map/map.json
@@ -159,7 +159,6 @@
}
}
],
- "hideUnderlayingFeaturesMinPercentage": 0,
"icon": {
"render": "./assets/layers/map/map.svg",
"mappings": [
diff --git a/assets/layers/nature_reserve/nature_reserve.json b/assets/layers/nature_reserve/nature_reserve.json
index a0fd58df80..15d6e57f10 100644
--- a/assets/layers/nature_reserve/nature_reserve.json
+++ b/assets/layers/nature_reserve/nature_reserve.json
@@ -383,7 +383,6 @@
]
}
],
- "hideUnderlayingFeaturesMinPercentage": 10,
"wayHandling": 2,
"icon": {
"render": "./assets/themes/buurtnatuur/nature_reserve.svg"
diff --git a/assets/layers/picnic_table/picnic_table.json b/assets/layers/picnic_table/picnic_table.json
index 672e41f07f..a22c76353c 100644
--- a/assets/layers/picnic_table/picnic_table.json
+++ b/assets/layers/picnic_table/picnic_table.json
@@ -72,7 +72,6 @@
]
}
],
- "hideUnderlayingFeaturesMinPercentage": 0,
"icon": {
"render": "circle:#e6cf39;./assets/layers/picnic_table/picnic_table.svg"
},
diff --git a/assets/layers/play_forest/play_forest.json b/assets/layers/play_forest/play_forest.json
index eed73151f8..5bbc4b5125 100644
--- a/assets/layers/play_forest/play_forest.json
+++ b/assets/layers/play_forest/play_forest.json
@@ -87,7 +87,6 @@
"render": "{reviews(name, play_forest)}"
}
],
- "hideUnderlayingFeaturesMinPercentage": 0,
"hideFromOverview": false,
"icon": {
"render": "./assets/layers/play_forest/icon.svg"
diff --git a/assets/layers/playground/playground.json b/assets/layers/playground/playground.json
index ec97eca2bf..f8f4c0027a 100644
--- a/assets/layers/playground/playground.json
+++ b/assets/layers/playground/playground.json
@@ -437,7 +437,6 @@
"render": "{reviews(name, playground)}"
}
],
- "hideUnderlayingFeaturesMinPercentage": 0,
"icon": {
"render": "./assets/themes/playgrounds/playground.svg"
},
diff --git a/assets/layers/slow_roads/slow_roads.json b/assets/layers/slow_roads/slow_roads.json
index 7ee9e2ba9c..9c7d6e237d 100644
--- a/assets/layers/slow_roads/slow_roads.json
+++ b/assets/layers/slow_roads/slow_roads.json
@@ -215,7 +215,6 @@
]
}
],
- "hideUnderlayingFeaturesMinPercentage": 0,
"width": {
"render": "7"
},
diff --git a/assets/layers/sport_pitch/sport_pitch.json b/assets/layers/sport_pitch/sport_pitch.json
index 140e222b2a..b871523f70 100644
--- a/assets/layers/sport_pitch/sport_pitch.json
+++ b/assets/layers/sport_pitch/sport_pitch.json
@@ -383,7 +383,6 @@
"render": "{reviews(name, sportpitch)}"
}
],
- "hideUnderlayingFeaturesMinPercentage": 0,
"icon": {
"render": "circle:white;./assets/layers/sport_pitch/sport_pitch.svg",
"mappings": [
diff --git a/assets/layers/surveillance_camera/surveillance_camera.json b/assets/layers/surveillance_camera/surveillance_camera.json
index 20f1e77bf0..77fed82afb 100644
--- a/assets/layers/surveillance_camera/surveillance_camera.json
+++ b/assets/layers/surveillance_camera/surveillance_camera.json
@@ -421,7 +421,6 @@
]
}
],
- "hideUnderlayingFeaturesMinPercentage": 0,
"icon": {
"render": "./assets/themes/surveillance_cameras/logo.svg",
"mappings": [
diff --git a/assets/layers/tree_node/tree_node.json b/assets/layers/tree_node/tree_node.json
index 1f3cc7fdeb..432e3c634c 100644
--- a/assets/layers/tree_node/tree_node.json
+++ b/assets/layers/tree_node/tree_node.json
@@ -449,7 +449,6 @@
}
}
],
- "hideUnderlayingFeaturesMinPercentage": 0,
"icon": {
"render": "circle:#ffffff;./assets/themes/trees/unknown.svg",
"mappings": [
diff --git a/assets/themes/campersite/campersite.json b/assets/themes/campersite/campersite.json
index cc248f2780..63192c55bf 100644
--- a/assets/themes/campersite/campersite.json
+++ b/assets/themes/campersite/campersite.json
@@ -521,7 +521,6 @@
"questions",
"reviews"
],
- "hideUnderlayingFeaturesMinPercentage": 0,
"icon": {
"render": "circle:white;./assets/themes/campersites/caravan.svg",
"mappings": [
@@ -862,7 +861,6 @@
}
}
],
- "hideUnderlayingFeaturesMinPercentage": 0,
"icon": {
"render": "circle:white;./assets/themes/campersites/sanitary_dump_station.svg"
},
diff --git a/assets/themes/charging_stations/charging_stations.json b/assets/themes/charging_stations/charging_stations.json
index 16bc127864..3fe101f089 100644
--- a/assets/themes/charging_stations/charging_stations.json
+++ b/assets/themes/charging_stations/charging_stations.json
@@ -307,7 +307,6 @@
]
}
],
- "hideUnderlayingFeaturesMinPercentage": 0,
"icon": {
"render": "pin:#fff;./assets/themes/charging_stations/plug.svg",
"mappings": [
diff --git a/assets/themes/climbing/climbing.json b/assets/themes/climbing/climbing.json
index fbf13310c3..7b4cc30bc9 100644
--- a/assets/themes/climbing/climbing.json
+++ b/assets/themes/climbing/climbing.json
@@ -140,7 +140,6 @@
"phone",
"opening_hours"
],
- "hideUnderlayingFeaturesMinPercentage": 0,
"icon": {
"render": "./assets/themes/climbing/club.svg"
},
@@ -280,7 +279,6 @@
"opening_hours",
"reviews"
],
- "hideUnderlayingFeaturesMinPercentage": 0,
"icon": {
"render": "./assets/themes/climbing/climbing_gym.svg"
},
@@ -471,7 +469,6 @@
},
"reviews"
],
- "hideUnderlayingFeaturesMinPercentage": 0,
"icon": {
"render": "circle:white;./assets/themes/climbing/climbing_route.svg"
},
@@ -695,7 +692,6 @@
},
"reviews"
],
- "hideUnderlayingFeaturesMinPercentage": 0,
"icon": {
"render": "./assets/themes/climbing/climbing_no_rope.svg"
},
@@ -850,7 +846,6 @@
}
],
"icon": "./assets/themes/climbing/climbing_unknown.svg",
- "hideUnderlayingFeaturesMinPercentage": 0,
"width": {
"render": "2"
},
diff --git a/assets/themes/facadegardens/facadegardens.json b/assets/themes/facadegardens/facadegardens.json
index 8cc9369815..c69fb08e29 100644
--- a/assets/themes/facadegardens/facadegardens.json
+++ b/assets/themes/facadegardens/facadegardens.json
@@ -330,7 +330,6 @@
}
}
],
- "hideUnderlayingFeaturesMinPercentage": 0,
"icon": {
"render": "circle:white;./assets/themes/facadegardens/geveltuin.svg",
"mappings": [
diff --git a/assets/themes/fruit_trees/fruit_trees.json b/assets/themes/fruit_trees/fruit_trees.json
index d16dd377be..bf12bbeca2 100644
--- a/assets/themes/fruit_trees/fruit_trees.json
+++ b/assets/themes/fruit_trees/fruit_trees.json
@@ -43,7 +43,6 @@
"tagRenderings": [
"images"
],
- "hideUnderlayingFeaturesMinPercentage": 0,
"icon": {
"render": "./assets/themes/buurtnatuur/forest.svg"
},
@@ -143,7 +142,6 @@
}
}
],
- "hideUnderlayingFeaturesMinPercentage": 0,
"icon": {
"render": "./assets/themes/fruit_trees/fruit_tree.svg"
},
diff --git a/assets/themes/grb.json b/assets/themes/grb.json
index 7f38732af7..536b694e75 100644
--- a/assets/themes/grb.json
+++ b/assets/themes/grb.json
@@ -173,7 +173,6 @@
}
}
],
- "hideUnderlayingFeaturesMinPercentage": 0,
"label": {
"mappings": [
{
diff --git a/assets/themes/hailhydrant/hailhydrant.json b/assets/themes/hailhydrant/hailhydrant.json
index d465b72eb2..fc74cd62c9 100644
--- a/assets/themes/hailhydrant/hailhydrant.json
+++ b/assets/themes/hailhydrant/hailhydrant.json
@@ -258,7 +258,6 @@
},
"images"
],
- "hideUnderlayingFeaturesMinPercentage": 0,
"icon": {
"render": "./assets/themes/hailhydrant/hydrant.svg"
},
@@ -365,7 +364,6 @@
},
"images"
],
- "hideUnderlayingFeaturesMinPercentage": 0,
"icon": {
"render": "./assets/themes/hailhydrant/Twemoji12_1f9ef.svg"
},
@@ -568,7 +566,6 @@
},
"images"
],
- "hideUnderlayingFeaturesMinPercentage": 0,
"icon": {
"render": "./assets/themes/hailhydrant/Twemoji12_1f692.svg"
},
@@ -744,7 +741,6 @@
},
"images"
],
- "hideUnderlayingFeaturesMinPercentage": 0,
"icon": {
"render": "./assets/themes/hailhydrant/Twemoji_1f691.svg"
},
diff --git a/assets/themes/shops/shops.json b/assets/themes/shops/shops.json
index 571d0e1b6d..5acddf6b79 100644
--- a/assets/themes/shops/shops.json
+++ b/assets/themes/shops/shops.json
@@ -305,7 +305,6 @@
"questions",
"reviews"
],
- "hideUnderlayingFeaturesMinPercentage": 0,
"icon": {
"render": "./assets/themes/shops/shop.svg"
},
diff --git a/assets/themes/widths/width.json b/assets/themes/widths/width.json
index 298b9a1281..bf8f9b7665 100644
--- a/assets/themes/widths/width.json
+++ b/assets/themes/widths/width.json
@@ -144,7 +144,6 @@
"render": "{_width:needed}m nodig in het totaal"
}
],
- "hideUnderlayingFeaturesMinPercentage": 0,
"icon": {
"render": "./assets/themes/widths/icon.svg"
},
diff --git a/scripts/generateLayerOverview.ts b/scripts/generateLayerOverview.ts
index 3ea75e290f..f35f7c6433 100644
--- a/scripts/generateLayerOverview.ts
+++ b/scripts/generateLayerOverview.ts
@@ -56,6 +56,10 @@ class LayerOverviewUtils {
if (path != undefined && path.indexOf(expected) < 0) {
errorCount.push("Layer is in an incorrect place. The path is " + path + ", but expected " + expected)
}
+ if(layerJson["hideUnderlayingFeaturesMinPercentage"] !== undefined){
+ errorCount.push("Layer "+layer.id+" contains an old 'hideUnderlayingFeaturesMinPercentage'")
+ }
+
for (const image of images) {
if (image.indexOf("{") >= 0) {