toJson method
Converts the MPRoute to a JSON representation that can be parsed by the MapsIndoors Platform SDK
Implementation
@override
Map<String, dynamic> toJson() {
var jsonLegs = legs?.map((e) => e.toJson()).toList();
return {
"legs": jsonLegs,
"copyrights": copyrights,
"summary": summary,
"warnings": warnings,
"restrictions": restrictions,
"bounds": bounds?.toJson(),
"ordered_stop_indexes": orderedStopIndexes,
};
}