geoDistance function Spherical math
Returns the great-arc distance in
radians between the two points
a
and b
.
Each point must be specified as a two-element array [longitude, latitude] in degrees. This is the spherical equivalent of GeoPath.measure given a LineString of two points.
Implementation
double geoDistance(List<num> a, List<num> b) {
_coordinates[0] = a;
_coordinates[1] = b;
return geoLength(_object);
}