从地图中删除 mkoverlay
我将带有自定义绘图的叠加层(MKOverlay)添加到地图视图中。叠加层显示良好,我可以看到图纸。但是当我删除该覆盖层时,它并没有完全删除绘图的某些部分仍然存在。原因是什么?我正在使用removeOverlay:删除该覆盖层。任何帮助表示赞赏..
i added overlay (MKOverlay) with custom drawings to the Mapview. The overlay showing fine and i can see the drawings. But when i remove that overlay its not removing perfectly some part of the drawing is still there. What is the reason? im using removeOverlay: for removing that overlay. Any help is appreciated..
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
不知道你们是否仍然想知道这个问题,但以下内容对我有用:
希望这有帮助!
Don't know if you guys are still wondering about this, but the following works for me:
Hope this helps!
您可以删除地图中的所有叠加层。它工作得很好
将此功能添加到 yourviewController :
使用:
you can delete all overlay in your map. it's working very well
add this function to yourviewController :
using :
位置更新后,我的 MKCircle() 顶部不断出现多个叠加层。这是 @ErhanDemirci 答案的 Swift 4 答案,随后将我的 MKCircle 添加到其中。步骤 2. 是 Swift 4 版本的答案。
I kept getting multiple overlays on top of my MKCircle() after the location was updated. Here's the Swift 4 answer of @ErhanDemirci answer with my MKCircle being added to it afterwards. Step 2. is the Swift 4 version of the answer.