-1

My map show always full screen but I want for this size

GMSCameraPosition *camera = [GMSCameraPosition cameraWithLatitude:                 22.5851                                                      longitude:88.3468                                                          zoom:16];
GMSMapView *mapView_ = [GMSMapView mapWithFrame:CGRectMake(0, 0, 300, 400) camera:camera];
mapView_.myLocationEnabled = YES;   
self.view = mapView_;
Brian Tompsett - 汤莱恩
  • 5,753
  • 72
  • 57
  • 129
Dipak
  • 1
  • 3

1 Answers1

0

Add UIView in storyBoard And give the proper size. and from IdentityInspector Give the name as GMSMapView instead of UIView.

And set the property of that UIView.

@property (weak, nonatomic) IBOutlet GMSMapView *map1;

and

GMSCameraPosition *camera = [GMSCameraPosition cameraWithLatitude:22.5851 longitude:88.3468 zoom:16];
map1.delegate = self;
GMSMapView *mapView_ = [GMSMapView mapWithFrame:CGRectMake(0,0, width, height) camera:camera];
mapView_.myLocationEnabled = YES;
[self.map1 addSubview:mapView_]; 

I think This will work

Anup Gupta
  • 1,993
  • 2
  • 25
  • 40
  • http://stackoverflow.com/questions/42784690/how-do-i-set-the-size-of-google-maps-app-within-my-viewcontroller – Anup Gupta Apr 13 '17 at 21:39