Further stabilization of UK-addresses: add minzoom requirement to import button, fix eternal loading message

This commit is contained in:
Pieter Vander Vennet 2021-10-08 15:11:20 +02:00
parent 561b21d2fe
commit d8fa054a34
8 changed files with 71 additions and 40 deletions

View file

@ -37,24 +37,29 @@
inkscape:pageopacity="0"
inkscape:pageshadow="2"
inkscape:window-width="1920"
inkscape:window-height="1043"
inkscape:window-height="1003"
id="namedview14"
showgrid="false"
inkscape:zoom="7.375"
inkscape:cx="-1.3561062"
inkscape:cy="19.621117"
inkscape:window-x="0"
inkscape:window-y="0"
inkscape:cy="41.316032"
inkscape:window-x="862"
inkscape:window-y="1080"
inkscape:window-maximized="1"
inkscape:current-layer="svg12" />
<path
d="m 42.372766,41.559418 h 3.247468 c 0.421762,0 0.76133,0.339541 0.76133,0.761329 v 3.241506 c 0,0.421761 -0.339541,0.761329 -0.76133,0.761329 h -3.247468 c -0.421762,0 -0.76133,-0.339541 -0.76133,-0.761329 v -3.241506 c 0,-0.421761 0.339541,-0.761329 0.76133,-0.761329 z"
style="fill:#495aad;stroke-width:0.0542103;paint-order:normal"
d="m 27.122405,19.186537 h 33.74819 c 4.383014,0 7.911859,3.528561 7.911859,7.911848 v 33.68623 c 0,4.383006 -3.528563,7.911848 -7.911859,7.911848 h -33.74819 c -4.383014,0 -7.911859,-3.528561 -7.911859,-7.911848 v -33.68623 c 0,-4.383006 3.528563,-7.911848 7.911859,-7.911848 z"
style="fill:#495aad;stroke-width:0.56336182;paint-order:normal"
id="path6"
inkscape:connector-curvature="0" />
<path
d="m 42.085614,42.793949 v 2.289464 c 0.381581,0 0.763173,0.381581 0.763173,0.763173 h 2.289463 c 0,-0.381581 0.381581,-0.763173 0.763173,-0.763173 v -2.289464 c -0.381581,0 -0.763173,-0.381581 -0.763173,-0.763172 h -2.289463 c 0,0.38158 -0.381581,0.763172 -0.763173,0.763172 z"
d="m 24.138277,32.015973 v 23.792462 c 3.965449,0 7.931011,3.965449 7.931011,7.931014 h 23.792453 c 0,-3.965449 3.965449,-7.931014 7.931014,-7.931014 V 32.015973 c -3.965449,0 -7.931014,-3.965449 -7.931014,-7.931002 H 32.069288 c 0,3.965439 -3.965449,7.931002 -7.931011,7.931002 z"
id="path8"
inkscape:connector-curvature="0"
style="fill:none;stroke:#ffffff;stroke-width:0.27187553" />
style="fill:none;stroke:#ffffff;stroke-width:2.8253727" />
<path
id="path3711"
d="m 44.16217,30.966164 c -7.526249,0 -13.627102,6.101307 -13.627102,13.627103 0,7.525795 6.101307,13.627102 13.627102,13.627102 7.525796,0 13.627103,-6.101307 13.627103,-13.627102 0,-7.525796 -6.101307,-13.627103 -13.627103,-13.627103 z m -3.168302,21.803364 -0.0091,-0.0091 -0.0077,0.0091 -6.353865,-6.541009 3.192832,-3.254153 3.16921,3.263237 9.53897,-9.820144 3.176933,3.269596 z"
inkscape:connector-curvature="0"
style="fill:#fdd835;stroke-width:0.45423675" />
</svg>

Before

Width:  |  Height:  |  Size: 2.3 KiB

After

Width:  |  Height:  |  Size: 2.8 KiB

Before After
Before After

View file

@ -39,14 +39,14 @@
{
"id": "to_import",
"source": {
"#geoJson": "http://127.0.0.1:8080/islington_small_piece.geojson",
"geoJson": "https://raw.githubusercontent.com/pietervdvn/MapComplete/develop/assets/themes/uk_addresses/islington_small_piece.geojson",
"##geoJson": "https://raw.githubusercontent.com/russss/osm-uk-addresses/main/output/islington.geojson",
"#geoJson": "https://raw.githubusercontent.com/pietervdvn/MapComplete/develop/assets/themes/uk_addresses/islington_small_piece.geojson",
"geoJson": "https://osm-uk-addresses.russss.dev/addresses/{z}/{x}/{y}.json",
"osmTags": "inspireid~*",
"geoJsonZoomLevel": 16,
"isOsmCache": false
},
"name": "Addresses to check",
"minzoom": 12,
"minzoom": 14,
"wayHandling": 1,
"icon": {
"render": "./assets/themes/uk_addresses/housenumber_unknown.svg",
@ -122,7 +122,7 @@
}
},
"calculatedTags": [
"_closest_3_street_names=feat.closestn('named_streets',3, 'name').map(f => ({name: f.feat.properties.name, distance: Math.round(1000*f.distance), id: f.id}))",
"_closest_3_street_names=feat.properties['addr:street'] === undefined ? feat.closestn('named_streets',3, 'name').map(f => ({name: f.feat.properties.name, distance: Math.round(1000*f.distance), id: f.id})) : []",
"_closest_street:0:name=JSON.parse(feat.properties._closest_3_street_names)[0]?.name",
"_closest_street:1:name=JSON.parse(feat.properties._closest_3_street_names)[1]?.name",
"_closest_street:2:name=JSON.parse(feat.properties._closest_3_street_names)[2]?.name",