forked from MapComplete/MapComplete
Add parks and forests to etymology
This commit is contained in:
parent
d3550fefbe
commit
0c9ee8631e
3 changed files with 28 additions and 6 deletions
|
@ -48,9 +48,8 @@ class MultiApplyExecutor {
|
||||||
const self = this;
|
const self = this;
|
||||||
const relevantValues = p.tagsSource.map(tags => {
|
const relevantValues = p.tagsSource.map(tags => {
|
||||||
const currentValues = p.keysToApply.map(key => tags[key])
|
const currentValues = p.keysToApply.map(key => tags[key])
|
||||||
const v = JSON.stringify(currentValues) // By stringifying, we have a very clear ping when they changec
|
// By stringifying, we have a very clear ping when they changec
|
||||||
console.log("Values are", v)
|
return JSON.stringify(currentValues);
|
||||||
return v;
|
|
||||||
})
|
})
|
||||||
relevantValues.addCallbackD(_ => {
|
relevantValues.addCallbackD(_ => {
|
||||||
self.applyTaggingOnOtherFeatures()
|
self.applyTaggingOnOtherFeatures()
|
||||||
|
@ -134,7 +133,7 @@ export default class MultiApply extends Toggle {
|
||||||
|
|
||||||
const elems: (string | BaseUIElement)[] = []
|
const elems: (string | BaseUIElement)[] = []
|
||||||
if (p.autoapply) {
|
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 =>
|
elems.push(new VariableUiElement(p.featureIds.map(featureIds =>
|
||||||
t.autoApply.Subs({
|
t.autoApply.Subs({
|
||||||
attr_names: p.keysToApply.join(", "),
|
attr_names: p.keysToApply.join(", "),
|
||||||
|
|
|
@ -24,8 +24,7 @@
|
||||||
"nl": "Alle lagen met een gelinkt etymology"
|
"nl": "Alle lagen met een gelinkt etymology"
|
||||||
},
|
},
|
||||||
"calculatedTags": [
|
"calculatedTags": [
|
||||||
"_same_name_ids=feat.closestn('*', 250, undefined, 2500)?.filter(f => f.feat.properties.name === feat.properties.name)?.map(f => f.feat.properties.id)??[]",
|
"_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"
|
|
||||||
],
|
],
|
||||||
"tagRenderings": [
|
"tagRenderings": [
|
||||||
{
|
{
|
||||||
|
|
|
@ -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
|
"hideFromOverview": true
|
||||||
|
|
Loading…
Reference in a new issue