From 8660f73ac11616f46c44e11c482684f8bb2270ec Mon Sep 17 00:00:00 2001 From: pgm-chardelv1 Date: Thu, 22 Jul 2021 10:00:24 +0200 Subject: [PATCH 1/2] Minor changes to base layer | Fixes some typos --- .vscode/settings.json | 7 ++++- Customizations/JSON/LayerConfigJson.ts | 16 +++++----- assets/themes/cycle_infra/cycle_infra.json | 36 +++++++++++++++++----- langs/themes/en.json | 4 +++ langs/themes/nl.json | 4 +++ 5 files changed, 50 insertions(+), 17 deletions(-) diff --git a/.vscode/settings.json b/.vscode/settings.json index 37441beed..b4a73d7d4 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -1,3 +1,8 @@ { - "files.eol": "\n" + "files.eol": "\n", + "workbench.colorCustomizations": { + "activityBar.background": "#551907", + "titleBar.activeBackground": "#78230A", + "titleBar.activeForeground": "#FFFBFA" + } } \ No newline at end of file diff --git a/Customizations/JSON/LayerConfigJson.ts b/Customizations/JSON/LayerConfigJson.ts index ca272ecb0..b81fad5ff 100644 --- a/Customizations/JSON/LayerConfigJson.ts +++ b/Customizations/JSON/LayerConfigJson.ts @@ -54,7 +54,7 @@ export interface LayerConfigJson { * Note that both geojson-options might set a flag 'isOsmCache' indicating that the data originally comes from OSM too * * - * NOTE: the previous format was 'overpassTags: AndOrTagCOnfigJson | string', which is interpreted as a shorthand for source: {osmTags: "key=value"} + * NOTE: the previous format was 'overpassTags: AndOrTagConfigJson | string', which is interpreted as a shorthand for source: {osmTags: "key=value"} * While still supported, this is considered deprecated */ source: { osmTags: AndOrTagConfigJson | string } | @@ -81,7 +81,7 @@ export interface LayerConfigJson { doNotDownload?: boolean; /** - * This tagrendering should either be 'yes' or 'no'. If 'no' is returned, then the feature will be hidden from view. + * This tag rendering should either be 'yes' or 'no'. If 'no' is returned, then the feature will be hidden from view. * This is useful to hide certain features from view. Important: hiding features does not work dynamically, but is only calculated when the data is first renders. * This implies that it is not possible to hide a feature after a tagging change * @@ -91,13 +91,13 @@ export interface LayerConfigJson { /** - * The zoomlevel at which point the data is shown and loaded. + * The zoom level at which point the data is shown and loaded. * Default: 0 */ minzoom?: number; /** - * The zoomlevel at which point the data is hidden again + * The zoom level at which point the data is hidden again * Default: 100 (thus: always visible */ maxzoom?: number; @@ -120,9 +120,9 @@ export interface LayerConfigJson { * Note that this also doubles as the icon for this layer (rendered with the overpass-tags) ánd the icon in the presets. * * The result of the icon is rendered as follows: - * the resulting string is interpreted as a _list_ of items, seperated by ";". The bottommost layer is the first layer. + * the resulting string is interpreted as a _list_ of items, separated by ";". The bottommost layer is the first layer. * As a result, on could use a generic pin, then overlay it with a specific icon. - * To make things even more practical, one can use all svgs from the folder "assets/svg" and _substitute the color_ in it. + * To make things even more practical, one can use all SVG's from the folder "assets/svg" and _substitute the color_ in it. * E.g. to draw a red pin, use "pin:#f00", to have a green circle with your icon on top, use `circle:#0f0;` * */ @@ -220,7 +220,7 @@ export interface LayerConfigJson { /** * If set, the user will prompted to confirm the location before actually adding the data. - * THis will be with a 'drag crosshair'-method. + * This will be with a 'drag crosshair'-method. * * If 'preferredBackgroundCategory' is set, the element will attempt to pick a background layer of that category. */ @@ -235,7 +235,7 @@ export interface LayerConfigJson { * * Refer to the class `TagRenderingConfigJson` to see the possibilities. * - * Note that we can also use a string here - where the string refers to a tagrenering defined in `assets/questions/questions.json`, + * Note that we can also use a string here - where the string refers to a tag rendering defined in `assets/questions/questions.json`, * where a few very general questions are defined e.g. website, phone number, ... * * A special value is 'questions', which indicates the location of the questions box. If not specified, it'll be appended to the bottom of the featureInfobox. diff --git a/assets/themes/cycle_infra/cycle_infra.json b/assets/themes/cycle_infra/cycle_infra.json index c74a35338..c71b40f42 100644 --- a/assets/themes/cycle_infra/cycle_infra.json +++ b/assets/themes/cycle_infra/cycle_infra.json @@ -9,21 +9,22 @@ "nl": "Een kaart waar je info over de fietsinfrastructuur kan bekijken en bewerken." }, "description": { - "en": "A map where you can view and edit things related to the bicycle infrastructure made during osoc21.", - "nl": "Een kaart waar je info over de fietsinfrastructuur kan bekijken en bewerken gemaakt tijdens osoc21." + "en": "A map where you can view and edit things related to the bicycle infrastructure. Made during #osoc21.", + "nl": "Een kaart waar je info over de fietsinfrastructuur kan bekijken en bewerken. Gemaakt tijdens #osoc21." }, "language": [ "en", "nl" ], "maintainer": "", + "defaultBackgroundId": "CartoDB.Positron", "icon": "./assets/svg/cycle-infra.svg", "version": "0", "startLat": 51, "startLon": 3.75, "startZoom": 11, "widenFactor": 0.05, - "socialImage": "", + "socialImage": "./assets/svg/cycle-infra.svg", "enableDownload": true, "layers": [ { @@ -120,7 +121,7 @@ "if": "cycleway=shared_lane", "then": { "en": "There is a shared lane", - "nl": "Er is een fietssugestiestrook" + "nl": "Er is een fietssuggestiestrook" } }, { @@ -583,7 +584,12 @@ "nl": "Hoe breed is de ruimte tussen het fietspad en de weg?" }, "condition": { - "or": ["cycleway=track", "cycleway=lane", "highway=cycleway", "highway=path"] + "or": [ + "cycleway=track", + "cycleway=lane", + "highway=cycleway", + "highway=path" + ] }, "freeform": { "key": "cycleway:buffer", @@ -631,7 +637,21 @@ } ] }, - "presets": [] + "dashArray": { + "mappings": [ + { + "if": { + "or": [ + "highway=cycleway", + "highway=path" + ] + }, + "then": "25 15" + } + ] + }, + "presets": [ + ] }, { "id": "all_streets", @@ -904,14 +924,14 @@ { "if": "cycle_barrier:type=triple", "then": { - "en": "Triple, three barier behind each other ", + "en": "Triple, three barriers behind each other ", "nl": "Drievoudig, drie hekjes achter elkaar " } }, { "if": "cycle_barrier:type=squeeze", "then": { - "en": "Squeeze gate, gap is smaller at top, then at bottom " + "en": "Squeeze gate, gap is smaller at top, than at the bottom " } } ] diff --git a/langs/themes/en.json b/langs/themes/en.json index 1c260fd20..1af2f922d 100644 --- a/langs/themes/en.json +++ b/langs/themes/en.json @@ -904,6 +904,10 @@ "then": "Compulsory cycleway '" } } + }, + "10": { + "render": "The buffer besides this cycleway is {cycleway:buffer} m", + "question": "How wide is the gap between the cycleway and the road?" } } }, diff --git a/langs/themes/nl.json b/langs/themes/nl.json index f6b0d5956..8b7da8e58 100644 --- a/langs/themes/nl.json +++ b/langs/themes/nl.json @@ -708,6 +708,10 @@ "then": "Verplicht fietspad '" } } + }, + "10": { + "render": "De schrikafstand van dit fietspad is {cycleway:buffer} m", + "question": "Hoe breed is de ruimte tussen het fietspad en de weg?" } } }, From 9c84b9cf2eb3fdd869da22bb27cc1cd8e12f0242 Mon Sep 17 00:00:00 2001 From: pgm-chardelv1 Date: Thu, 22 Jul 2021 12:04:59 +0200 Subject: [PATCH 2/2] New color scheme --- assets/layers/crossings/crossings.json | 2 +- assets/themes/cycle_infra/cycle_infra.json | 54 +++++++++++++++------- 2 files changed, 39 insertions(+), 17 deletions(-) diff --git a/assets/layers/crossings/crossings.json b/assets/layers/crossings/crossings.json index 4521e57d9..5bfe0081f 100644 --- a/assets/layers/crossings/crossings.json +++ b/assets/layers/crossings/crossings.json @@ -16,7 +16,7 @@ ] } }, - "minzoom": 14, + "minzoom": 18, "title": { "render": { "en": "Crossing", diff --git a/assets/themes/cycle_infra/cycle_infra.json b/assets/themes/cycle_infra/cycle_infra.json index c71b40f42..8ffd1d8ab 100644 --- a/assets/themes/cycle_infra/cycle_infra.json +++ b/assets/themes/cycle_infra/cycle_infra.json @@ -611,43 +611,65 @@ "render": "#aaaaaa", "mappings": [ { - "if": { - "or": [ - "highway=cycleway", - "highway=path" - ] - }, - "then": "#00ff00" + "if": "highway=cycleway", + "then": "rgba(0, 189, 141, 0.7)" + }, + { + "if": "highway=path", + "then": "rgba(204, 74, 207, 0.7)" }, { "if": "cycleway=track", - "then": "#45c445" + "then": "rgba(113, 3, 200, 0.7)" }, { "if": "cycleway=shared_lane", - "then": "#ff0000" + "then": "rgba(74, 59, 247, 0.7)" }, { "if": "cycleway=lane", - "then": "#ff9900" + "then": "rgba(254, 155, 6, 0.9)" }, { "if": "cyclestreet=yes", - "then": "#0000ff" + "then": "rgba(57, 159, 191, 0.7)" } ] }, "dashArray": { + "render": "", "mappings": [ { "if": { "or": [ - "highway=cycleway", - "highway=path" + "oneway=yes", + { + "or": [ + "highway=cycleway", + "highway=path" + ] + } ] }, - "then": "25 15" + "then": "" + }, + { + "if": "cycleway=track", + "then": "30 15" + }, + { + "if": "cycleway=shared_lane", + "then": "15 30" + }, + { + "if": "cycleway=lane", + "then": "25 15 15 15 25" + }, + { + "if": "cyclestreet=yes", + "then": "" } + ] }, "presets": [ @@ -674,7 +696,7 @@ ] } }, - "minzoom": 19, + "minzoom": 14, "wayHandling": 0, "title": { "render": { @@ -780,7 +802,7 @@ ] } }, - "minzoom": 14, + "minzoom": 17, "title": { "render": { "en": "Barrier",