On Mon, Jan 18, 2010 at 10:50 PM, Kevin Duffey <andjar...@gmail.com> wrote:

> I'd first like to avoid loading different image sizes for each zoom level
> for each item I want to place on the map.
>


> Here's the thing.. in my app, it shows state parks. If you're zoomed out
> far enough, you're not going to see any parks. Right now tho, as you zoom
> out, all my icons stay the same size and get closer together the further out
> you go, until, as you said, they are crowding each other.. overlapping. You
> can still click on them..but it's pointless because you're probably clicking
> on several at once when you've zoomed out to see the full US. I want the
> icons to show up when the user is zoomed in at a certain level.. and get
> smaller as they zoom out for a couple zooms, then disappear completely.
>

I would do as Frank suggested and have a min and max zoom level you show
icons for and the range of levels in-between, with a set of icons for each
level. This will look better than scaling your images. When you exceed that
min / max, remove the overlays from the map until the user gets back in the
range.


> I am not entirely sure how to "replace" icons with different sized images
> as the user zooms out.
>

Are you using ItemizedOverlay? It has a setMarker() function that lets you
set the image used by the list of items.

Do you know by chance if the draw() method is called several times per
> second like in desktop/windowing/games?


The draw() function is called whenever the view is invalidated and it's
required. Like when you add or remove overlays (or other views), pan the map
around, or zoom in or out. It's called twice each time, once for the shadow
layer, once for the "regular" layer.

-------------------------------------------------------------------------------------------------
TreKing - Chicago transit tracking app for Android-powered devices
http://sites.google.com/site/rezmobileapps/treking
-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to