MKMapView 在regionDidChangeAnimated 中返回错误的latitudeDelta 和longitudeDelta
我正在尝试与 Web 服务对话以获取嵌入式 MKMapView 上放大或缩小区域内的位置。在我的视图控制器的regionDidChangeAnimated方法中(这是我用来捕获地图上任何用户手势的方法),我调用以下内容:
NSLog( @"latitude delta = %f", mapView.region.span.latitudeDelta );
NSLog( @"longitude delta = %f", mapView.region.span.longitudeDelta );
并且日志条目显示:
latitude delta = 0.000435
longitude delta = 0.001930
但是,如果我重新查询在 RegionDidChangeAnimated 触发后(即用户手势完成)手动执行纬度/经度德拉,我得到以下信息:
latitude delta = 0.008415
longitude delta = 0.011932
为什么这里有差异?这是放大还是缩小手势并不重要。总是有差异的。这是怎么回事??
I'm attempting to talk to a web service for locations within the zoomed-in or zoomed-out area on an embedded MKMapView. In the regionDidChangeAnimated method of my view controller (this is the method that I use to trap any user gesture on the map), I call the following:
NSLog( @"latitude delta = %f", mapView.region.span.latitudeDelta );
NSLog( @"longitude delta = %f", mapView.region.span.longitudeDelta );
And the log entry says:
latitude delta = 0.000435
longitude delta = 0.001930
However, if I requery the lat/long dela manually after the regionDidChangeAnimated has fired (i.e. the user gesture is completed), I get the following:
latitude delta = 0.008415
longitude delta = 0.011932
Why is there a difference here? It doesn't matter whether this is a zoom in or zoom out gesture. There is always a difference. What's up with this??
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我将此错误提交给 Apple,并被告知这是一个已知问题。没有建议解决方法。 :-(
I submitted this bug to Apple, and was informed that this is a known issue. No workaround was suggested. :-(