forked from OpenStreetBrowser/main
Stephan Bösch-Plepelits
5 years ago
4 changed files with 124 additions and 10 deletions
@ -0,0 +1,39 @@ |
|||
{ |
|||
"type": "overpass", |
|||
"name": { |
|||
"en": "Developable Areas" |
|||
}, |
|||
"query": { |
|||
"13": [ |
|||
"(", |
|||
"nwr[landuse~\"^(brownfield|greenfield)$\"];", |
|||
")" |
|||
] |
|||
}, |
|||
"feature": { |
|||
"pre": [ |
|||
"{% set key = 'landuse' %}", |
|||
"{% set value = tags.landuse %}" |
|||
], |
|||
"style": { |
|||
"color": "{{ const[value] }}" |
|||
}, |
|||
"markerSymbol": "{{ markerPointer({fillColor:const[value]})|raw }}", |
|||
"listMarkerSymbol": "{{ markerCircle({fillColor:const[value]})|raw }}", |
|||
"description": "{{ tagTrans(key, value) }}" |
|||
}, |
|||
"info": [ |
|||
"<table>", |
|||
"{% for value, color in const %}", |
|||
" <tr>", |
|||
" <td>{{ markerCircle({fillColor: color})|raw }}</td>", |
|||
" <td>{{ tagTrans('landuse', value) }}</td>", |
|||
" </tr>", |
|||
"{% endfor %}", |
|||
"</table>" |
|||
], |
|||
"const": { |
|||
"brownfield": "#c3701f", |
|||
"greenfield": "#009800" |
|||
} |
|||
} |
@ -0,0 +1,45 @@ |
|||
{ |
|||
"type": "overpass", |
|||
"name": { |
|||
"en": "Proposals" |
|||
}, |
|||
"query": { |
|||
"13": [ |
|||
"(", |
|||
"nwr[landuse~\"^(proposed)$\"];", |
|||
"nwr[highway~\"^(proposed)$\"];", |
|||
"nwr[railway~\"^(proposed)$\"];", |
|||
"nwr[building~\"^(proposed)$\"];", |
|||
"nwr[highway~\"^(proposed)$\"];", |
|||
"nwr[~\"^proposed:\"~\".\"];", |
|||
")" |
|||
] |
|||
}, |
|||
"feature": { |
|||
"pre": [ |
|||
"{% set key = null %}{% set value = null %}", |
|||
"{% if tags.highway == 'proposed' %}", |
|||
"{% set key = 'highway' %}", |
|||
"{% set value = tags.proposed|default('proposed') %}", |
|||
"{% elseif tags.railway == 'proposed' %}", |
|||
"{% set key = 'railway' %}", |
|||
"{% set value = tags.proposed|default('proposed') %}", |
|||
"{% elseif tags.building == 'proposed' %}", |
|||
"{% set key = 'building' %}", |
|||
"{% set value = tags.proposed|default('proposed') %}", |
|||
"{% elseif tags.landuse == 'proposed' %}", |
|||
"{% set key = 'landuse' %}", |
|||
"{% set value = tags.proposed|default('proposed') %}", |
|||
"{% else %}", |
|||
"{% for k, v in tags %}", |
|||
"{% set m = k|matches('^proposed:(.*)$') %}", |
|||
"{% if m %}", |
|||
"{% set key = m[1] %}", |
|||
"{% set value = v %}", |
|||
"{{ debug(key, value) }}", |
|||
"{% endif %}{% endfor %}", |
|||
"{% endif %}" |
|||
], |
|||
"description": "{{ tagTrans(key, value) }}" |
|||
} |
|||
} |
Write
Preview
Loading…
Cancel
Save
Reference in new issue