toMap method
toMap method to get the OsrmWaypoint as a json map
Implementation
@override
Map<String, dynamic> toMap() {
return {
'name': name,
'location': location != null ? [location!.toCoordinateList()] : null,
'distance': distance,
'hint': hint,
'nodes': nodes,
'alternatives_count': alternativesCount,
};
}