MKMapKit实用最大MKPolylines数量

发布于 2024-10-10 05:31:25 字数 124 浏览 0 评论 0原文

是否有任何已发布的基准测试,或者您是否有任何关于可以在 iPhone 和 iPad 上以合理性能添加到地图中的 MKPolylines 的指示?

我想添加数千个。

我的最高限额是多少?

Is there any published benchmarks or do you have any indication about how many MKPolylines you can add to a map with reasonable performance on iPhone and iPad?

I would like to add thousands of them.

What would be my top limit?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

帅气称霸 2024-10-17 05:31:25

我不知道 MKPolylines,但我尝试渲染 1200 个 MKPolygon,并且成功渲染它而没有崩溃。但它表现出一些较慢的性能。我认为没有限制。我的建议是一切都值得尝试。

I dont know about MKPolylines but i have tried rendering 1200 MKPolygons and i successfully rendered it without crashing. But it showed be some slower performance. I dont think there is a limit for it. What i would suggest is everything is worth a try.

你是暖光i 2024-10-17 05:31:25

我的应用程序(Circle 8)有大约 70 条 MKPolylines,它们在地图中都有自己单独的 MKOverlayView。性能/平移非常慢,内存警告来得又快又猛。我最终将所有这些包装到一个视图(MKOverlayPathView 的子类)中,该视图使用简单的 CGPath 调用绘制每个 MKPolyline。性能/平移/内存问题已解决。公平地说,这并不是我的原创想法,而是主要来自此处相关的 Apple 开发者论坛线程:

https://devforums.apple.com/message/328631#328631

My app (Circle 8) has about 70 MKPolylines that all had their own separate MKOverlayView in the map. Performance/panning was horribly slow and the memory warnings came in fast and furious. I ended up wrapping all these into a single view (subclass of MKOverlayPathView) that draws each MKPolyline using simple CGPath calls. Performance/panning/memory problems SOLVED. To be fair, this was not an original thought on my part but rather came largely from the related Apple Developer Forum thread here:

https://devforums.apple.com/message/328631#328631

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文