distanceBetweenGlobalPoints static method

double distanceBetweenGlobalPoints(
  1. GlobalPoint from,
  2. GlobalPoint to
)

Get distance between GPS points from start point of calculation GlobalPoint to end point of calculation GlobalPoint Returns distance in meters

Example:

// Calculate distance between global points
double globalDistance = GeometryUtils.distanceBetweenGlobalPoints(globalPoint1, globalPoint2);
print("Distance between Moscow and St. Petersburg: ${globalDistance.toStringAsFixed(2)} meters");

Implementation

static double distanceBetweenGlobalPoints(GlobalPoint from, GlobalPoint to) => $prototype.distanceBetweenGlobalPoints(from, to);