我想在当前位置上设置相机,并将缩放级别设置为10。因此,我编写了以下代码,并从这篇文章中获得了有关当前位置的提示。如何在IOS 6中使用Google地图API的代理。
以下是我的代码。
以下是我的代码。
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;
但是在设备上,坐标为0.00。
请问有人能帮忙解决这个问题吗?