Compare commits

...

8 Commits

  1. 25
      gastro.json
  2. 53
      leisure.json
  3. 117
      railway-infrastructure.json

25
gastro.json

@ -17,7 +17,7 @@
"uk": "Гастрономія" "uk": "Гастрономія"
}, },
"query": { "query": {
"16": "(node[amenity~'^(bar|biergarten|cafe|fast_food|ice_cream|pub|restaurant)$'];way[amenity~'^(bar|biergarten|cafe|fast_food|ice_cream|pub|restaurant)$'];relation[amenity~'^(bar|biergarten|cafe|fast_food|ice_cream|pub|restaurant)$'];);"
"15": "(node[amenity~'^(bar|biergarten|cafe|fast_food|ice_cream|pub|restaurant)$'];way[amenity~'^(bar|biergarten|cafe|fast_food|ice_cream|pub|restaurant)$'];relation[amenity~'^(bar|biergarten|cafe|fast_food|ice_cream|pub|restaurant)$'];);"
}, },
"feature": { "feature": {
"description": "{{ tagTrans('amenity', tags.amenity) }}", "description": "{{ tagTrans('amenity', tags.amenity) }}",
@ -30,6 +30,25 @@
" </li>", " </li>",
"</ul>" "</ul>"
], ],
"markerSign": "{% if tags.amenity=='bar' %}&#127864;{% elseif tags.amenity=='biergarten'%}&#127867;{% elseif tags.amenity=='cafe' %}&#9749;{% elseif tags.amenity=='fast_food' %}&#127828;{% elseif tags.amenity=='ice_cream' %}&#127848;{% elseif tags.amenity=='pub' %}&#127866;{% else %}&#127860;{% endif %}"
"markerSign": "{{ const[tags.amenity]|raw }}"
},
"info": [
"<table>",
"{% for value, sign in const %}",
" <tr>",
" <td>{{ markerCircle({})|raw }}<div class='sign'>{{ sign|raw }}</div></td>",
" <td>{{ tagTrans('amenity', value) }}</td>",
" </tr>",
"{% endfor %}",
"</table>"
],
"const": {
"bar": "&#127864;",
"biergarten": "&#127867;",
"cafe": "&#9749;",
"fast_food": "&#127828;",
"ice_cream": "&#127848;",
"pub": "&#127866;",
"restaurant": "&#127860;"
} }
}
}

53
leisure.json

@ -29,6 +29,57 @@
"{% if tags.leisure == 'pitch' and tags.sport %}", "{% if tags.leisure == 'pitch' and tags.sport %}",
"- {{ tagTransList('sport', tags.sport) }}", "- {{ tagTransList('sport', tags.sport) }}",
"{% endif %}" "{% endif %}"
],
"markerSign": [
"{% if const[tags.leisure] %}",
"{{ const[tags.leisure].sign|raw }}",
"{% endif %}"
],
"markerSymbol": [
"{% if const[tags.leisure] %}",
"{{ markerPointer(const[tags.leisure].symbol)|raw }}",
"{% else %}",
"{{ markerPointer({})|raw }}",
"{% endif %}"
],
"listMarkerSymbol": [
"{% if const[tags.leisure] %}",
"{{ markerCircle(const[tags.leisure].symbol)|raw }}",
"{% else %}",
"{{ markerCircle({})|raw }}",
"{% endif %}"
] ]
},
"info": [
"<table>",
"{% for value, data in const %}",
" <tr>",
" <td>{{ markerCircle(data.symbol)|raw }}<div class='sign'>{{ data.sign|raw }}</div></td>",
" <td>{{ tagTrans('leisure', value) }}</td>",
" </tr>",
"{% endfor %}",
" <tr>",
" <td>{{ markerCircle({})|raw }}</td>",
" <td>{{ trans('other') }}</td>",
" </tr>",
"</table>"
],
"const": {
"garden": {
"symbol": {
"fillColor": "#00cf00"
},
"sign": "<img src='maki:garden'>"
},
"park": {
"symbol": {
"fillColor": "#00cf00"
},
"sign": "<img src='maki:park'>"
},
"playground": {
"symbol": {},
"sign": "<img src='maki:playground'>"
}
} }
}
}

117
railway-infrastructure.json

