I want to set camera on current location and zoom level upto 10.
So I have written code like this and for current location i get hint from this post.
How to use delegates in Google map API for IOS 6
here is my code
mapView_=[[GMSMapView alloc]initWithFrame:CGRectZero];
CLLocationCoordinate2D currentPosition = mapView_.myLocation.coordinate;
GMSCameraPosition* camera =
[GMSCameraPosition cameraWithTarget: currentPosition zoom: 10];
mapView_.camera = camera;
mapView_.delegate=self;
mapView_.mapType = kGMSTypeSatellite;
mapView_.myLocationEnabled = YES;
self.view = mapView_;
mapView_.settings.myLocationButton = YES;
But coordinate is 0.00 in device.
Please Any Can help to solve out this issue?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…