toJson method
Converts the Point to a GeoJSON Map.
Example:
Point(Coordinate(1, 2), properties: {'name': 'point'}).toJson();
Implementation
@override
Map<String, dynamic> toJson() {
return {
'type': 'Feature',
'geometry': {
'type': 'Point',
'coordinates': coordinate.toJson(),
},
'properties': properties,
};
}