greatCircleDistanceBetweenTwoGeoPoints method
Calculate the great-circle distance between two geographic points using the Haversine formula.
Given the latitude and longitude of two points lat1
, lon1
, lat2
, and lon2
, this function calculates and returns the great-circle distance between these two points in meters using the Haversine formula.
Implementation
num greatCircleDistanceBetweenTwoGeoPoints(
num lat1, num lon1, num lat2, num lon2) {
return GeoPoints.greatCircleDistanceBetweenTwoGeoPoints(
lat1, lon1, lat2, lon2);
}