synw / geojson

Utilities to work with geojson data in Dart
MIT License
37 stars 51 forks source link

JSON generation #11

Closed duzenko closed 4 years ago

duzenko commented 4 years ago

How do I generate a new geojson from e.g. Google Map polygons?

synw commented 4 years ago

Create a GeoJsonFeatureCollection object with all it's children and then use

String serializedJson = myFeatureCollection.serialize();

I should add a section in the readme to document that

duzenko commented 4 years ago

Is GeoJsonPolygon.serializeFeature broken? Local variable geoSeries eclipses member field geoSeries in that method resulting in _buildGeoJsonFeature been always fed an empty list. That entire loop seems to be just out of place.

synw commented 4 years ago

Pr merged, closing

duzenko commented 4 years ago

Sorry, what about a pub.dev update?