@ -10,6 +10,19 @@
"17": "(node[railway];way[railway];)" "17": "(node[railway];way[railway];)"
}, },
"feature": { "feature": {
"pre": [
"{% set railway_type = null %}",
"",
"{% if tags.railway == 'disused' %}",
" {% set railway_type = attribute(tags, 'disused:railway')|default(tags.disused)|default('rail') %}",
"{% elseif tags.railway == 'abandoned' %}",
" {% set railway_type = attribute(tags, 'abandoned:railway')|default(tags.abandoned)|default('rail') %}",
"{% elseif tags.railway == 'proposed' %}",
" {% set railway_type = attribute(tags, 'proposed:railway')|default(tags.proposed)|default('rail') %}",
"{% elseif tags.railway in [ 'rail', 'narrow_gauge', 'subway', 'light_rail', 'tram' ] %}",
" {% set railway_type = tags.railway %}",
"{% endif %}"
],
"title": "{% if tags.ref %}{{ localizedTag(tags, 'ref') }} - {% endif %}{{ localizedTag(tags, 'name')|default(localizedTag(tags, 'operator'))|default(trans('unnamed')) }}", "title": "{% if tags.ref %}{{ localizedTag(tags, 'ref') }} - {% endif %}{{ localizedTag(tags, 'name')|default(localizedTag(tags, 'operator'))|default(trans('unnamed')) }}",
"description": "{{ tagTrans('railway', tags.railway) }}", "description": "{{ tagTrans('railway', tags.railway) }}",
"body": [ "body": [
@ -20,14 +33,14 @@
"{% if tags.electrified == 'no' %}{{ keyTrans('electrified') }}: {{ tagTrans('electrified', 'no') }}{% elseif tags.electrified %}{{ keyTrans('electrified') }}: {{ tagTrans('electrified', tags.electrified) }}, {{ keyTrans('voltage') }}: {{ tags.voltage|default(trans('unknown')) }}, {{ keyTrans('frequency') }}: {{ tags.frequency|default(trans('unknown')) }}<br/>{% endif %}", "{% if tags.electrified == 'no' %}{{ keyTrans('electrified') }}: {{ tagTrans('electrified', 'no') }}{% elseif tags.electrified %}{{ keyTrans('electrified') }}: {{ tagTrans('electrified', tags.electrified) }}, {{ keyTrans('voltage') }}: {{ tags.voltage|default(trans('unknown')) }}, {{ keyTrans('frequency') }}: {{ tags.frequency|default(trans('unknown')) }}<br/>{% endif %}",
"" ""
], ],
"markerSign": "{% if tags.railway in [ 'halt', 'tram_stop', 'station', 'stop', 'subway_entrance' ] %}X{% endif %}",
"markerSign": "{% if tags.railway in [ 'halt', 'tram_stop', 'station', 'stop', 'subway_entrance' ] %}H{% endif %}",
"markerSymbol": [ "markerSymbol": [
"{% if tags.railway == 'signal' %}", "{% if tags.railway == 'signal' %}",
"<svg anchorX='5' anchorY='8' width='9' height='15'>", "<svg anchorX='5' anchorY='8' width='9' height='15'>",
" <rect x='0.5' y='0.5' width='8' height='14' style='fill: #000000; fill-opacity: 1;' />", " <rect x='0.5' y='0.5' width='8' height='14' style='fill: #000000; fill-opacity: 1;' />",
" <circle cx='4.5' cy='4.5' r='2.5' style='stroke-width: 1; stroke: #000000; fill: #7f7f7f;'/>", " <circle cx='4.5' cy='4.5' r='2.5' style='stroke-width: 1; stroke: #000000; fill: #7f7f7f;'/>",
" <circle cx='4.5' cy='10.5' r='2.5' style='stroke-width: 1; stroke: #000000; fill: #ff0000;'/>", " <circle cx='4.5' cy='10.5' r='2.5' style='stroke-width: 1; stroke: #000000; fill: #ff0000;'/>",
"</svg>",
"</Xsvg>",
"{% elseif tags.railway == 'switch' %}", "{% elseif tags.railway == 'switch' %}",
"<svg anchorX='5' anchorY='8' width='9' height='15'>", "<svg anchorX='5' anchorY='8' width='9' height='15'>",
" <rect x='0.5' y='0.5' width='8' height='14' style='fill: #ffffff; fill-opacity: 1;' />", " <rect x='0.5' y='0.5' width='8' height='14' style='fill: #ffffff; fill-opacity: 1;' />",
@ -40,8 +53,6 @@
" <line x1='2' x2='7' y1='2' y2='13' style='stroke-width: 2; stroke: #000000; stroke-linecap: round;'/>", " <line x1='2' x2='7' y1='2' y2='13' style='stroke-width: 2; stroke: #000000; stroke-linecap: round;'/>",
" <line x1='7' x2='2' y1='2' y2='13' style='stroke-width: 2; stroke: #000000; stroke-linecap: round;'/>", " <line x1='7' x2='2' y1='2' y2='13' style='stroke-width: 2; stroke: #000000; stroke-linecap: round;'/>",
"</svg>", "</svg>",
"{% elseif tags.railway not in [ 'rail', 'tram', 'subway', 'narrow_gauge', 'abandoned', 'disused' ] %}",
"{{ markerPointer({})|raw }}",
"{% endif %}" "{% endif %}"
], ],
"listMarkerSymbol": [ "listMarkerSymbol": [
@ -58,30 +69,43 @@
"{% else %}5", "{% else %}5",
"{% endif %}" "{% endif %}"
], ],
"styles": "{% if tags.railway == 'narrow_gauge' %}default,casing{% else %}default{% endif %}",
"styles": [
"{% if railway_type %}",
"highlight,default",
"{% else %}",
"default",
"{% endif %}"
],
"style": { "style": {
"width": [ "width": [
"{% if tags.service == 'yard' or tags.service == 'siding' or tags.service == 'spur' or tags.service == 'crossover' %}",
"{% if tags.railway in [ 'platform' ] %}",
"1",
"{% elseif tags.railway in [ 'signal', 'switch', 'railway_crossing' ] %}",
"0",
"{% elseif tags.service == 'yard' or tags.service == 'siding' or tags.service == 'spur' or tags.service == 'crossover' %}",
"1", "1",
"{% elseif tags.usage == 'main' or tags.usage == 'branch' %}",
" 3",
"{% else %}", "{% else %}",
" {% if tags.railway == 'rail' %}",
" {% if tags.usage == 'main' or tags.usage == 'branch' %}",
" 3",
" {% else %}",
" 2",
" {% endif %}",
" {% elseif tags.railway == 'platform' %}",
" 1",
" {% elseif tags.railway in [ 'signal', 'switch', 'railway_crossing' ] %}",
" 0",
" {% else %}",
" 2", " 2",
" {% endif %}",
"{% endif %}" "{% endif %}"
], ],
"color": "{% if tags.railway == 'rail' or tags.railway == 'narrow_gauge' or tags.railway == 'disused' %}{% if tags.usage == 'main' %}#ff8100{% elseif tags.usage == 'branch' %}#daca00{% else %}#000000{% endif %}{% elseif tags.railway == 'subway' %}#0000ff{% elseif tags.railway == 'tram' %}#ff00ff{% elseif tags.railway == 'light_rail' %}#00BD14{% elseif tags.railway == 'platform' %}#3f3f3f{% else %}#000000{% endif %}",
"color": "{{ const[railway_type].color }}",
"opacity": "1", "opacity": "1",
"dashArray": "{% if tags.railway == 'rail' %}{% elseif tags.railway == 'disused' %}1,5{% elseif tags.railway == 'abandoned' %}1,7{% endif %}",
"lineCap": [
"{% if tags.railway in [ 'disused', 'abandoned', 'proposed' ] %}",
"butt",
"{% else %}",
"round",
"{% endif %}"
],
"dashArray": [
"{% if tags.railway == 'disused' %}1,5",
"{% elseif tags.railway == 'abandoned' %}1,7",
"{% elseif tags.railway == 'proposed' %}2,2",
"{% elseif tags.tunnel %}5,5",
"{% endif %}"
],
"fill": [ "fill": [
"{% if tags.railway == 'platform' %}", "{% if tags.railway == 'platform' %}",
"1", "1",
@ -105,11 +129,21 @@
"{% endif %}" "{% endif %}"
] ]
}, },
"style:casing": {
"width": "{% if tags.service == 'yard' or tags.service == 'siding' or tags.service == 'spur' or tags.service == 'crossover' %}5{% else %}{% if tags.railway == 'rail' %}{% if tags.usage == 'main' or tags.usage == 'branch' %}7{% else %}6{% endif %}{% elseif tags.railway == 'platform' %}5{% else %}6{% endif %}{% endif %}",
"color": "{% if tags.railway == 'rail' or tags.railway == 'narrow_gauge' or tags.railway == 'disused' %}{% if tags.usage == 'main' %}#ff8100{% elseif tags.usage == 'branch' %}#daca00{% else %}#000000{% endif %}{% elseif tags.railway == 'subway' %}#0000ff{% elseif tags.railway == 'tram' %}#ff00ff{% elseif tags.railway == 'light_rail' %}#00BD14{% elseif tags.railway == 'platform' %}#3f3f3f{% else %}#000000{% endif %}",
"lineCap": "butt",
"dashArray": "2,4"
"style:highlight": {
"width": [
"{% if tags.railway in [ 'platform' ] %}",
"1",
"{% elseif tags.railway in [ 'signal', 'switch', 'railway_crossing' ] %}",
"0",
"{% elseif tags.service == 'yard' or tags.service == 'siding' or tags.service == 'spur' or tags.service == 'crossover' %}",
"1",
"{% elseif tags.usage == 'main' or tags.usage == 'branch' %}",
" 3",
"{% else %}",
" 2",
"{% endif %}"
],
"color": "#ffffff"
} }
}, },
"info": [ "info": [
@ -119,6 +153,10 @@
" <td>{{ tagTrans('railway', 'rail') }}, {{ keyTrans('usage') }}: {{ tagTrans('usage', 'main') }}</td>", " <td>{{ tagTrans('railway', 'rail') }}, {{ keyTrans('usage') }}: {{ tagTrans('usage', 'main') }}</td>",
" </tr>", " </tr>",
" <tr>", " <tr>",
" <td>{{ markerLine(evaluate({ \"railway\": \"rail\", \"usage\": \"branch\" }))|raw }}</td>",
" <td>{{ tagTrans('railway', 'rail') }}, {{ keyTrans('usage') }}: {{ tagTrans('usage', 'branch') }}</td>",
" </tr>",
" <tr>",
" <td>{{ markerLine(evaluate({ \"railway\": \"rail\" }))|raw }}</td>", " <td>{{ markerLine(evaluate({ \"railway\": \"rail\" }))|raw }}</td>",
" <td>{{ tagTrans('railway', 'rail') }}</td>", " <td>{{ tagTrans('railway', 'rail') }}</td>",
" </tr>", " </tr>",
@ -127,13 +165,13 @@
" <td>{{ tagTrans('railway', 'narrow_gauge') }}</td>", " <td>{{ tagTrans('railway', 'narrow_gauge') }}</td>",
" </tr>", " </tr>",
" <tr>", " <tr>",
" <td>{{ markerLine(evaluate({ \"railway\": \"light_rail\" }))|raw }}</td>",
" <td>{{ tagTrans('railway', 'light_rail') }}</td>",
" </tr>",
" <tr>",
" <td>{{ markerLine(evaluate({ \"railway\": \"subway\" }))|raw }}</td>", " <td>{{ markerLine(evaluate({ \"railway\": \"subway\" }))|raw }}</td>",
" <td>{{ tagTrans('railway', 'subway') }}</td>", " <td>{{ tagTrans('railway', 'subway') }}</td>",
" </tr>", " </tr>",
" <tr>",
" <td>{{ markerLine(evaluate({ \"railway\": \"light_rail\" }))|raw }}</td>",
" <td>{{ tagTrans('railway', 'light_rail') }}</td>",
" </tr>",
"{% if map.zoom >= 14 %}", "{% if map.zoom >= 14 %}",
" <tr>", " <tr>",
" <td>{{ markerLine(evaluate({ \"railway\": \"tram\" }))|raw }}</td>", " <td>{{ markerLine(evaluate({ \"railway\": \"tram\" }))|raw }}</td>",
@ -141,5 +179,22 @@
" </tr>", " </tr>",
"{% endif %}", "{% endif %}",
"</table>" "</table>"
]
}
],
"const": {
"rail": {
"color": "#000000"
},
"narrow_gauge": {
"color": "#7f003f"
},
"subway": {
"color": "#0000ff"
},
"light_rail": {
"color": "#7f00ff"
},
"tram": {
"color": "#ff00ff"
}
}
}
Loading…
Cancel
Save