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