distance property
num
distance
Sums up all the distances on the path
final Path path = new Path.from(route);
print(path.length);
Implementation
num get distance {
final List<T> tempCoordinates = new List.from(_coordinates);
double length = 0.0;
for(int index = 0;index < coordinates.length - 1;index++) {
length += _distance(tempCoordinates[index],tempCoordinates[index + 1]);
}
return round(length);
}