toMap method

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

toMap method to get the OsrmLineString as a json map

Implementation

@override
Map<String, dynamic> toMap() {
  return {
    'type': 'LineString',
    'coordinates': coordinates.map((e) => e.toCoordinateList()).toList(),
  };
}