forked from MapComplete/MapComplete
Add link to nearby drinking water points with some fancy calculated tag magic
This commit is contained in:
parent
bec1998a6d
commit
fa5b92e6e1
3 changed files with 11 additions and 4 deletions
|
@ -41,6 +41,10 @@
|
|||
]
|
||||
}
|
||||
},
|
||||
"calculatedTags": [
|
||||
"_closest_other_drinking_water_id=feat.closest('drinking_water').id",
|
||||
"_closest_other_drinking_water_distance=Math.floor(feat.distanceTo(feat.closest('drinking_water')) * 1000)"
|
||||
],
|
||||
"minzoom": 13,
|
||||
"wayHandling": 1,
|
||||
"presets": [
|
||||
|
@ -122,6 +126,11 @@
|
|||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"render":{
|
||||
"en": "<a href='#{_closest_other_drinking_water_id}'>The closest other drinking water fountain is {_closest_other_drinking_water_distance} meter</a>"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue