Iphone 不更新MKMapView中的当前位置

Iphone 不更新MKMapView中的当前位置,iphone,objective-c,cllocationmanager,Iphone,Objective C,Cllocationmanager,我正在使用CLLocationManager更新当前位置,但有时会丢失当前位置。我不知道为什么当前位置丢失了 请帮我解决这个问题 谢谢,, Madan Mohan由于多种原因,该位置可能会丢失: 该设备不再能够合理开放地进入天空,因此GPS卫星信息不可用 没有足够的信号塔来执行三角测量 wifi接入点不在已知接入点的数据库中 用户切换到飞行模式 还有更多。位置感知应用程序必须假设它们随时都会丢失地理位置信息。它通常会在几分钟后返回。由于各种原因,该位置可能会丢失: 该设备不再能够合理开放地

我正在使用CLLocationManager更新当前位置,但有时会丢失当前位置。我不知道为什么当前位置丢失了

请帮我解决这个问题

谢谢,,
Madan Mohan

由于多种原因,该位置可能会丢失:

  • 该设备不再能够合理开放地进入天空,因此GPS卫星信息不可用

  • 没有足够的信号塔来执行三角测量

  • wifi接入点不在已知接入点的数据库中

  • 用户切换到飞行模式


还有更多。位置感知应用程序必须假设它们随时都会丢失地理位置信息。它通常会在几分钟后返回。

由于各种原因,该位置可能会丢失:

  • 该设备不再能够合理开放地进入天空,因此GPS卫星信息不可用

  • 没有足够的信号塔来执行三角测量

  • wifi接入点不在已知接入点的数据库中

  • 用户切换到飞行模式


还有更多。位置感知应用程序必须假设它们随时都会丢失地理位置信息。它通常会在几分钟后返回。

如果您的位置没有任何更新,则可能会调用此代理

- (void)locationManager:(CLLocationManager *)manager didFailWithError:(NSError *)error 
{
switch([error code])
{
   case kCLErrorLocationUnknown: 
   //The location manager was unable to obtain a location value right now

   case kCLErrorDenied: 
   //Access to the location service was denied by the user

   case kCLErrorNetwork: 
   //The network was unavailable or a network error occurred.

   case kCLErrorHeadingFailure:
   // The heading could not be determined.
 }

您可以找出问题所在。

如果您没有获得任何位置更新,则可能会调用此代理

- (void)locationManager:(CLLocationManager *)manager didFailWithError:(NSError *)error 
{
switch([error code])
{
   case kCLErrorLocationUnknown: 
   //The location manager was unable to obtain a location value right now

   case kCLErrorDenied: 
   //Access to the location service was denied by the user

   case kCLErrorNetwork: 
   //The network was unavailable or a network error occurred.

   case kCLErrorHeadingFailure:
   // The heading could not be determined.
 }
你可以找出问题所在