forked from MapComplete/MapComplete
Update of latlon2country and use its async interface; small refactoring of simplemetagging, improvements to cacheBuilder which respects isShown and calculated tags now
This commit is contained in:
parent
e053e9f279
commit
9cfb7fbe68
14 changed files with 417 additions and 4320 deletions
|
@ -29,7 +29,7 @@
|
|||
{
|
||||
"id": "render_crab",
|
||||
"render": {
|
||||
"nl": "Volgens het CRAB ligt hier <b>{STRAATNM}</b> {HUISNR} (label: {_HNRLABEL})"
|
||||
"nl": "Volgens het CRAB ligt hier <b>{STRAATNM}</b> {HUISNR} (label: {HNRLABEL})"
|
||||
}
|
||||
}
|
||||
]
|
||||
|
|
|
@ -370,8 +370,8 @@
|
|||
"_embedding_street!:={STRAATNM}"
|
||||
]
|
||||
},
|
||||
{ "#": "Matches the embedding GRB object",
|
||||
|
||||
{
|
||||
"#": "Matches the embedding GRB object",
|
||||
"or": [
|
||||
"_embedding_nr_grb!:={HUISNR}",
|
||||
"_embedding_street_grb!:={STRAATNM}"
|
||||
|
@ -453,15 +453,14 @@
|
|||
"render": "{import_button(OSM-buildings,building=$building;man_made=$man_made; source:geometry:date=$_grb_date; source:geometry:ref=$_grb_ref; addr:street=$addr:street; addr:housenumber=$addr:housenumber; building:min_level=$_building:min_level, Upload this building to OpenStreetMap)}",
|
||||
"mappings": [
|
||||
{
|
||||
"if": {"and":
|
||||
[
|
||||
"_overlaps_with!=",
|
||||
"_osm_obj:addr:street=",
|
||||
"_osm_obj:addr:housenumber=",
|
||||
"addr:street~*",
|
||||
"addr:housenumber~*"
|
||||
|
||||
]
|
||||
"if": {
|
||||
"and": [
|
||||
"_overlaps_with!=",
|
||||
"_osm_obj:addr:street=",
|
||||
"_osm_obj:addr:housenumber=",
|
||||
"addr:street~*",
|
||||
"addr:housenumber~*"
|
||||
]
|
||||
},
|
||||
"then": "{import_button(OSM-buildings,building=$_target_building_type; source:geometry:date=$_grb_date; source:geometry:ref=$_grb_ref; addr:street=$addr:street; addr:housenumber=$addr:housenumber, Replace the geometry in OpenStreetMap and add the address,,,_osm_obj:id)}"
|
||||
},
|
||||
|
@ -578,21 +577,22 @@
|
|||
"centroid"
|
||||
]
|
||||
},
|
||||
{ "width": {
|
||||
"render": 5,
|
||||
"mappings": [
|
||||
{
|
||||
"if": "_imported=yes",
|
||||
"then": "1"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"width": {
|
||||
"render": 5,
|
||||
"mappings": [
|
||||
{
|
||||
"if": "_imported=yes",
|
||||
"then": "1"
|
||||
}
|
||||
]
|
||||
},
|
||||
"color": {
|
||||
"render": "#00a",
|
||||
"mappings": [
|
||||
{
|
||||
"if": "_imported=yes",
|
||||
"then":"#00ff00"
|
||||
"then": "#00ff00"
|
||||
},
|
||||
{
|
||||
"if": {
|
||||
|
|
146
assets/themes/postal_codes.json
Normal file
146
assets/themes/postal_codes.json
Normal file
|
@ -0,0 +1,146 @@
|
|||
{
|
||||
"id": "postal_codes",
|
||||
"title": {
|
||||
"en": "Postal codes"
|
||||
},
|
||||
"shortDescription": {
|
||||
"en": "Postal codes"
|
||||
},
|
||||
"description": {
|
||||
"en": "Postal codes"
|
||||
},
|
||||
"language": [
|
||||
"en"
|
||||
],
|
||||
"maintainer": "",
|
||||
"icon": "./assets/svg/bug.svg",
|
||||
"version": "0",
|
||||
"startLat": 0,
|
||||
"startLon": 0,
|
||||
"startZoom": 1,
|
||||
"widenFactor": 0.05,
|
||||
"socialImage": "",
|
||||
"layers": [
|
||||
{
|
||||
"id": "postal_codes",
|
||||
"name": {
|
||||
"en": "postal codes"
|
||||
},
|
||||
"minzoom": 12,
|
||||
"title": {
|
||||
"render": {
|
||||
"en": "Postal code {postal_code}"
|
||||
}
|
||||
},
|
||||
"description": {},
|
||||
"tagRenderings": [
|
||||
{
|
||||
"id": "postal_code",
|
||||
"render": {
|
||||
"en": "The postal code is {postal_code}"
|
||||
}
|
||||
}
|
||||
],
|
||||
"presets": [],
|
||||
"source": {
|
||||
"isOsmCache": true,
|
||||
"geoJson": "http://127.0.0.1:8080/postal_codes_postal_codes_{z}_{x}_{y}.geojson",
|
||||
"geoJsonZoomLevel": 1,
|
||||
"osmTags": {
|
||||
"or": [
|
||||
"boundary=postal_code",
|
||||
{
|
||||
"and": [
|
||||
"bounary=administrative",
|
||||
"postal_code~*"
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"mapRendering": [
|
||||
{
|
||||
"icon": {
|
||||
"render": "./assets/svg/bug.svg"
|
||||
},
|
||||
"iconSize": {
|
||||
"render": "40,40,center"
|
||||
},
|
||||
"location": [
|
||||
"point",
|
||||
"centroid"
|
||||
]
|
||||
},
|
||||
{
|
||||
"color": {
|
||||
"render": "#00f"
|
||||
},
|
||||
"width": {
|
||||
"render": "8"
|
||||
}
|
||||
}
|
||||
],
|
||||
"isShown": {
|
||||
"render": "yes",
|
||||
"mappings": [{
|
||||
"if" :"_country!=be",
|
||||
"then": "no"
|
||||
}]
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "town_halls",
|
||||
"name": {
|
||||
"en": "town halls"
|
||||
},
|
||||
"minzoom": 12,
|
||||
"title": {
|
||||
"render": {
|
||||
"en": "Town halls"
|
||||
}
|
||||
},
|
||||
"calculatedTags": [
|
||||
"_postal_code=feat.overlapWith('postal_codes')[0]?.feat?.properties?.postal_code"
|
||||
],
|
||||
"description": {},
|
||||
"tagRenderings": [
|
||||
],
|
||||
"presets": [],
|
||||
"source": {
|
||||
"isOsmCache": true,
|
||||
"geoJson": "http://127.0.0.1:8080/postal_codes_town_hall_{z}_{x}_{y}.geojson",
|
||||
"geoJsonZoomLevel": 1,
|
||||
"osmTags": "amenity=townhall"
|
||||
},
|
||||
"mapRendering": [
|
||||
{
|
||||
"icon": {
|
||||
"render": "./assets/svg/bug.svg"
|
||||
},
|
||||
"iconSize": {
|
||||
"render": "40,40,center"
|
||||
},
|
||||
"location": [
|
||||
"point",
|
||||
"centroid"
|
||||
]
|
||||
},
|
||||
{
|
||||
"color": {
|
||||
"render": "#00f"
|
||||
},
|
||||
"width": {
|
||||
"render": "8"
|
||||
}
|
||||
}
|
||||
],
|
||||
"isShown": {
|
||||
"render": "yes",
|
||||
"mappings": [{
|
||||
"if" :"_country!=be",
|
||||
"then": "no"
|
||||
}]
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue