GeoJsonLineString.fromJson constructor

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

Implementation

factory GeoJsonLineString.fromJson(Map<String, dynamic> json) {
  final coords = json['coordinates'] as List;
  return GeoJsonLineString(
    coords
        .map((c) => (c as List).cast<num>().map((n) => n.toDouble()).toList())
        .toList(),
  );
}