5

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?

josh-cain
  • 4,997
  • 7
  • 35
  • 55
  • Hi Joshc. Did you manage to solve this issue? I run into the same problem. If you did, it woud be great if you shared what you found. Thanks. – ferguior Sep 13 '11 at 19:39
  • Nope, what I ended up doing is dynamically changing the list size so that less-important icons disappeared when the map zoomed out. Not the ideal solution, but I couldn't find a way to scale down icon size. – josh-cain Sep 23 '11 at 16:22
  • I found a [solution for this question.](http://stackoverflow.com/questions/10001655/how-do-you-control-an-overlayitems-size-on-the-google-android-map) – Ring Apr 04 '12 at 01:58

1 Answers1

1

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.

Travis
  • 3,737
  • 1
  • 24
  • 24
  • This is similar to what I ended up doing - I made my list of items dynamically expand and contract based on zoom level. Kind of an ugly way to do it, but I guess all we're left with is workarounds! – josh-cain Jan 06 '12 at 19:56