diff --git a/Customizations/JSON/LayerConfig.ts b/Customizations/JSON/LayerConfig.ts index 42c0936..79891f1 100644 --- a/Customizations/JSON/LayerConfig.ts +++ b/Customizations/JSON/LayerConfig.ts @@ -66,7 +66,7 @@ export default class LayerConfig { this.id = json.id; this.name = Translations.T(json.name); - this.description = Translations.T(json.name); + this.description = Translations.T(json.description); this.overpassTags = FromJSON.Tag(json.overpassTags, context + ".overpasstags"); this.doNotDownload = json.doNotDownload ?? false, this.passAllFeatures = json.passAllFeatures ?? false; diff --git a/Customizations/JSON/LayerConfigJson.ts b/Customizations/JSON/LayerConfigJson.ts index 586459a..537c588 100644 --- a/Customizations/JSON/LayerConfigJson.ts +++ b/Customizations/JSON/LayerConfigJson.ts @@ -19,7 +19,7 @@ export interface LayerConfigJson { /** * A description for this layer. - * Shown in the layer selections and in the personal theme + * Shown in the layer selections and in the personel theme */ description?: string | any; diff --git a/UI/BigComponents/PersonalLayersPanel.ts b/UI/BigComponents/PersonalLayersPanel.ts index f5d9c12..6746a83 100644 --- a/UI/BigComponents/PersonalLayersPanel.ts +++ b/UI/BigComponents/PersonalLayersPanel.ts @@ -10,13 +10,14 @@ import {SubtleButton} from "../Base/SubtleButton"; import {FixedUiElement} from "../Base/FixedUiElement"; import Translations from "../i18n/Translations"; import * as personal from "../../assets/themes/personalLayout/personalLayout.json" +import Locale from "../i18n/Locale"; export default class PersonalLayersPanel extends UIElement { private checkboxes: UIElement[] = []; constructor() { super(State.state.favouriteLayers); this.ListenTo(State.state.osmConnection.userDetails); - + this.ListenTo(Locale.language); this.UpdateView([]); const self = this; State.state.installedThemes.addCallback(extraThemes => { @@ -35,6 +36,10 @@ export default class PersonalLayersPanel extends UIElement { if (layout.id === personal.id) { continue; } + + if(layout.hideFromOverview){ + continue; + } const header = new Combine([ diff --git a/assets/layers/bike_cafe/bike_cafes.json b/assets/layers/bike_cafe/bike_cafes.json index fa145b4..da1274e 100644 --- a/assets/layers/bike_cafe/bike_cafes.json +++ b/assets/layers/bike_cafe/bike_cafes.json @@ -42,7 +42,6 @@ } ] }, - "description": {}, "tagRenderings": [ "images", { diff --git a/assets/layers/bike_library/bike_library.json b/assets/layers/bike_library/bike_library.json new file mode 100644 index 0000000..6102821 --- /dev/null +++ b/assets/layers/bike_library/bike_library.json @@ -0,0 +1,105 @@ +{ + "id": "bike_libraries", + "name": { + "en": "Bicycle library", + "nl": "Fietsbibliotheek", + }, + "minzoom": 13, + "overpassTags": "amenity=bicycle_library", + "title": { + "render": { + "en": "Bicycle library", + "nl": "Fietsbibliotheek" + }, + "mappings": [ + { + "if": "name~*", + "then": "{name}" + } + ] + }, + "titleIcons": [ + { + "condition": { + "or": [ + "service:bicycle:pump=yes", + "service:bicycle:pump=separate" + ] + }, + "render": "" + }, + "defaults" + ], + "description": { + "en": "A facility where bicycles can be lent for longer period of times", + "nl": "Een plaats waar men voor langere tijd een fiets kan lenen" + }, + "tagRenderings": [ + "images", + { + "question": { + "en": "What is the name of this bicycle library?", + "nl": "Wat is de naam van deze fietsbieb?", + }, + "render": { + "en": "This bicycle library shop is called {name}", + "nl": "Deze fietsbieb heet {name}", + }, + "freeform": { + "key": "name" + } + }, + "website", + "phone", + "email", + "opening_hours", + "description", + ], + "hideUnderlayingFeaturesMinPercentage": 1, + "presets": [ + { + "title": { + "en": "Fietsbibliotheek", + "nl": "Bicycle library", + }, + "tags": [ + "shop=bicycle" + ] + } + ], + "icon": { + "render": "./assets/layers/bike_shop/repair_shop.svg", + "mappings": [ + { + "if": "operator=De Fietsambassade Gent", + "then": "./assets/themes/cyclofix/fietsambassade_gent_logo_small.svg" + }, + { + "if": "service:bicycle:retail=yes", + "then": "./assets/layers/bike_shop/shop.svg" + } + ] + }, + "iconOverlays": [ + { + "if": "opening_hours~*", + "then": "isOpen", + "badge": true + }, + { + "if": "service:bicycle:pump=yes", + "then": "circle:#e2783d;./assets/layers/bike_repair_station/pump.svg", + "badge": true + } + ], + "width": { + "render": "1" + }, + "iconSize": { + "render": "50,50,bottom" + }, + "color": { + "render": "#c00" + }, + "wayHandling": 2 +} \ No newline at end of file diff --git a/assets/layers/bike_monitoring_station/bike_monitoring_station.json b/assets/layers/bike_monitoring_station/bike_monitoring_station.json index 80f9ce3..5b19066 100644 --- a/assets/layers/bike_monitoring_station/bike_monitoring_station.json +++ b/assets/layers/bike_monitoring_station/bike_monitoring_station.json @@ -32,7 +32,6 @@ } ] }, - "description": {}, "tagRenderings": [ "images", { diff --git a/assets/layers/bird_hide/birdhides.json b/assets/layers/bird_hide/birdhides.json index c365293..5c35584 100644 --- a/assets/layers/bird_hide/birdhides.json +++ b/assets/layers/bird_hide/birdhides.json @@ -192,7 +192,6 @@ ] }, "size": { - "question": {}, "freeform": { "addExtraTags": [] }, diff --git a/assets/layers/cycling_themed_object/cycling_themed_objects.json b/assets/layers/cycling_themed_object/cycling_themed_objects.json index 8396ea5..282a62b 100644 --- a/assets/layers/cycling_themed_object/cycling_themed_objects.json +++ b/assets/layers/cycling_themed_object/cycling_themed_objects.json @@ -37,7 +37,6 @@ } ] }, - "description": {}, "tagRenderings": [ "images", "description", diff --git a/assets/layers/information_board/information_board.json b/assets/layers/information_board/information_board.json index 7114cd8..90d2cb0 100644 --- a/assets/layers/information_board/information_board.json +++ b/assets/layers/information_board/information_board.json @@ -16,7 +16,6 @@ "en": "Information board" } }, - "description": {}, "tagRenderings": [ "images"], "hideUnderlayingFeaturesMinPercentage": 0, "icon": { diff --git a/assets/layers/surveillance_cameras/surveillance_cameras.json b/assets/layers/surveillance_cameras/surveillance_cameras.json index 32c6847..cc8b5b0 100644 --- a/assets/layers/surveillance_cameras/surveillance_cameras.json +++ b/assets/layers/surveillance_cameras/surveillance_cameras.json @@ -23,7 +23,6 @@ "nl": "Bewakingscamera" } }, - "description": {}, "tagRenderings": [ "images", { diff --git a/assets/themes/benches/benches.json b/assets/themes/benches/benches.json index 402a60d..4e0be4f 100644 --- a/assets/themes/benches/benches.json +++ b/assets/themes/benches/benches.json @@ -50,7 +50,6 @@ }, "mappings": [] }, - "description": {}, "tagRenderings": [ "images", { @@ -383,7 +382,6 @@ } ] }, - "description": {}, "tagRenderings": [ "images", { diff --git a/assets/themes/fritures/fritures.json b/assets/themes/fritures/fritures.json index c46a207..a561f19 100644 --- a/assets/themes/fritures/fritures.json +++ b/assets/themes/fritures/fritures.json @@ -51,7 +51,6 @@ } ] }, - "description": {}, "tagRenderings": [ "images", { diff --git a/assets/themes/fruit_trees/fruit_trees.json b/assets/themes/fruit_trees/fruit_trees.json index a38f122..9189a3e 100644 --- a/assets/themes/fruit_trees/fruit_trees.json +++ b/assets/themes/fruit_trees/fruit_trees.json @@ -37,7 +37,6 @@ "nl": "Boomgaard" } }, - "description": {}, "tagRenderings": ["images"], "hideUnderlayingFeaturesMinPercentage": 0, "icon": { diff --git a/assets/themes/widths/width.json b/assets/themes/widths/width.json index a74278f..e038246 100644 --- a/assets/themes/widths/width.json +++ b/assets/themes/widths/width.json @@ -62,7 +62,6 @@ } ] }, - "description": {}, "tagRenderings": [ { "render": "Deze straat is {width:carriageway}m breed"