控制OverlayItem大小大小、OverlayItem

2023-09-05 08:25:56 作者:穿越半个地球遇见你

我要建一个几十OverlayItems在一个ItemizedOverlay地图。我的地图是用来被认为非常接近的(大约缩放级别18岁以上),与OverlayItems在非常靠近彼此。在地图上看起来不错时缩放。但是,如果用户缩小的图标开始重叠,一切看起来令人难以置信的毫无价值。

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.

有没有办法来控制OverlayItem图标大小,使其与比例尺?如果没有,有没有办法隐藏的图标,一旦一个特定的缩放级别达到?任何其他建议,就如何解决这个问题?

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?

推荐答案

Joshc,fegruior,你人可能想看看Geobeagle是怎么做的。具体来说,此文件:http://$c$c.google.com/p/geobeagle/source/browse/trunk/GeoBeagle/src/com/google/$c$c/geobeagle/activity/map/OverlayManager.java

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.

从理论上讲,你可以有N(然而,许多缩放级别有)覆盖所有有不同大小的图标,并切换可见一出,你放大和缩小。这可以让沉重的处理,但无论那是你想要做的事情是,你需要做出决定。

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.