toJson method
Generates a Map having String
keys 'snapped_distance' and 'location'
which has longitude
and latitude
as a List of double values.
Implementation
Map<String, dynamic> toJson() => <String, dynamic>{
'snapped_distance': snappedDistance,
'location': <double>[location.longitude, location.latitude],
};