OsrmLineString.fromMap constructor

OsrmLineString.fromMap(
  1. Map<String, dynamic> json
)

fromMap method to get the OsrmLineString from a json map

Implementation

factory OsrmLineString.fromMap(Map<String, dynamic> json) {
  return OsrmLineString(
    coordinates: List.from(json['coordinates']).map((e) {
      return (
        double.parse(e[0].toString()),
        double.parse(e[1].toString()),
      );
    }).toList(),
  );
}