toBounds static method

GMULatLngBounds toBounds(
  1. num x,
  2. num y,
  3. num radiusInMeters
)

Implementation

static GMULatLngBounds toBounds(num x, num y, num radiusInMeters) {
  Point center = Point(x, y);
  num distanceFromCenterToCorner = radiusInMeters * sqrt(2.0);
  Point southwestCorner =
      SphericalUtils.computeOffset(center, distanceFromCenterToCorner, 225.0);
  Point northeastCorner =
      SphericalUtils.computeOffset(center, distanceFromCenterToCorner, 45.0);
  return GMULatLngBounds(northeastCorner, southwestCorner);
}