toMap method

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

toMap method to get the OsrmRouteLeg as a json map

Implementation

@override
Map<String, dynamic> toMap() {
  return {
    'distance': distance,
    'duration': duration,
    'weight': weight,
    'summary': summary,
    'steps': steps?.map((e) => e.toMap()).toList(),
  };
}