toMap method
toMap method to get the OsrmRouteStep as a json map
Implementation
@override
Map<String, dynamic> toMap() {
return {
'distance': distance,
'duration': duration,
'weight': weight,
'name': name,
'mode': mode,
'geometry': geometry?.toMap(),
'maneuver': maneuver?.toMap(),
'intersections': intersections?.map((e) => e.toMap()).toList(),
'voiceInstructions': voiceInstructions?.toMap(),
'bannerInstructions': bannerInstructions?.toMap(),
};
}