How to find if mapkit failes to acquire user location?

638 views Asked by At

In my app I'm using map kit.The map kit is working fine but sometimes it fails to acquire user location,so i thought i could show en error message but when i applied the error message it prompting again and again looking very annoying.so i want to ask that when map kit starts to get current user location and if it fails how do i show an error message something like this "Maps unable to determine your current location please try after sometime" then hide the message and show it after sometime if it again fails to acquire user location or if it gets the user location then do nothing.

2

There are 2 answers

4
Morion On

Why don't you use CLLocationManager to find user's location? It has one pretty delegate method that, I think, will be helpful in your case.

- (void)locationManager:(CLLocationManager *)manager didFailWithError:(NSError *)error
0
Anmol Bajpai On

I have used the map kit in my app and when i increase the span of the map it shows crash on iphone.