toJson method

Map<String, dynamic> toJson()

Implementation

Map<String, dynamic> toJson() {
  var lineArr = [];
  lines.forEach((line) {
    lineArr.add(line.toJson()['coordinates']);
  });

  return {'type': 'Polygon', 'coordinates': lineArr};
}