控制 OverlayItem 大小

发布于 2024-10-20 13:05:45 字数 237 浏览 8 评论 0原文

我正在构建一个在单个 ItemizedOverlay 中包含几十个 OverlayItems 的地图。我的地图设计为可以非常近距离地查看(大约缩放级别 18+),并且 OverlayItems 彼此非常接近。地图放大时看起来不错。但是,如果用户缩小,图标就会开始重叠,一切看起来都非常糟糕。

有没有办法控制 OverlayItem 图标大小,使其随地图缩放?如果没有,是否有办法在达到特定缩放级别后隐藏图标?关于如何解决这个问题还有其他建议吗?

I'm building a map with a few dozen OverlayItems in a single ItemizedOverlay. My map is made to be viewed very close up (about zoom level 18+), with the OverlayItems in very close proximity to one another. The map looks good when zoomed in. However, if the user zooms out the icons begin to overlap and everything looks incredibly junky.

Is there a way to control the OverlayItem icon size so that it scales with the map? If not, is there a way to hide the icons once a specific zoom level is reached? Any other suggestions on how to approach this problem?

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

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

发布评论

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

评论(1

流年里的时光 2024-10-27 13:05:45

Joshc,fegruior,你们可能想看看 Geobeagle 是如何做到的。具体来说,此文件:http://code.google.com/p/geobeagle/source/browse/trunk/GeoBeagle/src/com/google/code/geobeagle/activity/map/OverlayManager.java

他们管理两个叠加层,一个用于缩小时,一个用于放大时。

理论上,您可以有 n 个(无论有多少缩放级别)叠加层,它们都具有不同大小的图标,并交换可见的叠加层当您放大和缩小时。这可能会使处理变得繁重,但您是否想要这样做是您需要做出的决定。

Joshc, fegruior, You folks may want to check out how Geobeagle does it. Specifically, this file: http://code.google.com/p/geobeagle/source/browse/trunk/GeoBeagle/src/com/google/code/geobeagle/activity/map/OverlayManager.java

They manage two overlays, one for when you're zoomed out, and one for when you're zoomed in.

Theoretically, you could have n (however many zoom levels there are) overlays that all have differently sized icons, and swap the visible one out as you zoom in and out. This could get heavy on the processing, but whether that's something you want to do is a decision you would need to make.

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