Hi Christoph, thanks for your suggestion, but from playing with your library demonstrator you seem to be have the same problem I identified with my solution: since the only event available from the framework is when the user lifts his finger from the touchscreen (MotionEvent.ACTION_UP), the area used for retrieving the markers may be different than the area which is shown after the scrolling animation stops.
To test this I compiled your demonstrator with the createOverlayWithLazyLoading() method, zoomed in a bit and made quick horizontal swipes. When I did this, no markers would show up because the decelaration animation would move beyond the area calculated at the moment I lifted my finger (or, in the emulator, my mouse). I couldn't confirm that this was really the case because I couldn't find the source code for the library anywhere, even though your project is listed as being GPL2. So I'm back to square one: I need to know how to get an event when the map deceleration animation finishes. Right now, I don't think that this is available from the framework. If that's the case, then I'll open a bug report with the official repository. On Aug 10, 11:40 am, christoph widulle <christoph.widu...@googlemail.com> wrote: > Hi Daniel, > > check out > mapview-overlay-manager.http://code.google.com/p/mapview-overlay-manager/ > > its a library that exactly addresses to your needs. > > would be great if you can give me some feedback. > > Greetings, > Christoph > > On 7 Aug., 14:01,Cachapa<cach...@gmail.com> wrote: > > > Hi, > > > I have a class which extends MapView and manages markers inside the > > view. > > > The trouble is I have a *lot* of markers to show (~12,000), and > > loading them all at once doesn't really work, so I'm retrieving the > > markers on demand so that at any time there will be only ~20 markers > > on the map (at lower zoom levels the markers are condensed into a few > > "area" markers). > > > I need to set a listener for when the map drag animation stops so that > > I can load the markers at this point, but I've tried everything from > > setLayoutAnimationListener(this) to overriding onAnimationEnd > > (Animation arg0) and onAnimationEnd() without any positive results > > (those methods seem to never be called). > > > My current "solution" is listening to a MotionEvent.ACTION_UP and > > updating the map at that moment, but that makes the animation jerky, > > and may load the wrong set of markers depending on how fast the user > > was scrolling. > > > So, does anyone know if it is possible to listen to the map's > > animation? > > > Cheers, > > DanielCachapa --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---