function computeLength(path) {
  path = common.convertToPositionArray(path);
  if (path.length < 2) {
    return 0;
  }
  var length = 0;
  var prev = path[0];
  var prevLat = toRadians(prev.lat);
  var prevLng = toRadians(prev.lng);
  path.forEach(function (point) {
    var lat = toRadians(point.lat);
    var lng = toRadians(point.lng);
    length += distanceRadians(prevLat, prevLng, lat, lng);
    prevLat = lat;
    prevLng = lng;
  });
  return length * EARTH_RADIUS;
}
Returns the length of the given path, in meters, on Earth.