TreKing, you are great!

  In fact, that was exactly the problem. I was populating with each
overlay item I was adding to my overlay. Now I call populate()
when i have finished adding all overlays items and it takes about 2
seconds!

  Anyway, now i'm moving on and trying to show only overlay items in
viewable area and I think I'm making great avances. When I finish
it I'll post for anyone who needs it

  Thx Treking, you've been very helpful.

On 28 oct, 15:49, TreKing <[email protected]> wrote:
> On Thu, Oct 28, 2010 at 8:25 AM, Pikoh <[email protected]> wrote:
> >  > Are you reading from a local DB or pulling from the network?
> >  It's a local db.
>
> Well that greatly simplifies things. From the map view you can get the
> current min and max points the user is currently viewing. With this you can
> create a query that only returns those stops that are within the min and max
> values so you'd reduce the data set considerably. That alone should give you
> a huge performance boost.
>
> >  > AFAIK, there is no good way of knowing when the user has panned or
> > zoomed
> >  >(there are no related events)
>
> >  Well, this guys at Google should make this events available, I think they
> > are very useful :)
>
> Yes, the Google Maps API leaves ALOT to be desired, but I don't think there
> are any plans to update it. Not when Google can keep making their own Maps
> app better and better and make the rest of ours look like crap :)
>
> On Thu, Oct 28, 2010 at 8:29 AM, Pikoh <[email protected]> wrote:
> > I mean, first overlay items go faster and then it slows down.
>
> You have an "addOverlay" function for you ItemizedOverlay. Are you by chance
> calling "populate()" in there each time you add a new item? Because if you
> do that each and every time you add a new item for 400 items, then it would
> definitely explain the exponential slow down. Only call populate ONCE when
> you've made all the changes to your list that need to be drawn.
>
> -------------------------------------------------------------------------------------------------
> TreKing <http://sites.google.com/site/rezmobileapps/treking> - Chicago
> transit tracking app for Android-powered devices

-- 
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

Reply via email to