OsrmRouteLeg.fromMap constructor
fromMap method to get the OsrmRouteLeg from a json map
Implementation
factory OsrmRouteLeg.fromMap(Map<String, dynamic> json) {
return OsrmRouteLeg(
distance: json['distance'],
duration: json['duration'],
weight: json['weight'],
summary: json['summary'].toString(),
steps: (json['steps'] as List).map((e) {
return OsrmRouteStep.fromMap(e);
}).toList(),
);
}