geo
library
Functions
-
computeDistanceBetween(LatLng p1, LatLng p2, {num radius = earthRadius})
→ num
-
Compute distance between 2 points.
-
computeDistanceEquirectangularApproximation(LatLng p1, LatLng p2, {num radius = earthRadius})
→ num
-
Compute distance between 2 points by using Pythagorean theorem on an equirectangular projection.
-
computeDistanceHaversine(LatLng p1, LatLng p2, {num radius = earthRadius})
→ num
-
Compute distance between 2 points according to Haversine formula.
-
computeDistanceSphericalLawCosines(LatLng p1, LatLng p2, {num radius = earthRadius})
→ num
-
Compute distance between 2 points according to Spherical law of cosines.
-
computeHeading(LatLng p1, LatLng p2)
→ num
-
Compute heading from
p1
to p2
. The result is between -180 exclusive and 180 inclusive.
-
computeOffset(LatLng origin, num distance, num heading, {num radius = earthRadius})
→ LatLng
-
Compute the LatLng resulting from moving a
distance
(in meters) from origin
in the specified heading
(expressed in degrees clockwise from north).
-
degToRad(num deg)
→ num
-
Convert degrees to radians
-
radToDeg(num rad)
→ num
-
Convert radians to degrees