toJson method

  1. @override
Map<String, dynamic> toJson()
override

Converts a Polygon to its GeoJSON representation.

Implementation

@override
Map<String, dynamic> toJson() {
  return {'type': 'Polygon', 'coordinates': _toListListList(coordinates)};
}