toJson method

List<double> toJson()

Converts the Coordinate to a JSON coordinate List.

Example:

Coordinate(1, 2).toJson(); // [1, 2]

Implementation

List<double> toJson() {
  return [longitude, latitude];
}