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

This commit is contained in:
Pieter Vander Vennet 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) {
const props = feature.properties
for (const key in props) {
if(props[key] === null){
delete props[key]
}
if (typeof props[key] !== "string") {
// Make sure all the values are string, it crashes stuff otherwise
props[key] = JSON.stringify(props[key])