forked from MapComplete/MapComplete
Themes(aircraft): add historical aircraft layer and theme, https://en.osm.town/@pietervdvn/114491536018069317
This commit is contained in:
parent
8edc20469e
commit
29db2664c3
4 changed files with 127 additions and 2 deletions
110
assets/layers/historic_aircraft/historic_aircraft.json
Normal file
110
assets/layers/historic_aircraft/historic_aircraft.json
Normal file
|
@ -0,0 +1,110 @@
|
||||||
|
{
|
||||||
|
"id": "historic_aircraft",
|
||||||
|
"name": {
|
||||||
|
"en": "Historic aircraft"
|
||||||
|
},
|
||||||
|
"source": {
|
||||||
|
"osmTags": {
|
||||||
|
"or": [
|
||||||
|
"historic=aircraft",
|
||||||
|
"memorial=aircraft"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"minzoom": 5,
|
||||||
|
"title": {
|
||||||
|
"render": {
|
||||||
|
"en": "Historic aircraft"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"pointRendering": [
|
||||||
|
{
|
||||||
|
"location": [
|
||||||
|
"point",
|
||||||
|
"centroid"
|
||||||
|
],
|
||||||
|
"marker": [
|
||||||
|
{
|
||||||
|
"icon": "circle",
|
||||||
|
"color": "white"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"icon": "airport"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"lineRendering": [
|
||||||
|
{
|
||||||
|
"width": 1,
|
||||||
|
"color": "blue"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"presets": [
|
||||||
|
{
|
||||||
|
"title": {
|
||||||
|
"en": "a aircraft on a permanent location"
|
||||||
|
},
|
||||||
|
"description": {
|
||||||
|
"en": "A (historic) aircraft permanently installed on a location, e.g. in a museum, as artwork or as memorial."
|
||||||
|
},
|
||||||
|
"tags": [
|
||||||
|
"historic=aircraft"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"tagRenderings": [
|
||||||
|
"images",
|
||||||
|
{
|
||||||
|
"question": {
|
||||||
|
"en": "What type of model is this aircraft?"
|
||||||
|
},
|
||||||
|
"id": "model",
|
||||||
|
"freeform": {
|
||||||
|
"key": "model:wikidata",
|
||||||
|
"type": "wikidata"
|
||||||
|
},
|
||||||
|
"render": {
|
||||||
|
"en": "{wikipedia(model:wikidata)}"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "is_memorial",
|
||||||
|
"question": {
|
||||||
|
"en": "Does this aircraft also serve as a memorial?"
|
||||||
|
},
|
||||||
|
"mappings": [
|
||||||
|
{
|
||||||
|
"if": "memorial=aircraft",
|
||||||
|
"then": {
|
||||||
|
"en": "Serves as a memorial"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"if": "not:memorial=yes",
|
||||||
|
"alsoShowIf": "memorial=",
|
||||||
|
"then": {
|
||||||
|
"en": "Does not serve as a memorial"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"builtin": "memorial.memorial-questions",
|
||||||
|
"override": {
|
||||||
|
"condition": {
|
||||||
|
"and+": [
|
||||||
|
"memorial~*"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"deletion": true,
|
||||||
|
"allowMove": {
|
||||||
|
"enableImproveAccuracy": true,
|
||||||
|
"enableRelocation": false
|
||||||
|
},
|
||||||
|
"credits": "Pieter Vander Vennet",
|
||||||
|
"credits:uid": 3818858
|
||||||
|
}
|
13
assets/themes/historic_aircraft/historic_aircraft.json
Normal file
13
assets/themes/historic_aircraft/historic_aircraft.json
Normal file
|
@ -0,0 +1,13 @@
|
||||||
|
{
|
||||||
|
"id": "historic_aircraft",
|
||||||
|
"title": {
|
||||||
|
"en": "Historic aircraft"
|
||||||
|
},
|
||||||
|
"description": {
|
||||||
|
"en": "A map showing all historic, permanently installed aircraft. The aircraft can be in a museum, an artwork or a memorial."
|
||||||
|
},
|
||||||
|
"icon": "airport",
|
||||||
|
"layers": [
|
||||||
|
"historic_aircraft"
|
||||||
|
]
|
||||||
|
}
|
|
@ -41,7 +41,8 @@
|
||||||
{
|
{
|
||||||
"builtin": [
|
"builtin": [
|
||||||
"bench",
|
"bench",
|
||||||
"artwork"
|
"artwork",
|
||||||
|
"historic_aircraft"
|
||||||
],
|
],
|
||||||
"override": {
|
"override": {
|
||||||
"minzoom": 18
|
"minzoom": 18
|
||||||
|
|
|
@ -14,12 +14,13 @@
|
||||||
|
|
||||||
import Locale from "../i18n/Locale"
|
import Locale from "../i18n/Locale"
|
||||||
import DefaultIcon from "../Map/DefaultIcon.svelte"
|
import DefaultIcon from "../Map/DefaultIcon.svelte"
|
||||||
|
import { WithSearchState } from "../../Models/ThemeViewState/WithSearchState"
|
||||||
|
|
||||||
export let activeFilters: (FilterSearchResult & ActiveFilter)[]
|
export let activeFilters: (FilterSearchResult & ActiveFilter)[]
|
||||||
let language = Locale.language
|
let language = Locale.language
|
||||||
let mergedActiveFilters = FilterSearch.mergeSemiIdenticalLayers(activeFilters, $language)
|
let mergedActiveFilters = FilterSearch.mergeSemiIdenticalLayers(activeFilters, $language)
|
||||||
$: mergedActiveFilters = FilterSearch.mergeSemiIdenticalLayers(activeFilters, $language)
|
$: mergedActiveFilters = FilterSearch.mergeSemiIdenticalLayers(activeFilters, $language)
|
||||||
export let state: SpecialVisualizationState
|
export let state: WithSearchState
|
||||||
let loading = false
|
let loading = false
|
||||||
const t = Translations.t.general.search
|
const t = Translations.t.general.search
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue