From 0c9ee8631e3841a12f1cf8f70fecddd16bbea64f Mon Sep 17 00:00:00 2001 From: pietervdvn Date: Tue, 12 Oct 2021 02:25:31 +0200 Subject: [PATCH] Add parks and forests to etymology --- UI/Popup/MultiApply.ts | 7 +++---- assets/layers/etymology/etymology.json | 3 +-- assets/themes/etymology.json | 24 ++++++++++++++++++++++++ 3 files changed, 28 insertions(+), 6 deletions(-) diff --git a/UI/Popup/MultiApply.ts b/UI/Popup/MultiApply.ts index 30575cdd5..159bdd321 100644 --- a/UI/Popup/MultiApply.ts +++ b/UI/Popup/MultiApply.ts @@ -48,9 +48,8 @@ class MultiApplyExecutor { const self = this; const relevantValues = p.tagsSource.map(tags => { const currentValues = p.keysToApply.map(key => tags[key]) - const v = JSON.stringify(currentValues) // By stringifying, we have a very clear ping when they changec - console.log("Values are", v) - return v; + // By stringifying, we have a very clear ping when they changec + return JSON.stringify(currentValues); }) relevantValues.addCallbackD(_ => { self.applyTaggingOnOtherFeatures() @@ -134,7 +133,7 @@ export default class MultiApply extends Toggle { const elems: (string | BaseUIElement)[] = [] if (p.autoapply) { - elems.push(new Combine([new FixedUiElement(p.text).SetClass("block") ]).SetClass("flex")) + elems.push(new FixedUiElement(p.text).SetClass("block")) elems.push(new VariableUiElement(p.featureIds.map(featureIds => t.autoApply.Subs({ attr_names: p.keysToApply.join(", "), diff --git a/assets/layers/etymology/etymology.json b/assets/layers/etymology/etymology.json index df89f5f81..dc1ed4ad2 100644 --- a/assets/layers/etymology/etymology.json +++ b/assets/layers/etymology/etymology.json @@ -24,8 +24,7 @@ "nl": "Alle lagen met een gelinkt etymology" }, "calculatedTags": [ - "_same_name_ids=feat.closestn('*', 250, undefined, 2500)?.filter(f => f.feat.properties.name === feat.properties.name)?.map(f => f.feat.properties.id)??[]", - "_total_segments=JSON.parse(feat.properties._same_name_ids).length + 1 // Plus one for the feature itself" + "_same_name_ids=feat.closestn('*', 250, undefined, 2500)?.filter(f => f.feat.properties.name === feat.properties.name)?.map(f => f.feat.properties.id)??[]" ], "tagRenderings": [ { diff --git a/assets/themes/etymology.json b/assets/themes/etymology.json index 3aa346dc3..5829b25f8 100644 --- a/assets/themes/etymology.json +++ b/assets/themes/etymology.json @@ -45,6 +45,30 @@ } } } + }, + { + "builtin": "etymology", + "override": { + "id": "parks_and_forests_without_etymology", + "name": { + "en": "Parks and forests without etymology information", + "nl": "Parken en bossen zonder etymologische informatie" + }, + "minzoom": 18, + "source": { + "osmTags": { + "and": [ + "name~*", + { + "or": [ + "leisure=park", + "landuse=forest" + ] + } + ] + } + } + } } ], "hideFromOverview": true