> I found that error in my console as well. I am not sure how to fix it > though. Could you give me an example? > Every time I try to move my code around my map doesn't appear when I > run it.
Well, moving chunks of code around at random won't fix it, you have to look at what it does and think about what you'd like it do. Set aside the checkboxes issue for now - first get the XML displaying on the map. Run - walk stuff. Start by actually looking at the code you have, and thinking through it - GDownloadUrl("markerdata.xml", function(data) { var xml = GXml.parse(data); var markers = xml.documentElement.getElementsByTagName("marker"); That fetches the XML and extracts all the XML marker sections for (var i = 0; i < markers.length; i++) { var label = markers[i].getAttribute("label"); ... map.addOverlay(marker); } That's a loop that scans through the XML elements, extracts some data , makes some markers. Fine so far. Next ... var point = new GLatLng(lat,lng); What's that? What are lat and lng, you haven't defined them anywhere? Next ... tabinfo = markers[i].getElementByTagName("tab"); What is i ? We did define a variable i earlier and used it in the loop. It'll have been left pointing just beyond the last XML marker. Looking at the next lines we can see that this code section is meant to read the tabs values for each XML marker. It's not going to do that because i only ever points beyond the last XML marker, where the previous loop left it pointng, and there's nothing to make it try more than once anyway. This whole section needs to be inside the for-loop that was finished earlier, don't you think? That way, as each XML marker was read you would also read its associated tab info. And then go round the loop to do the next one. Going back to var point = new GLatLng(lat,lng); that'll never work because we have no lat or lng variable defined. But .. looking inside the previous for-loop, that already handles the required position of the markers it makes. Looking at the code afterwards (the tabs-reading section that needs to be moved inside the loop), that doesn't use a variable 'point' at all. The whole line is redundant (leftover from some previous work I expect) and needs taking out. cheers, Ross K --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Google Maps API" group. To post to this group, send email to Google-Maps-API@googlegroups.com To unsubscribe from this group, send email to google-maps-api+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/Google-Maps-API?hl=en -~----------~----~----~----~------~----~------~--~---