Fix geojson source: remove 'null' properties; UK-addresses: filter matched addresses by default

This commit is contained in:
pietervdvn 2022-02-14 13:52:18 +01:00
parent 367ac1b2cb
commit 60c4b0d00d
2 changed files with 7 additions and 1 deletions

View file

@ -95,6 +95,11 @@ export default class GeoJsonSource implements FeatureSourceForLayer, Tiled {
for (const feature of json.features) { for (const feature of json.features) {
const props = feature.properties const props = feature.properties
for (const key in props) { for (const key in props) {
if(props[key] === null){
delete props[key]
}
if (typeof props[key] !== "string") { if (typeof props[key] !== "string") {
// Make sure all the values are string, it crashes stuff otherwise // Make sure all the values are string, it crashes stuff otherwise
props[key] = JSON.stringify(props[key]) props[key] = JSON.stringify(props[key])

View file

@ -90,7 +90,7 @@
"isOsmCache": false "isOsmCache": false
}, },
"name": "Addresses to check", "name": "Addresses to check",
"minzoom": 14, "minzoom": 18,
"title": { "title": {
"render": { "render": {
"en": "This address needs adding" "en": "This address needs adding"
@ -140,6 +140,7 @@
"options": [ "options": [
{ {
"question": "Only show non-matched objects", "question": "Only show non-matched objects",
"default": true,
"osmTags": { "osmTags": {
"and": [ "and": [
"_imported=", "_imported=",