userLocation.coordinate给了我错误的值
问题描述:
当我尝试使用userLocation.coordinate给了我错误的值
CLLocationCoordinate2D CurrentLocation;
CurrentLocation = map.userLocation.coordinate;
我得到的follwoing值来获得当前位置:
CurrentLocation.latitude= -180.000000;
CurrentLocation.longitude= -180.000000;
,这是不是我的位置在所有。
你知道这里缺少什么吗?
答
首先,确保您已将mapView的showUserLocation设置为TRUE。
其次,检查值不为零,因为mapView需要先找到用户,而这需要几秒钟。
你已经给你的位置作为Hame或Dameshq周围的环境,保持你的隐私。注意安全。 – RabinDev