toJson method

Map<String, dynamic> toJson()

Implementation

Map<String, dynamic> toJson() {
  var polygonArr = [];
  polygons.forEach((polygon) {
    polygonArr.add(polygon.toJson()['coordinates']);
  });

  return {'type': 'MultiPolygon', 'coordinates': polygonArr};
}