distanceBetween method
double
distanceBetween(
- double startLatitude,
- double startLongitude,
- double endLatitude,
- double endLongitude, {
- GeospatialAlgorithm algorithm = GeospatialAlgorithm.vincenty,
Great-circle distance between two coordinates in meters.
algorithm selects the geodetic formula. GeospatialAlgorithm.vincenty
(default) is more accurate; GeospatialAlgorithm.haversine is faster.
Implementation
double distanceBetween(
double startLatitude,
double startLongitude,
double endLatitude,
double endLongitude, {
GeospatialAlgorithm algorithm = GeospatialAlgorithm.vincenty,
}) => calculateDistance(
startLatitude,
startLongitude,
endLatitude,
endLongitude,
algorithm: algorithm,
);