I am using the following coming back from a socketio connection:
L.geoJson(data.streets, {
onEachFeature: map.onEachFeature
});
It's throwing the following error:
Invalid GeoJSON object.
I've run it through several JSON/GeoJSON validating tools and they all come back as valid. It's also definitely already a json object (I tried with JSON.parse(data.streets)
)
What am I missing? I did use a flatProperties
option on my osmtogeojson library but as mentioned, the above code validates on all the online checks I can find.