I've managed to create a sidebar from an XML file using Mike William's excellent tutorials.
This is how far I've got --> http://www.anglingatlas.com/default_new.asp As expected, the sidebar shows a list of all the markers in the order they appear in the XML file (i.e. the order they have been added to the map.) What I'd like to do now is to truncate and reverse the list to show only the last 20 or so locations added, with the most recent at the top. One way of doing this would be to reverse the order at source by appending newly added locations to the top rather than the bottom of the XML file, and only show a few locations (sort of!) by adding "overflow:auto;" to the sidebar <div>. But ideally I'd like to do it by sorting and truncating the array which generates the sidebar. I've tried inserting a simple gmarkers=gmarkers.reverse(); after gmarkers.push(marker); but was not really surprised to discover that this separates the links from the labels - so the links are ordered with newest locations at the top, but the labels appear as before, with the oldest at the top. I'm still struggling to get to grips with javascript arrays, so any pointers anyone can offer on how to go about sorting and truncating the array that generates the sidebar would be greatly appreciated. TIA. --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
