I am working with a Mapviewer control and on the most part it is working well but occasionally I get
“Resolving MapLocation timed out.” or “The operation couldn’t be completed. (kCLErrorDomain error 8.)”
error when it hits this code
I took my app into a location without reception and each screen that tried to load map locations crashed, even locations that where the Latitude and longitude were saved in the database.
Would it be the Mobilelocation control or the Mapviewer control? What would the best approach be for testing if an app has reception?
So… making a new Maplocation does what’s called a reverse-geocode, that is, it calls out to Apple’s servers to get the “actual” location for the location you passed. That’s definitely not going to work if you don’t have internet.
How do you stop it from looking if there is no connection?
Would the following prevent a location search until there is a signal?
If MyLocation.AuthorizationState = MobileLocation.AuthorizationStates.AuthorizedAppInUse Then
' we've got our requested authorization state, start getting LocationChanged events
' we don't have authorization yet, so ask for it
Yes Greg you were correct, it sort of worked but if the user reacted too quickly the test was too slow so it only worked half the time.
I also tried to trap the error that occurred if they got through the check with the following but that didn’t work either
locations.Add(New MapLocation(Mylat, Mylong,MyTag))
Catch e As InvalidArgumentException