Add parks and forests to etymology

This commit is contained in:
pietervdvn 2021-10-12 02:25:31 +02:00
parent d3550fefbe
commit 0c9ee8631e
3 changed files with 28 additions and 6 deletions

View file

@ -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(", "),

View file

@ -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": [
{

View file

@ -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