I'll admit that I didn't examine your code in detail, but something is causing it to run very slow. I zoomed in and dragged around, and then my CPU stayed at 100% for almost a minute, using FF2 on XP SP2 on a Pentium M 1.7. Old laptop, but still... ;-)
It would probably be a good idea for you to look into server side clustering http://maps.forum.nu/server_side_clusterer/ http://maps.forum.nu/server_side_clusterer/index2.php Also, as you reload the data on the map's moveend event handler, try using some global variable that indicates when an AJAX call has been sent, and don't make another call until the first one has completed, for example when the user drags the map. That should make it all a lot more agile. Otherwise multiple calls can be made in quick succession, depending on how the user moves the map. BTW, I believe GSprite is a flasher's thing, not javascript. -- Marcelo - http://maps.forum.nu -- On Feb 2, 6:14 pm, blabyboy <[email protected]> wrote: > hi all, > First time poster, long time lurker. > > I'm currently in the process of converting a bespoke flash mapping > system over to using gmaps. The map itself functions ok, but I'd like > to improve the performance in terms of marker displays (don't we all). > Reading around the group, I think using the GSprite might save some > time as I do have a lot of bespoke icons to display. However, I'm not > sure if I'm getting the full benefit from using the open source > MarkerManager as to get to the speed improvements that I am currently > getting I have to call clearMarkers() each time I rezoom or move the > map. > > Would any of you kind souls have a quick look at the code and suggest > where I can make further improvements? > > http://waterscape-paul.ws-dev.positive-dedicated.net/map > (you need to zoom in two levels to start making any calls to the db > and it will initially return towns and attractions in that viewports > bounds + some custom padding size) > > I am currently calling the data from a mysql spatially enabled db and > passing the data back as xml to help limit the amount of data found. > > I have set a number of preloads in external js files for the images > and have then used them in GIcon() calls. > > I have a getMarkers() function that tests the zoom level and then > makes an ajax call if the zoom level is great enough - depending upon > which attributes I need to show. However, I am wondering if I should > break up the ajax call and chunk the data back to the map rather than > use GDownload() and wait for all the corresponding data to be > returned? - this is the main problem when there are 150+ markers to be > returned back. > > I would also appreciate any feedback on optimising the calls made in > my base.js file with regards to allocating the markers types and > categories. > > Kind regards, > paul --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Google Maps API" 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?hl=en -~----------~----~----~----~------~----~------~--~---
