toMap method
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(),
};
}