toJson method

Map<String, Object> toJson()

A JSON-serializable representation of this GeoPoint, in the same shape as the JS SDK's GeoPoint.toJSON(). Read it back with GeoPoint.fromJson.

Implementation

Map<String, Object> toJson() {
  return <String, Object>{
    'latitude': latitude,
    'longitude': longitude,
    'type': jsonType,
  };
}