I tried using the code from GoogleMapsSDKDemos to resize the mapview to a smaller rectangle on the screen, but it does not seem to have any effect. Here is my code:
mapView = [[GMSMapView alloc] initWithFrame: CGRectZero]; mapView.camera = [Camera GMSCameraPositionWithLatitude: 38.98549782690282 longitude: -76.94636067188021 increase: 17];
self.view = [[UIView alloc] initWithFrame:CGRectZero]; mapView.autoresizingMask = UIViewAutoresizingFlexibleHeight | UIViewAutoresizingFlexibleWidth; mapView.frame = self.view.frame; mapView.clipsToBounds = YES; mapView.myLocationEnabled = YES; mapView.settings.tiltGestures = NO; mapView.settings.zoomGestures = NO; mapView.frame = CGRectMake(0,0, 10, 25); [self.view addSubview:self.mapView];
This second line, apparently, should limit MapView to only a small square, but it still occupies the entire screen.
source share