getCenter function

LatLng getCenter(
  1. LatLngBounds bounds
)

Implementation

LatLng getCenter(LatLngBounds bounds) {
  LatLng center = LatLng(
    (bounds.northeast.latitude + bounds.southwest.latitude) / 2,
    (bounds.northeast.longitude + bounds.southwest.longitude) / 2,
  );
  return center;
}