Can't get Location in iOS (GEOErrorDomain Code=-204)

I am trying to display a map and drop a pin 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

  • how to convert hexadecimal to RGB
  • How to print Core Data debug values?
  • iOS Swift MapKit Custom Annotation
  • Failed to download and open a PDF file with error failed to find PDF header in ios
  • Array element checking in swift
  • NavigationBar bar, tint, and title text color in iOS 8
  • <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 am not finding any reference to what GEOErrorDomain Code=-204 is. Please help me out.

    3 Solutions Collect From Internet About “Can't get Location in iOS (GEOErrorDomain Code=-204)”

    I upgraded to XCode DP4 and all seems to be ok now.

    That was an error with the beta version. I would get that occasionally because of how they are loading the location tiles. Assuming it is working ok on beta 4, I wouldn’t worry too much about. There are a few location/map issues they are still working out, so I wouldn’t be surprised to find more by the time the beta period is done.

    I had the same issue, in my case it only happen when closing the UIViewController before the map completed loading all tiles.
    The fix was to set the mapView (MKMapView) delegate to nil when closing the view controller.

    mapView.delegate = nil;