【问题标题】:iOS 10 MapKit previous layer zoom issueiOS 10 MapKit 上一层缩放问题
【发布时间】:2017-02-26 12:24:21
【问题描述】:

我正在使用在地图上呈现折线的地图应用程序。我在缩放时遇到问题,它会在图块上保留以前的折线。

我试图强制重绘:

[self.mapView reloadInputViews];
[self.mapView.layer setNeedsDisplay];
[self.mapView setNeedsDisplay];

我也尝试减慢缩放速度,但问题仍然存在:

[MKMapView animateWithDuration:2
                         delay:0
        usingSpringWithDamping:0.6
         initialSpringVelocity:10
                       options:UIViewAnimationOptionCurveEaseOut
                    animations:^{
                        [self.mapView setVisibleMapRect:unionRectThatFits
                                            edgePadding:UIEdgeInsetsMake(20, 10, 20, 10)
                                               animated:YES];
                    }
                    completion: nil];

有人知道吗?

【问题讨论】:

  • 我遇到了同样的问题!仅在 iOS10 开始
  • 您找到解决方案了吗?我遇到了同样的问题,找不到解决方法。
  • 嗨,你是怎么解决这个问题的。
  • 嘿,你知道怎么解决这个问题吗?

标签: ios iphone mapkit ios10


【解决方案1】:

我在这里找到了问题的解决方案:How to refresh an MKOverlayRenderer when mapView change

所以我补充说:

override var boundingMapRect: MKMapRect {

    return MKMapRectWorld
}

到我的 MKPolyline 和 MKCircle 子类。

【讨论】:

  • 您好 PJeremyMalouf,我尝试了您的解决方案。它对地图渲染没有任何影响。如果您有任何其他想法,请与我们联系。
猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2016-06-17
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多