DidChangeCameraPosition get bounding box / rectangle of available coordinates

How can I get a GMSCoordinateBounds from a GMSCameraPosition? I want to know the visible coordinates on the map (at least northeast / southwest points) every time the user moves the camera, as in:

(void)mapView:(GMSMapView *)mapView didChangeCameraPosition:(GMSCameraPosition *)position 
+7
ios google-maps google-maps-sdk-ios gmsmapview
source share
1 answer
 GMSVisibleRegion visibleRegion = mapView.projection.visibleRegion; GMSCoordinateBounds *bounds = [[GMSCoordinateBounds alloc] initWithRegion:visibleRegion]; // we've got what we want, but here are NE and SW points CLLocationCoordinate2D northEast = bounds.northEast; CLLocationCoordinate2D southWest = bounds.southWest; 
+13
source share

All Articles