synw / geojson

Utilities to work with geojson data in Dart
MIT License
36 stars 53 forks source link

JSON generation #11

Closed duzenko closed 5 years ago

duzenko commented 5 years ago

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

synw commented 5 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 5 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 5 years ago

Pr merged, closing

duzenko commented 5 years ago

Sorry, what about a pub.dev update?