toJson method

Map<String, dynamic> toJson()

Converts current object to its JSON representation.

Implementation

Map<String, dynamic> toJson() {
  return {
    'type': 'FeatureCollection',
    'features': features.map((e) => e.toJson()).toList()
  };
}