反向地理编码返回随机的亚洲位置

时间:2015-01-11 03:18:18

标签: ios swift mapkit core-location

我正在将长时间变为纬度,并且出于某种原因,当这段代码具有来自美国某处的经度和纬度时(斯德哥尔摩瑞典的作品),它给了我一个在亚洲的随机位置。有什么想法吗?

        geocoder.reverseGeocodeLocation(CLLocation(latitude: latitude, longitude: longitude), completionHandler: { (placemarks:[AnyObject]!, error:NSError!) -> Void in
            var placemark = placemarks.last as? CLPlacemark
            var locationString = ""
            if let administrative = placemark?.administrativeArea{
                locationString = locationString + administrative
                if let subadminstrative = placemark?.subAdministrativeArea{
                    locationString = locationString + subadminstrative
                }

0 个答案:

没有答案