diff --git a/Customizations/AllKnownLayouts.ts b/Customizations/AllKnownLayouts.ts index 80fc4db..785fa1f 100644 --- a/Customizations/AllKnownLayouts.ts +++ b/Customizations/AllKnownLayouts.ts @@ -1,6 +1,5 @@ import {LayerDefinition} from "./LayerDefinition"; import {Layout} from "./Layout"; -import {StreetWidth} from "./Layouts/StreetWidth"; import {FromJSON} from "./JSON/FromJSON"; import * as bookcases from "../assets/themes/bookcases/Bookcases.json"; import * as aed from "../assets/themes/aed/aed.json"; @@ -13,6 +12,7 @@ import * as buurtnatuur from "../assets/themes/buurtnatuur/buurtnatuur.json" import * as nature from "../assets/themes/nature/nature.json" import * as maps from "../assets/themes/maps/maps.json" import {PersonalLayout} from "../Logic/PersonalLayout"; +import {StreetWidth} from "./StreetWidth/StreetWidth"; export class AllKnownLayouts { @@ -39,24 +39,25 @@ export class AllKnownLayouts { const layout = FromJSON.LayoutFromJSON(buurtnatuur); layout.enableMoreQuests = false; layout.enableShareScreen = false; + layout.hideFromOverview = true; return layout; } public static layoutsList: Layout[] = [ new PersonalLayout(), - // new Natuurpunt(), - AllKnownLayouts.GenerateCycloFix(), + FromJSON.LayoutFromJSON(bookcases), FromJSON.LayoutFromJSON(aed), FromJSON.LayoutFromJSON(toilets), FromJSON.LayoutFromJSON(artworks), - FromJSON.LayoutFromJSON(cyclestreets), + AllKnownLayouts.GenerateCycloFix(), FromJSON.LayoutFromJSON(ghostbikes), - AllKnownLayouts.GenerateBuurtNatuur(), FromJSON.LayoutFromJSON(nature), + FromJSON.LayoutFromJSON(cyclestreets), FromJSON.LayoutFromJSON(maps), + AllKnownLayouts.GenerateBuurtNatuur(), - new StreetWidth(), + new StreetWidth(), // The ugly duckling ]; diff --git a/Customizations/JSON/FromJSON.ts b/Customizations/JSON/FromJSON.ts index 03a427a..2c37b39 100644 --- a/Customizations/JSON/FromJSON.ts +++ b/Customizations/JSON/FromJSON.ts @@ -20,6 +20,7 @@ import * as bike_cafes from "../../assets/layers/bike_cafe/bike_cafes.json" import * as cycling_themed_objects from "../../assets/layers/cycling_themed_object/cycling_themed_objects.json" import * as bike_shops from "../../assets/layers/bike_shop/bike_shop.json" import * as maps from "../../assets/layers/maps/maps.json" +import * as information_boards from "../../assets/layers/information_board/information_board.json" import {Utils} from "../../Utils"; import ImageCarouselWithUploadConstructor from "../../UI/Image/ImageCarouselWithUpload"; import {ImageCarouselConstructor} from "../../UI/Image/ImageCarousel"; @@ -47,7 +48,8 @@ export class FromJSON { FromJSON.Layer(bike_cafes), FromJSON.Layer(cycling_themed_objects), FromJSON.Layer(bike_shops), - FromJSON.Layer(maps) + FromJSON.Layer(maps), + FromJSON.Layer(information_boards) ]; for (const layer of sharedLayersList) { diff --git a/Customizations/Layers/InformationBoard.ts b/Customizations/Layers/InformationBoard.ts deleted file mode 100644 index eebdf4c..0000000 --- a/Customizations/Layers/InformationBoard.ts +++ /dev/null @@ -1,121 +0,0 @@ -import {LayerDefinition} from "../LayerDefinition"; -import {And, Tag} from "../../Logic/Tags"; -import {TagRenderingOptions} from "../TagRenderingOptions"; -import ImageCarouselWithUploadConstructor from "../../UI/Image/ImageCarouselWithUpload"; - -export class InformationBoard extends LayerDefinition { - constructor() { - super("informationBoard",{ - name: "Informatiebord", - description: "Een informatiebord of kaart", - minzoom: 12, - overpassFilter: new Tag("tourism", "information"), - presets: [{ - title: "Informatiebord", - tags: [new Tag("tourism", "information")] - }, - { - title: "Kaart", - tags: [new Tag("tourism", "information"), new Tag("information", "map")] - }], - maxAllowedOverlapPercentage: 0, - icon: "assets/nature/info.png", - }); - - const isMap = new Tag("information", "map"); - const isOsmSource = new Tag("map_source", "OpenStreetMap"); - - this.title = new TagRenderingOptions({ - mappings: [ - {k: isMap, txt: "Kaart"}, - {k:null, txt: "Informatiebord"} - ] - }); - - this.style = (properties) => { - let icon = "assets/nature/info.png"; - if (isMap.matchesProperties(properties)) { - icon = "assets/map.svg"; - if (isOsmSource.matchesProperties(properties)) { - icon = "assets/osm-logo-white-bg.svg"; - - const attr = properties["map_source:attribution"]; - if (attr == "sticker") { - icon = "assets/map-stickered.svg" - } else if (attr == "no") { - icon = "assets/osm-logo-buggy-attr.svg" - } - } - } - - return { - color: "#000000", - icon: { - iconUrl: icon, - iconSize: [50, 50] - } - }; - } - - - this.elementsToShow = [ - - new ImageCarouselWithUploadConstructor(), - - new TagRenderingOptions({ - question: "Heeft dit informatiebord een kaart?", - mappings: [ - {k: new Tag("information","board"), txt: "Dit is een informatiebord"}, - {k: isMap, txt: "Dit is een kaart"} - ] - }), - - new TagRenderingOptions({ - question: "Is this map based on OpenStreetMap?", - mappings: [ - { - k: isOsmSource, - txt: "This map is based on OpenStreetMap" - }, - { - k: new And([new Tag("map_source:attribution", ""), new Tag("map_source","")]), - txt: "Unknown" - }, - ], - freeform: { - key: "map_source", - extraTags: new Tag("map_source:attribution", ""), - renderTemplate: "The map data is based on {map_source}", - template: "The map data is based on $$$" - } - }).OnlyShowIf(isMap), - new TagRenderingOptions({ - question: "Is the attribution present?", - mappings: [ - { - k: new Tag("map_source:attribution", "yes"), - txt: "OpenStreetMap is clearly attributed, including the ODBL-license" - }, - { - k: new Tag("map_source:attribution", "incomplete"), - txt: "OpenStreetMap is clearly attributed, but the license is not mentioned" - }, - { - k: new Tag("map_source:attribution", "sticker"), - txt: "OpenStreetMap wasn't mentioned, but someone put an OpenStreetMap-sticker on it" - }, - { - k: new Tag("map_source:attribution", "no"), - txt: "There is no attribution at all" - }, - { - k: new Tag("map_source:attribution", "none"), - txt: "There is no attribution at all" - } - ] - }).OnlyShowIf(new Tag("map_source", "OpenStreetMap")) - ] - - - } -} \ No newline at end of file diff --git a/Customizations/Layers/NatureReserves.ts b/Customizations/Layers/NatureReserves.ts deleted file mode 100644 index c502bde..0000000 --- a/Customizations/Layers/NatureReserves.ts +++ /dev/null @@ -1,95 +0,0 @@ -import {LayerDefinition} from "../LayerDefinition"; -import {Or, Tag} from "../../Logic/Tags"; -import {NameInline} from "../Questions/NameInline"; -import {TagRenderingOptions} from "../TagRenderingOptions"; - -export class NatureReserves extends LayerDefinition { - - constructor(moreQuests: boolean = false) { - super("natureReserve"); - this.name = "Natuurgebied"; - this.icon = ""; - this.overpassFilter = - new Or([new Tag("leisure", "nature_reserve"), new Tag("boundary", "protected_area")]); - this.maxAllowedOverlapPercentage = 10; - - this.presets = [{ - title: "Natuurreservaat", - description: "Voeg een ontbrekend, erkend natuurreservaat toe, bv. een gebied dat beheerd wordt door het ANB of natuurpunt", - tags: [new Tag("leisure", "nature_reserve"), - new Tag("fixme", "Toegevoegd met MapComplete, geometry nog uit te tekenen")] - } - ]; - this.minzoom = 13; - this.title = new NameInline("Natuurreservaat"); - this.style = function () { - return { - color: "#00bb00", - icon: undefined - }; - }; - this.elementsToShow = [ - ]; - - - const extraRenderings = [ - new TagRenderingOptions({ - question: "Mogen honden in dit natuurgebied?", - mappings: [ - {k: new Tag("dog", "leashed"), txt: "Honden moeten aan de leiband"}, - {k: new Tag("dog", "no"), txt: "Honden zijn niet toegestaan"}, - {k: new Tag("dog", "yes"), txt: "Honden zijn welkom"}, - ] - }).OnlyShowIf(new Tag("access", "yes")), - new TagRenderingOptions({ - question: "Op welke website kunnen we meer informatie vinden over dit natuurgebied?", - freeform: { - key:"website", - renderTemplate: "Meer informatie", - template: "$$$" - } - }), - new TagRenderingOptions({ - question: "Wie is de conservator van dit gebied?
" + - "Geef de naam van de conservator énkel als die duidelijk online staat gepubliceerd.", - freeform: { - renderTemplate: "De conservator van dit gebied is {curator}", - template: "$$$", - key: "curator" - } - }), - new TagRenderingOptions( - { - question: "Wat is het email-adres van de beheerder?
" + - "Geef bij voorkeur het emailadres van de Natuurpunt-afdeling; geef enkel een email-adres van de conservator als dit duidelijk is gepubliceerd", - freeform: { - renderTemplate: "Bij problemen of vragen, de conservator kan bereikt worden via " + - "{email}", - template: "$email$", - key: "email" - } - }), - new TagRenderingOptions( - { - question: "Wat is het telefoonnummer van de beheerder?
" + - "Geef bij voorkeur het telefoonnummer van de Natuurpunt-afdeling; geef enkel een email-adres van de conservator als dit duidelijk is gepubliceerd", - freeform: { - renderTemplate: "Bij problemen of vragen, de {conservator} kan bereikt worden via " + - "{phone}", - template: "$phone$", - key: "phone" - } - - }), - - - ]; - - if (moreQuests) { - this.elementsToShow = - this.elementsToShow.concat(extraRenderings); - } - - - } -} \ No newline at end of file diff --git a/Customizations/Layouts/Natuurpunt.ts b/Customizations/Layouts/Natuurpunt.ts deleted file mode 100644 index 1ff287e..0000000 --- a/Customizations/Layouts/Natuurpunt.ts +++ /dev/null @@ -1,21 +0,0 @@ -import {Layout} from "../Layout"; -import {InformationBoard} from "../Layers/InformationBoard"; -import {NatureReserves} from "../Layers/NatureReserves"; - -export class Natuurpunt extends Layout{ - constructor() { - super( - "natuurpunt", - ["nl"], - "De natuur in", - ["birdhides", new InformationBoard(), new NatureReserves(true), "drinking_water"], - 12, - 51.20875, - 3.22435, - "

Natuurstuff

Geef meer gegevens over natuurgebieden en hun infoborden", - "", - "" - ); - this.icon = "./assets/layers/bird_hide/birdhide.svg" - } -} \ No newline at end of file diff --git a/Customizations/Layouts/StreetWidth.ts b/Customizations/StreetWidth/StreetWidth.ts similarity index 99% rename from Customizations/Layouts/StreetWidth.ts rename to Customizations/StreetWidth/StreetWidth.ts index 8f3aeb7..eeacf9f 100644 --- a/Customizations/Layouts/StreetWidth.ts +++ b/Customizations/StreetWidth/StreetWidth.ts @@ -1,5 +1,5 @@ import {Layout} from "../Layout"; -import {Widths} from "../Layers/Widths"; +import {Widths} from "./Widths"; export class StreetWidth extends Layout{ diff --git a/Customizations/Layers/Widths.ts b/Customizations/StreetWidth/Widths.ts similarity index 100% rename from Customizations/Layers/Widths.ts rename to Customizations/StreetWidth/Widths.ts diff --git a/assets/layers/tourism_information/board.svg b/assets/layers/information_board/board.svg similarity index 100% rename from assets/layers/tourism_information/board.svg rename to assets/layers/information_board/board.svg diff --git a/assets/layers/information_board/information_board.json b/assets/layers/information_board/information_board.json new file mode 100644 index 0000000..c1299d3 --- /dev/null +++ b/assets/layers/information_board/information_board.json @@ -0,0 +1,46 @@ +{ + "id": "information_boards", + "name": { + "nl": "Informatieborden", + "en": "Information boards" + }, + "minzoom": 12, + "overpassTags": { + "and": [ + "information=board" + ] + }, + "title": { + "render": { + "nl": "Informatiebord", + "en": "Information board" + } + }, + "description": {}, + "tagRenderings": [], + "hideUnderlayingFeaturesMinPercentage": 0, + "icon": { + "render": "./assets/layers/information_board/board.svg" + }, + "width": { + "render": "8" + }, + "iconSize": { + "render": "40,40,center" + }, + "color": { + "render": "#00f" + }, + "presets": [ + { + "tags": [ + "tourism=information", + "information=board" + ], + "title": { + "nl": "Informatiebord", + "en": "Information board" + } + } + ] +} \ No newline at end of file diff --git a/assets/layers/nature_reserve/nature_reserve.json b/assets/layers/nature_reserve/nature_reserve.json index 62f72c7..444d646 100644 --- a/assets/layers/nature_reserve/nature_reserve.json +++ b/assets/layers/nature_reserve/nature_reserve.json @@ -40,7 +40,295 @@ "description": { "nl": "Een natuurgebied is een gebied waar actief ruimte gemaakt word voor de natuur. Typisch zijn deze in beheer van Natuurpunt of het Agentschap Natuur en Bos of zijn deze erkend door de overheid." }, - "tagRenderings": [], + "tagRenderings": [ + { + "#": "Access tag", + "render": { + "nl": "De toegankelijkheid van dit gebied is: {access:description}" + }, + "question": { + "nl": "Is dit gebied toegankelijk?" + }, + "freeform": { + "key": "access:description" + }, + "mappings": [ + { + "if": { + "and": [ + "access=yes", + "fee=" + ] + }, + "then": { + "nl": "Vrij toegankelijk" + } + }, + { + "if": { + "and": [ + "access=no", + "fee=" + ] + }, + "then": { + "nl": "Niet toegankelijk" + } + }, + { + "if": { + "and": [ + "access=private", + "fee=" + ] + }, + "then": { + "nl": "Niet toegankelijk, want privégebied" + } + }, + { + "if": { + "and": [ + "access=permissive", + "fee=" + ] + }, + "then": { + "nl": "Toegankelijk, ondanks dat het privegebied is" + } + }, + { + "if": { + "and": [ + "access=guided", + "fee=" + ] + }, + "then": { + "nl": "Enkel toegankelijk met een gids of tijdens een activiteit" + } + }, + { + "if": { + "and": [ + "access=yes", + "fee=yes" + ] + }, + "then": { + "nl": "Toegankelijk mits betaling" + } + } + ] + }, + { + "#": "Operator tag", + "render": { + "nl": "Beheer door {operator}" + }, + "question": { + "nl": "Wie beheert dit gebied?" + }, + "freeform": { + "key": "operator" + }, + "mappings": [ + { + "if": { + "and": [ + "operator=Natuurpunt" + ] + }, + "then": { + "nl": "Dit gebied wordt beheerd door Natuurpunt" + } + }, + { + "if": { + "and": [ + "operator~(n|N)atuurpunt.*" + ] + }, + "then": { + "nl": "Dit gebied wordt beheerd door {operator}" + }, + "hideInAnswer": true + }, + { + "if": { + "and": [ + "operator=Agentschap Natuur en Bos" + ] + }, + "then": { + "nl": "Dit gebied wordt beheerd door het Agentschap Natuur en Bos" + } + } + ] + }, + { + "#": "Name:nl-tag", + "render": { + "nl": "Dit gebied heet {name:nl}" + }, + "question": { + "nl": "Wat is de Nederlandstalige naam van dit gebied?" + }, + "freeform": { + "key": "name:nl" + }, + "condition": { + "and": [ + "name:nl~*" + ] + } + }, + { + "#": "Name tag", + "render": { + "nl": "Dit gebied heet {name}" + }, + "question": { + "nl": "Wat is de naam van dit gebied?" + }, + "freeform": { + "key": "name", + "addExtraTags": [ + "noname=" + ] + }, + "condition": { + "and": [ + "name:nl=" + ] + }, + "mappings": [ + { + "if": { + "and": [ + "noname=yes", + "name=" + ] + }, + "then": { + "nl": "Dit gebied heeft geen naam" + } + } + ] + }, + { + "#": "Dogs?", + "question": { + "nl": "Zijn honden toegelaten in dit gebied?", + "en": "Are dogs allowed in this nature reserve?" + }, + "condition": { + "or": [ + "access=yes", + "access=permissive", + "access=guided" + ] + }, + "mappings": [ + { + "if": "dog=leashed", + "then": { + "nl": "Honden moeten aan de leiband", + "en": "Dogs have to be leashed" + } + }, + { + "if": "dog=no", + "then": { + "nl": "Honden zijn niet toegestaan", + "en": "No dogs allowed" + } + }, + { + "if": "dog=yes", + "then": { + "nl": "Honden zijn welkom en mogen vrij rondlopen", + "en": "Dogs are allowed to roam freely" + } + } + ] + }, + { + "#": "Website", + "question": { + "en": "On which webpage can one find more information about this nature reserve?", + "nl": "Op welke webpagina kan men meer informatie vinden over dit natuurgebied?" + }, + "render": "{website}", + "freeform": { + "key": "website", + "type": "url" + } + }, + { + "#": "Curator", + "question": { + "nl": "Wie is de conservator van dit gebied?
Respecteer privacy - geef deze naam enkel als die duidelijk is gepubliceerd", + "en": "Whom is the curator of this nature reserve?
Respect privacy - only fill out a name if this is widely published" + }, + "render": { + "nl": "{curator} is de beheerder van dit gebied", + "en": "{curator} is the curator of this nature reserve" + }, + "freeform": { + "key": "curator" + } + }, + { + "#": "Email", + "question": { + "nl": "Waar kan men naartoe emailen voor vragen en meldingen van dit natuurgebied?
Respecteer privacy - geef enkel persoonlijke emailadressen als deze elders zijn gepubliceerd", + "en": "What email adress can one send to with questions and problems with this nature reserve?
Respect privacy - only fill out a personal email address if this is widely published" + }, + "render": { + "nl": "{email}", + "en": "{email}" + }, + "freeform": { + "key": "email", + "type": "email" + } + }, + { + "#": "phone", + "question": { + "nl": "Waar kan men naartoe bellen voor vragen en meldingen van dit natuurgebied?
Respecteer privacy - geef enkel persoonlijke telefoonnummers als deze elders zijn gepubliceerd", + "en": "What phone number can one call to with questions and problems with this nature reserve?
Respect privacy - only fill out a personal phone number address if this is widely published" + }, + "render": { + "nl": "{phone}", + "en": "{phone}" + }, + "freeform": { + "key": "phone", + "type": "phone" + } + }, + { + "#": "Non-editable description {description}", + "render": { + "nl": "Extra info: {description}" + }, + "freeform": { + "key": "description" + } + }, + { + "#": "Editable description {description:0}", + "question": "Is er extra info die je kwijt wil?", + "render": { + "nl": "Extra info: {description:0}" + }, + "freeform": { + "key": "description:0" + } + } + ], "hideUnderlayingFeaturesMinPercentage": 10, "icon": { "render": "./assets/themes/buurtnatuur/nature_reserve.svg" diff --git a/assets/layers/tourism_information/guidepost.svg b/assets/layers/tourism_information/guidepost.svg deleted file mode 100644 index a1c0b6b..0000000 --- a/assets/layers/tourism_information/guidepost.svg +++ /dev/null @@ -1,83 +0,0 @@ - - - - - - - - - image/svg+xml - - - - - - - - - - - - - - diff --git a/assets/layers/tourism_information/info.png b/assets/layers/tourism_information/info.png deleted file mode 100644 index 35a2cc1..0000000 Binary files a/assets/layers/tourism_information/info.png and /dev/null differ diff --git a/assets/themes/buurtnatuur/buurtnatuur.json b/assets/themes/buurtnatuur/buurtnatuur.json index 70e76d3..979ef09 100644 --- a/assets/themes/buurtnatuur/buurtnatuur.json +++ b/assets/themes/buurtnatuur/buurtnatuur.json @@ -1,6 +1,7 @@ { "id": "buurtnatuur", "title": { + "#": "DO NOT TRANSLATE THIS THEME - this one is only meant to be in dutch!", "nl": "Breng jouw buurtnatuur in kaart" }, "shortDescription": { diff --git a/assets/themes/maps/maps.json b/assets/themes/maps/maps.json index f7be086..474172e 100644 --- a/assets/themes/maps/maps.json +++ b/assets/themes/maps/maps.json @@ -1,12 +1,12 @@ { "id": "maps", "title": { - "en": "Information boards", - "nl": "Informatieborden en kaarten" + "en": "A map of maps", + "nl": "Een kaart met Kaarten" }, "shortDescription": { - "en": "A map of maps and information boards", - "nl": "Een kaart met kaarten en informatieborden" + "en": "On this map, all the maps known by OpenStreetMap are shown", + "nl": "Een kaart met alle kaarten die OpenStreetMap kent" }, "description": { "en": "On this map you can find all maps OpenStreetMap knows.

If a map is missing, you can easily map this map on OpenStreetMap.", diff --git a/assets/themes/nature/nature.json b/assets/themes/nature/nature.json index 31169b1..e9b5177 100644 --- a/assets/themes/nature/nature.json +++ b/assets/themes/nature/nature.json @@ -24,6 +24,7 @@ "drinking_water", "birdhides", "maps", + "information_boards", "nature_reserves" ], "roamingRenderings": []