diff --git a/Customizations/Layers/Bos.ts b/Customizations/Layers/Bos.ts index e568839..b9b809c 100644 --- a/Customizations/Layers/Bos.ts +++ b/Customizations/Layers/Bos.ts @@ -47,6 +47,10 @@ export class Bos extends LayerDefinition { return function (properties: any) { let questionSeverity = 0; for (const qd of self.elementsToShow) { + if(qd instanceof DescriptionQuestion){ + continue; + } + if (qd.IsQuestioning(properties)) { questionSeverity = Math.max(questionSeverity, qd.Priority()); } diff --git a/Customizations/Layers/NatureReserves.ts b/Customizations/Layers/NatureReserves.ts index 8528a0e..f6b1abf 100644 --- a/Customizations/Layers/NatureReserves.ts +++ b/Customizations/Layers/NatureReserves.ts @@ -36,8 +36,11 @@ export class NatureReserves extends LayerDefinition { return function (properties: any) { let questionSeverity = 0; for (const qd of self.elementsToShow) { + if(qd instanceof DescriptionQuestion){ + continue; + } if (qd.IsQuestioning(properties)) { - questionSeverity = Math.max(questionSeverity, qd.options.priority ?? 0); + questionSeverity = Math.max(questionSeverity, qd.Priority() ?? 0); } } diff --git a/Customizations/Layers/Park.ts b/Customizations/Layers/Park.ts index c354fb4..aee1a23 100644 --- a/Customizations/Layers/Park.ts +++ b/Customizations/Layers/Park.ts @@ -17,8 +17,15 @@ export class Park extends LayerDefinition { {k: new Tag("access", "yes"), txt: "Publiek toegankelijk"}, {k: new Tag("access", ""), txt: "Publiek toegankelijk"}, {k: new Tag("access", "no"), txt: "Niet publiek toegankelijk"}, - {k: new Tag("access", "guided"), txt: "Enkel toegankelijk met een gids of op een activiteit"} - ] + {k: new Tag("access", "private"), txt: "Niet publiek toegankelijk, want privaat"}, + {k: new Tag("access", "guided"), txt: "Enkel toegankelijk met een gids of op een activiteit"}, + ], + freeform: { + key: "access", + renderTemplate: "Dit park is niet toegankelijk: {access}", + template: "De toegankelijkheid van dit park is: $$$" + }, + priority: 20 }) private operatorByDefault = new @@ -32,7 +39,8 @@ export class Park extends LayerDefinition { }, mappings: [{ k: null, txt: "De gemeente beheert dit park" - }] + }], + priority: 15 }); @@ -49,7 +57,8 @@ export class Park extends LayerDefinition { this.minzoom = 13; this.style = this.generateStyleFunction(); this.title = new NameInline("park"); - this.elementsToShow = [new NameQuestion(), + this.elementsToShow = [ + new NameQuestion(), this.accessByDefault, this.operatorByDefault, new DescriptionQuestion("park"), @@ -66,6 +75,9 @@ export class Park extends LayerDefinition { return function (properties: any) { let questionSeverity = 0; for (const qd of self.elementsToShow) { + if (qd instanceof DescriptionQuestion) { + continue; + } if (qd.IsQuestioning(properties)) { questionSeverity = Math.max(questionSeverity, qd.Priority() ?? 0); } diff --git a/Customizations/Questions/AccessTag.ts b/Customizations/Questions/AccessTag.ts index cb2de92..b86d243 100644 --- a/Customizations/Questions/AccessTag.ts +++ b/Customizations/Questions/AccessTag.ts @@ -6,7 +6,7 @@ import {And, Tag} from "../../Logic/TagsFilter"; export class AccessTag extends TagRenderingOptions { private static options = { - priority: 10, + priority: 20, question: "Is dit gebied toegankelijk?", primer: "Dit gebied is ", freeform: { diff --git a/Customizations/Questions/DescriptionQuestion.ts b/Customizations/Questions/DescriptionQuestion.ts index b017205..df6f0ba 100644 --- a/Customizations/Questions/DescriptionQuestion.ts +++ b/Customizations/Questions/DescriptionQuestion.ts @@ -12,7 +12,8 @@ export class DescriptionQuestion extends TagRenderingOptions{ key:"description:0", renderTemplate: "{description:0}", template: "$$$" - } + }, + priority: 14 }); } diff --git a/Customizations/Questions/NameQuestion.ts b/Customizations/Questions/NameQuestion.ts index bc5c351..9e8ef9b 100644 --- a/Customizations/Questions/NameQuestion.ts +++ b/Customizations/Questions/NameQuestion.ts @@ -9,7 +9,7 @@ import {Tag} from "../../Logic/TagsFilter"; export class NameQuestion extends TagRenderingOptions{ static options = { - priority: -1, // Move this last on the priority list, in order to prevent ppl to enter access restrictions and descriptions + priority: 10, // Move this last on the priority list, in order to prevent ppl to enter access restrictions and descriptions question: "Wat is de officiƫle naam van dit gebied?
" + "Zelf een naam bedenken wordt afgeraden.
" + "Een beschrijving van het gebied geven kan in een volgende stap.
" + diff --git a/Customizations/Questions/OperatorTag.ts b/Customizations/Questions/OperatorTag.ts index 5cc61a3..8581a3b 100644 --- a/Customizations/Questions/OperatorTag.ts +++ b/Customizations/Questions/OperatorTag.ts @@ -8,7 +8,7 @@ export class OperatorTag extends TagRenderingOptions { private static options = { - priority: 5, + priority: 15, question: "Wie beheert dit gebied?", freeform: { key: "operator", diff --git a/index.html b/index.html index 52e1f10..42d433e 100644 --- a/index.html +++ b/index.html @@ -9,7 +9,10 @@ integrity="sha512-xwE/Az9zrjBIphAcBb3F6JVqxf46+CDLwfLMHloNu6KEQCAWi6HcDUbeOfBIptF7tcCzusKFjFw2yuvEpDL9wQ==" crossorigin=""/> - + + + +