Add documentation on themes, move some themes around

This commit is contained in:
Pieter Vander Vennet 2022-11-30 21:38:50 +01:00
parent 614987dba7
commit 8cb02da127
88 changed files with 2973 additions and 244 deletions

View file

@ -1,90 +0,0 @@
{
"id": "aed_brugge",
"title": {
"nl": "Open AED-kaart - Brugge edition"
},
"icon": "./assets/themes/aed/aed.svg",
"description": {
"nl": "Op deze kaart kan je informatie over AEDs vinden en verbeteren + een export van de brugse defibrillatoren"
},
"startLat": 51.25634,
"startLon": 3.195682,
"startZoom": 12,
"layers": [
"defibrillator",
{
"id": "brugge",
"name": "Brugse dataset",
"source": {
"osmTags": "Brugs volgnummer~*",
"geoJson": "https://raw.githubusercontent.com/pietervdvn/pietervdvn.github.io/master/aeds_brugge.json"
},
"calculatedTags": [
"_closest_osm_aed=feat.closest('defibrillator')?.properties?.id",
"_closest_osm_aed_distance=feat.distanceTo(feat.properties._closest_osm_aed)",
"_has_closeby_feature=Number(feat.properties._closest_osm_aed_distance) < 25 ? 'yes' : 'no'"
],
"title": "AED in Brugse dataset",
"tagRenderings": [
{
"id": "status",
"mappings": [
{
"if": "status=oud",
"then": "<div class='alert'>Dit datapunt is verouderd</div>"
}
]
},
{
"id": "has closeby",
"render": "<div class='thanks'>Er is al een AED gekend in de buurt</div>",
"condition": "_has_closeby_feature=yes"
},
{
"id": "openbaar",
"render": "Bevindt zich in een openbaar gebouw: <b>{Openbare AED Gebouw}</b> (geen lokaal bekend)",
"condition": "Openbare AED Gebouw~*",
"mappings": [
{
"if": "Lokaal AED~*",
"then": "Bevindt zich in een openbaar gebouw: <b>{Openbare AED Gebouw}</b> in lokaal <b>{Lokaal AED}</b>"
}
]
},
{
"id": "addr",
"#": "Yes, 'nummer' writes with three 'm's",
"render": "Het adres is {Straat} {Nummmer} {Bus}"
},
{
"id": "oh",
"render": "De openingsuren zijn <b>{OPENINGSUREN}</b>",
"condition": "OPENINGSUREN~*"
}
],
"mapRendering": [
{
"icon": {
"render": "circle:red",
"mappings": [
{
"if": "_has_closeby_feature=yes",
"then": "circle:#008000aa"
}
]
},
"iconSize": "20,20,center",
"location": [
"point",
"centroid"
]
}
]
}
],
"hideFromOverview": true,
"defaultBackgroundId": "HDM_HOT",
"clustering": {
"maxZoom": 0
}
}

View file

Before

Width:  |  Height:  |  Size: 7.6 KiB

After

Width:  |  Height:  |  Size: 7.6 KiB

Before After
Before After

View file

Before

Width:  |  Height:  |  Size: 1.5 KiB

After

Width:  |  Height:  |  Size: 1.5 KiB

Before After
Before After

View file

Before

Width:  |  Height:  |  Size: 6.6 KiB

After

Width:  |  Height:  |  Size: 6.6 KiB

Before After
Before After

View file

Before

Width:  |  Height:  |  Size: 3.4 KiB

After

Width:  |  Height:  |  Size: 3.4 KiB

Before After
Before After

View file

