GoogleMapsSDKDemos のコードを使用して、マップビューを画面上の小さな長方形にサイズ変更しようとしましたが、効果がないようです。これが私のコードです:
mapView = [[GMSMapView alloc] initWithFrame:CGRectZero]; mapView.camera = [GMSCameraPosition cameraWithLatitude:38.98549782690282 経度:-76.94636067188021 zoom: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];
最後から 2 番目の行は、MapView を小さな正方形に制限するように見えますが、それでも画面全体を占有します。