getCenterPoint method

LatLong getCenterPoint()

@return a new LatLong at the horizontal and vertical center of this BoundingBox.

Implementation

LatLong getCenterPoint() {
  double latitudeOffset = (maxLatitude - minLatitude) / 2;
  double longitudeOffset = (maxLongitude - minLongitude) / 2;
  return LatLong(minLatitude + latitudeOffset, minLongitude + longitudeOffset);
}