当我尝试使用以下命令获取当前位置时
CLLocationCoordinate2D CurrentLocation;
CurrentLocation = map.userLocation.coordinate;我得到了下面的值:
CurrentLocation.latitude= -180.000000;
CurrentLocation.longitude= -180.000000;这根本不是我的位置。
你知道这里面少了什么吗?
发布于 2011-09-18 19:16:11
首先,确保您已经将mapView的showUserLocation设置为TRUE。
其次,检查该值是否不为空,因为mapView需要首先定位用户,而这需要几秒钟的时间。
https://stackoverflow.com/questions/7460403
复制相似问题