On Fri, Apr 23, 2010 at 3:20 PM, Scott <[email protected]> wrote:
> How do I do a drawcircle on the Overlay instead of Sending an icon?
>
Don't call super.draw(), instead iterate over your list of OverlayItems and
draw a circle at their locations. This is where deriving your own
OverlayItem class would be helpful if the radius of the circle varies for
each item. So simply:
void draw(...)
{
for (OverlayItem item : items)
drawCircle(item, ...);
}
Where drawCircle draws a circle for the given item, obviously. That's pretty
straightforward (look at the Canvas and use the Projection to convert
distance to pixels).
> Do you have a snippet of how you draw into an itemizedoverlay so that it
> doesn't clear as my method does?
>
I don't know what you mean your method "clears". Any part of the view that
needs to be redrawn will be completely cleared and redrawn, which will call
your draw method. You shouldn't have to do anything more than what I've
posted above.
-------------------------------------------------------------------------------------------------
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 [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