toMap method

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

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