forked from MapComplete/MapComplete
Themes(rolling_stock): add snap to 'railway' function
This commit is contained in:
parent
c70f249ca4
commit
06da7a0cf4
4 changed files with 84 additions and 5 deletions
|
@ -131,7 +131,8 @@
|
||||||
},
|
},
|
||||||
"tags": [
|
"tags": [
|
||||||
"historic=locomotive"
|
"historic=locomotive"
|
||||||
]
|
],
|
||||||
|
"snapToLayer": ["railway"]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"title": {
|
"title": {
|
||||||
|
@ -144,7 +145,9 @@
|
||||||
},
|
},
|
||||||
"tags": [
|
"tags": [
|
||||||
"historic=railway_car"
|
"historic=railway_car"
|
||||||
]
|
],
|
||||||
|
"snapToLayer": ["railway"]
|
||||||
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"title": {
|
"title": {
|
||||||
|
@ -157,7 +160,9 @@
|
||||||
},
|
},
|
||||||
"tags": [
|
"tags": [
|
||||||
"historic=minecart"
|
"historic=minecart"
|
||||||
]
|
],
|
||||||
|
"snapToLayer": ["railway"]
|
||||||
|
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"tagRenderings": [
|
"tagRenderings": [
|
||||||
|
|
66
assets/layers/railway/railway.json
Normal file
66
assets/layers/railway/railway.json
Normal file
|
@ -0,0 +1,66 @@
|
||||||
|
{
|
||||||
|
"id": "railway",
|
||||||
|
"name": {
|
||||||
|
"en": "Railway"
|
||||||
|
},
|
||||||
|
"description": {
|
||||||
|
"en": "Railways and disused railways"
|
||||||
|
},
|
||||||
|
"source": {
|
||||||
|
"osmTags": {
|
||||||
|
"or": [
|
||||||
|
"railway=rail",
|
||||||
|
"railway=tram",
|
||||||
|
"railway=subway",
|
||||||
|
"railway=light_rail",
|
||||||
|
|
||||||
|
"railway=disused",
|
||||||
|
|
||||||
|
"disused:railway=rail",
|
||||||
|
"disused:railway=tram",
|
||||||
|
"disused:railway=subway",
|
||||||
|
"disused:railway=light_rail",
|
||||||
|
|
||||||
|
"abandoned:railway=rail",
|
||||||
|
"abandoned:railway=tram",
|
||||||
|
"abandoned:railway=subway",
|
||||||
|
"abandoned:railway=light_rail"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"minzoom": 14,
|
||||||
|
"title": {
|
||||||
|
"render": {
|
||||||
|
"en": "Railway"
|
||||||
|
},
|
||||||
|
"icon": "./assets/svg/train.svg"
|
||||||
|
},
|
||||||
|
"pointRendering": [
|
||||||
|
{
|
||||||
|
"location": [
|
||||||
|
"point"
|
||||||
|
],
|
||||||
|
"marker": [
|
||||||
|
{
|
||||||
|
"icon": "circle"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"lineRendering": [
|
||||||
|
{
|
||||||
|
"width": 1,
|
||||||
|
"color": "black"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"tagRenderings": [
|
||||||
|
"images"
|
||||||
|
],
|
||||||
|
"allowMove": false,
|
||||||
|
"#": "In first instance to snap historic rolling stock",
|
||||||
|
"snapName": {
|
||||||
|
"en": "railway track"
|
||||||
|
},
|
||||||
|
"credits": "mnalis ALTernative",
|
||||||
|
"credits:uid": 172435
|
||||||
|
}
|
|
@ -18,6 +18,14 @@
|
||||||
},
|
},
|
||||||
"icon": "./assets/layers/historic_rolling_stock/steam_locomotive.svg",
|
"icon": "./assets/layers/historic_rolling_stock/steam_locomotive.svg",
|
||||||
"layers": [
|
"layers": [
|
||||||
"historic_rolling_stock"
|
"historic_rolling_stock",
|
||||||
|
{
|
||||||
|
"builtin": "railway",
|
||||||
|
"override": {
|
||||||
|
"name": null,
|
||||||
|
"presets": null,
|
||||||
|
"shownByDefault": false
|
||||||
|
}
|
||||||
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
|
@ -299,7 +299,7 @@ export interface LayerConfigJson {
|
||||||
/**
|
/**
|
||||||
* Advanced option - might be set by the theme compiler
|
* Advanced option - might be set by the theme compiler
|
||||||
*
|
*
|
||||||
* If true, this data will _always_ be loaded, even if the theme is disabled by a filter or hidden.
|
* If true, this data will _always_ be loaded, even if the layer is disabled by a filter or hidden.
|
||||||
* The opposite of `doNotDownload`
|
* The opposite of `doNotDownload`
|
||||||
*
|
*
|
||||||
* question: Should this layer be forcibly loaded?
|
* question: Should this layer be forcibly loaded?
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue