控制OverlayItem大小 [英] Controlling OverlayItem size

查看:108
本文介绍了控制OverlayItem大小的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我要建一个几十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是怎么做的。具体来说,此文件:<一href="http://$c$c.google.com/p/geobeagle/source/browse/trunk/GeoBeagle/src/com/google/$c$c/geobeagle/activity/map/OverlayManager.java" rel="nofollow">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.

这篇关于控制OverlayItem大小的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