@ -1,151 +0,0 @@
{
"id": "missing_streets",
"title": {
"nl": "Fix ontbrekende straten"
},
"shortDescription": {
"nl": "Voegt ontbrekende straten toe aan gebouwen met huisnumer adhv CRAB"
},
"description": {
"nl": "Dit thema voegt automatisch straatnamen toe aan gebouwen met huisnummer en overeenkomstig CRAB-adres."
},
"icon": "./assets/svg/robot.svg",
"startLat": 51.0249,
"startLon": 4.026489,
"startZoom": 9,
"widenFactor": 2,
"clustering": {
"maxZoom": 15
},
"overrideAll": {
"minzoom": 14
},
"layers": [
{
"builtin": "current_view",
"override": {
"+mapRendering": [
{
"location": [
"point"
],
"icon": {
"render": "./assets/svg/robot.svg"
},
"iconSize": "15,15,center"
}
],
"calculatedTags": [
"_overlapping=Number(feat.properties.zoom) >= 14 ? feat.overlapWith('osm-buildings').map(ff => ff.feat.properties) : undefined",
"_applicable=feat.get('_overlapping').filter(p => (p._spelling_is_correct === 'true') && (p._singular_import === 'true')).map(p => p.id)",
"_applicable_count=feat.get('_applicable')?.length"
],
"tagRenderings": [
{
"id": "hw",
"render": "There are {_applicable_count} applicable elements in view",
"mappings": [
{
"if": "zoom<14",
"then": "Zoom in more to see the automatic action"
},
{
"if": "_applicable_count=",
"then": "Loading..."
},
{
"if": "_applicable_count=0",
"then": "No buildings with missing street names in view"
}
]
},
{
"id": "autoapply",
"render": "{auto_apply(osm-buildings, _applicable, apply_streetname, Automatically add all missing streetnames on buildings in view)}"
}
]
}
},
"named_streets",
{
"builtin": "crab_address",
"override": {
"source": {
"geoJson": "https://raw.githubusercontent.com/pietervdvn/MapComplete-data/main/CRAB_2021_10_26/tile_{z}_{x}_{y}.geojson",
"geoJsonZoomLevel": 18
},
"mapRendering": [
{
"iconSize": "5,5,center",
"icon": "circle:black;"
}
]
}
},
{
"id": "osm-buildings",
"name": "Alle OSM-gebouwen met een huisnummer en zonder straat",
"source": {
"osmTags": {
"and": [
"building~*",
"addr:housenumber~*",
"addr:street="
]
},
"maxCacheAge": 0
},
"calculatedTags": [
"_embedded_crab_addresses:=Array.from(new Set(feat.overlapWith('crab_address').map(ff => ff.feat.properties).filter(p => p._HNRLABEL.toLowerCase() === (feat.properties['addr:housenumber'] + (feat.properties['addr:unit']??'')).toLowerCase()).map(p => p.STRAATNM)))",
"_singular_import:=feat.get('_embedded_crab_addresses')?.length == 1",
"_name_to_apply:=feat.get('_embedded_crab_addresses')[0]",
"_nearby_street_names:=feat.closestn('named_streets',5,'name', 1000).map(ff => [ff.feat.properties.name, ff.feat.properties['alt_name'], ff.feat.properties['name:nl']])",
"_spelling_is_correct:= [].concat(...feat.get('_nearby_street_names')).indexOf(feat.properties['_name_to_apply']) >= 0"
],
"mapRendering": [
{
"width": {
"render": "2",
"mappings": [
{
"if": "fixme~*",
"then": "5"
}
]
},
"color": {
"render": "#00c",
"mappings": [
{
"if": "_spelling_is_correct=false",
"then": "#ff00ff"
},
{
"if": "_singular_import=ffalse",
"then": "#f00"
}
]
}
}
],
"title": "OSM-gebouw",
"tagRenderings": [
{
"id": "apply_streetname",
"render": "{tag_apply(addr:street=$_name_to_apply ,Apply the CRAB-street onto this building)}",
"mappings": [
{
"if": "_spelling_is_correct=false",
"then": "No nearby street has the same name. The CRAB-name is {_name_to_apply}"
},
{
"if": "_singular_import=false",
"then": "There are multiple streetnames applicable here"
}
]
}
]
}
],
"hideFromOverview": true
}