[英]iOS 10 MapKit previous layer zoom issue
I am working in a map application which renders a polyline over a map. 我正在地图应用程序中工作,该应用程序在地图上呈现折线。 I am having an issue when zooming, it keeps the previous polyline on the tile. 我在缩放时遇到问题,它会将先前的折线保留在图块上。
I have tried to force redrawing: 我试图强制重绘:
[self.mapView reloadInputViews];
[self.mapView.layer setNeedsDisplay];
[self.mapView setNeedsDisplay];
Also I tried to slow the zoom speed, but the issue is still in there: 我也尝试减慢变焦速度,但问题仍然存在:
[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];
Does anyone know about this? 有谁知道这个?
I found the resolution to the problem here: How to refresh an MKOverlayRenderer when mapView change 我在这里找到了问题的解决方案: 如何在mapView更改时刷新MKOverlayRenderer
So I added: 所以我补充说:
override var boundingMapRect: MKMapRect {
return MKMapRectWorld
}
To my MKPolyline & MKCircle subclass. 到我的MKPolyline和MKCircle子类。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.