OsrmRouteStep.fromMap constructor
fromMap method to get the OsrmRouteStep from a json map
Implementation
factory OsrmRouteStep.fromMap(Map<String, dynamic> json) {
return OsrmRouteStep(
distance: json['distance'],
duration: json['duration'],
weight: json['weight'],
name: json['name'],
mode: json['mode'],
geometry: OsrmGeometry.from(json['geometry']),
maneuver: json['maneuver'] != null
? OsrmStepManeuver.fromMap(json['maneuver'])
: null,
intersections: (json['intersections'] as List)
.map((e) => OsrmIntersection.fromMap(e))
.toList(),
voiceInstructions: json['voiceInstructions'] != null
? OsrmVoiceInstructions.fromMap(json['voiceInstructions'])
: null,
bannerInstructions: json['bannerInstructions'] != null
? OsrmBannerInstructions.fromMap(json['bannerInstructions'])
: null,
);
}