forked from MapComplete/MapComplete
Fix geojson source: remove 'null' properties; UK-addresses: filter matched addresses by default
This commit is contained in:
parent
367ac1b2cb
commit
60c4b0d00d
2 changed files with 7 additions and 1 deletions
|
@ -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])
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue