FeatureCollection.fromJson constructor

FeatureCollection.fromJson(
  1. Map<String, dynamic> json
)

Creates a FeatureCollection from JSON data.

Implementation

factory FeatureCollection.fromJson(Map<String, dynamic> json) {
  final features = json['features'];

  return FeatureCollection(
    features.map((e) => Feature.fromJson(e)).toList(),
  );
}