Google Maps iOS SDKで全てのマーカーが入るようにズームアウト
こんなかんじ
- (void)zoomMapToShowAllMarkers { CLLocationCoordinate2D myLocation = ((GMSMarker *)_mapView.markers.firstObject).position; GMSCoordinateBounds *bounds = [[GMSCoordinateBounds alloc] initWithCoordinate:myLocation coordinate:myLocation]; for (GMSMarker *marker in _mapView.markers) bounds = [bounds includingCoordinate:marker.position]; [_mapView animateWithCameraUpdate:[GMSCameraUpdate fitBounds:bounds withPadding:70.0f]]; }