【发布时间】:2013-05-02 06:32:21
【问题描述】:
我想将相机设置在当前位置并将缩放级别设置为 10。 所以我写了这样的代码,对于当前位置,我从这篇文章中得到了提示。
How to use delegates in Google map API for IOS 6
这是我的代码
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。
请大家帮忙解决这个问题?
【问题讨论】:
标签: iphone google-maps google-maps-sdk-ios