Ios 飞机模式下的地图套件

Ios 飞机模式下的地图套件,ios,swift,mapkit,mapkitannotation,Ios,Swift,Mapkit,Mapkitannotation,我所在地区的地图上有30个MKPinAnnotations。我还有一系列的阵列,相对于这30个位置中的每一个,还有30个位置。我想要的体验是能够轻触其中一个管脚,其他30个相对管脚显示在它周围。当我使用完全的互联网连接做任何事情时,结果是: 我使用Realm缓存后端的所有内容,因此我知道我有可用的数据。点击蓝色pin会弹出一个callout视图,允许我“签入”到这个位置,这将调用其他30个相对位置。这是为我删除PIN码的代码: if let annotations = currentResta

我所在地区的地图上有30个
MKPinAnnotations
。我还有一系列的阵列,相对于这30个位置中的每一个,还有30个位置。我想要的体验是能够轻触其中一个管脚,其他30个相对管脚显示在它周围。当我使用完全的互联网连接做任何事情时,结果是:

我使用Realm缓存后端的所有内容,因此我知道我有可用的数据。点击蓝色pin会弹出一个callout视图,允许我“签入”到这个位置,这将调用其他30个相对位置。这是为我删除PIN码的代码:

if let annotations = currentRestaurantAnnotations {
    mapView.removeAnnotations(annotations)
}
currentRestaurantAnnotations = nil
currentRestaurants = nil
var restaurantPins = [RestaurantAnnotation]()
for restaurant in restaurants.filter({ $0.venueID == currentFocusVenue?.id }) {
    let pin = RestaurantAnnotation(coordinate: CLLocationCoordinate2D(latitude: restaurant.latitude, longitude: restaurant.longitude), title: restaurant.name)
    restaurantPins.append(pin)
}
currentRestaurantAnnotations = restaurantPins
mapView.showAnnotations(restaurantPins, animated: true)
同样,当我有连接时,所有的注释都会到达最后一行。当我将设备置于飞行模式,并点击蓝色pin和其标注按钮时,此方法会再次触发,所有内容都会在代码中正常运行,但在
showAnnotations()
运行后,地图视图将不显示任何标注

在上下文中,如果我将设备从飞行模式中取出,应用程序将通过从云中触发30个相对位置的更新来完成它应该做的事情。此显示注释的功能再次触发,注释全部显示,因为我的设备处于飞行模式


Tl;dr:当我的设备处于飞行模式时,我如何使注释显示在MapKit上?

您是否使用高精度的gps,它依赖于互联网/wifi?这可能是原因之一。。。。。。试着把准确度改为低。你问这个问题就像是地图问题,但听起来像是领域问题。您可能想将您的问题重新表述为更具体的领域。@Deyaelden好的,我试试看@很抱歉,事实并非如此——数据来自于飞行模式下格式良好的领域,当我收集
MKPinAnnotation
s时,它们的格式也一样。当我尝试
显示注释时
,管脚不会显示。我非常确信这不是一个领域问题。您是否尝试将
addAnnotations
setVisibleMapRect
一起使用,而不是
showAnnotations