On Thu, Feb 11, 2010 at 2:35 AM, aspekt9 <[email protected]> wrote: > If I'm both drawing lines and utilizing items, would it be wise to > implement both a MapOverlay and a MapItemizedOverlay? Or do I just > need one?
I haven't done line drawing in the map view, but probably just one. Override draw(), call super.draw() to do the default drawing and then to draw your lines however that's done. On Thu, Feb 11, 2010 at 2:55 AM, aspekt9 <[email protected]> wrote: > What's the right way to be drawing these? I was under the impression you were drawing these points / lines on your own, but now I see you're using ItemizedOverlay. I would expect the ItemizeOverlay class to be optimized for this sort of thing already (i.e., the map would not draw overlay items that are not in the view), so I think doing a bounds check yourself might be overkill, and may in fact make things worse if you do it every time draw is called. Of course I don't know the implementation details of the ItemizedOverlay class to know for certain. I would do as others have suggested and keep track of when the view changes (on zooming or panning basically) and needs to be updated. When this happens, in the draw() call then and only then would you need to update your list of items to draw. ------------------------------------------------------------------------------------------------- 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

