If I try to create a mapbox vector tile from geojson that contains properties with null values it panics.
func main(){
rawJSON := []byte(`
{ "type": "FeatureCollection",
"features": [
{ "type": "Feature",
"geometry": {"type": "Point", "coordinates": [1, 1]},
"properties": {"test": null}
}
]
}`)
collections := map[string]*geojson.FeatureCollection{}
fc, _ := geojson.UnmarshalFeatureCollection(rawJSON)
collections["test"] = fc
layers := mvt.NewLayers(collections)
layers.ProjectToTile(maptile.New(0,0,0))
data, err := mvt.Marshal(layers)
if err != nil{
fmt.Errorf("Error: %v\n", err)
}
base64 := base642.StdEncoding.EncodeToString(data)
fmt.Printf("%s\n", base64)
}
If I try to create a mapbox vector tile from geojson that contains properties with null values it panics.
Example: