我试图让我的谷歌地图地图视图只有屏幕的一半。我已将地图视图的大小调整为屏幕的一半,并且还更改了我的代码,因此它只是地图视图的边界,它是屏幕的一半,但它仍然是全屏的。有人有解决方案吗?
// setting up mapView
GMSCameraPosition *camera = [GMSCameraPosition cameraWithLatitude:-33.86
longitude:151.20
zoom:6];
_mapView = [GMSMapView mapWithFrame:_mapView.bounds camera:camera];
_mapView.myLocationEnabled = YES;
self.view = _mapView;
// Creates a marker in the center of the map.
GMSMarker *marker = [[GMSMarker alloc] init];
marker.position = CLLocationCoordinate2DMake(-33.86, 151.20);
marker.title = @"Sydney";
marker.snippet = @"Australia";
marker.map = _mapView;
// Creates a marker in the center of the map.
GMSMarker *marker2 = [[GMSMarker alloc] init];
marker2.position = CLLocationCoordinate2DMake(-36.86, 151.20);
marker2.title = @"Sydney2";
marker2.snippet = @"Australia2";
marker2.map = _mapView;
谢谢,
柯蒂斯