Unable to get location in iOS (code GEOErrorDomain = -204)

I am trying to display a map and reset the output using MKMapView . This is my code.

 MKCoordinateRegion region = { {0.0, 0.0 }, { 0.0, 0.0 } }; region.center.latitude = 37.47 ; region.center.longitude = 122.26; region.span.longitudeDelta = 0.01f; region.span.latitudeDelta = 0.01f; [mapView setRegion:region animated:YES]; 

But I get the error below

 <GEOTileSource: 0x8e4c160>: Error downloading tiles Server Error: Error Domain=GEOErrorDomain Code=-204 "The operation couldn't be completed. (GEOErrorDomain error -204.)" UserInfo=0x88990f0 {UnderlyingErrors=( "Error Domain=GEOErrorDomain Code=-204 \"The operation couldn\U2019t be completed. (GEOErrorDomain error -204.)\" UserInfo=0x885b570 {IncompleteResponse=Asked for 2 tiles but only got 0 back}", "Error Domain=GEOErrorDomain Code=-204 \"The operation couldn\U2019t be completed. (GEOErrorDomain error -204.)\" UserInfo=0x8890a50 {IncompleteResponse=Asked for 6 tiles but only got 0 back}" )} 

I do not find references to what GEOErrorDomain Code=-204 . Please help me.

+6
source share
3 answers

I upgraded to Xcode DP4 and now everything looks fine.

0
source

It was a beta bug. Sometimes I get this because of how they load location tiles. Assuming it works fine on beta 4, I wouldn't worry too much. There are a few location / map problems that they are still developing, so I won’t be surprised if you find more by the time the beta is over.

0
source

I had the same problem, in my case it only happens when the UIViewController is closed before the map has finished loading all the fragments. The fix was to delegate to the mapView (MKMapView) delegate nil when closing the view controller.

 mapView.delegate = nil; 
0
source

Source: https://habr.com/ru/post/922187/


All Articles