Hey all- Bart, thanks for a great description of what you do for better performance. I know another developer that does that with great success as well (see: http://madoffmap.com/)
For those looking to emulate, there are various examples of OverlayBase subclasses here: http://code.google.com/apis/maps/documentation/flash/demogallery.html?searchquery=overlaybase&classname= I do want to say that we are working on improving the performance of overlays (particularly markers) in the Flash API still - likely in the next version. But Bart's idea is a great one to implement, regardless. - pamela On Sat, Feb 21, 2009 at 8:31 AM, Bryan Dunbar <[email protected]> wrote: > Bart - Do you have an example of extending overlay base? i'm in the middle > of implementing the idea of "layers", i.e. collection of > polylines/polygons/markers. When I get a bunch of them on the map, say for > example a layer of the countries of the world the performance of panning > zooming becomes terrible. I think implementing something like your custom > overlay would be the right way to go. > > Thanks, > Bryan > > On Fri, Feb 20, 2009 at 1:16 PM, [email protected] > <[email protected]> wrote: >> >> Very interesting point Bart. This might actually solve our problem. I >> have to try this out immediately. Thanks very much for the input! >> >> - Marko >> >> On 20 helmi, 17:25, Bart <[email protected]> wrote: >> > Marko, >> > >> > A second opinion on this: >> > >> > On a project where i need to load 500+ markers i found the performance >> > of the API Markers problematic indeed, regardless of me using Flash or >> > Flex, and any MS/Firefox/Chrome browser i try. Disappointing because i >> > would expect a Flash API to be much more powerful in this then it's >> > JavaScript counterpart. >> > >> > Maybe this is because each individual marker is added as a separate >> > overlay instead of grouping them all into a single overlay to manage. >> > In my case the Javascript API is not an option and i simply decided >> > not to use the API markers but create my own instead. >> > >> > I created a class inheriting OverlayBase and load my own set of Sprite >> > objects with custom images, event handlers etc. all into this single >> > custom layer. No problem whatsoever the performance is great, even >> > with 500+ sprites which all get moved around when the positionOverlay >> > fires (the user is dragging the map). >> > >> > Another benefit of creating my own custom overlay with markers is that >> > i am not "restricted" by how the API markers & info windows work, >> > instead i can define the "look and feel" of the map interactions >> > myself, out of the blue... >> > >> > Bart >> > > > > > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Google Maps API For Flash" 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/google-maps-api-for-flash?hl=en -~----------~----~----~----~------~----~------~--~---
