Exactly Frank. 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.
The question is.. I add the item overlays to the MapActivity.. er.. don't have my code up right now, but the map controller or something like that. Each item has an icon associated with it. I then add them to the list and they just show up magically as part of that API. I am not entirely sure how to "replace" icons with different sized images as the user zooms out. I did figure out how to add the listener for zoom.. the true/false parameter let's me know if they zoomed in or out, and I can control it to some extent, as well as find the current zoom level. I am just not entirely sure how I replace the icon that I set when I added the overlay item to the list. I haven't messed with it yet, but it wasn't immediately obvious to me how to do this without removing items from the list, adding new items with new icons to the list, and drawing. That is my first guess.. but it seems there would be a better way to do this. On Mon, Jan 18, 2010 at 8:37 PM, Frank Weiss <[email protected]> wrote: > I'm assuming you mean the overlay markers. > > I'll agree with TreKing. Scaling map icons with the scale of the map (the > icon remain the same size relative to the size of a city, map feature, etc.) > is not such a great idea. I wouldn't have done it if I'd designed google > maps. Indeed I just tried the Maps application on the Droid and the marker > icon (and text) for a POI remain the same pixel size from one zoom extreme > to another. > > That said, if you do want to scale the overlay markers, I'd suggest using > only three or four sizes. Decide which range of zoom levels each one is for. > Upon zoom notification, change the drawable for the overlay as needed. > There's another issue of marker crowding as you zoom out. I don't know if > you need to address that in your map application as well. > > -- > You received this message because you are subscribed to the Google > Groups "Android Developers" group. > To post to this group, send email to [email protected] > To unsubscribe from this group, send email to > [email protected]<android-developers%[email protected]> > For more options, visit this group at > http://groups.google.com/group/android-developers?hl=en >
-- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en

