You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on May 27, 2024. It is now read-only.
I know this is old, but I stumbled on the same problem.
I am also having geoJson in format that does not include feature collection (another part of product, web application which is using OpenLayers was designed in such way).
I noticed geojson package refuses to parse json which does not include featureCollection - "iterator" null error led me to that conclusion.
So, I am doing a simple hack to fix this:
final wrappedFeature ="""{ "type": "FeatureCollection", "features": [ ${json} // json here is in the format as in first post: { "type": ... ] }""";
try {
await geojson.parse(wrappedFeature);
} catch (e) {
rethrow;
}
geojson.features.forEach((f) { ... /* do stuff with feature */ ... }
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
I am trying to load and parse simple geojson:
and I am getting exception:
JSON is valid, what am I doing wrong?
The text was updated successfully, but these errors were encountered: