On Sep 1, 9:12 am, rodsbot <[email protected]> wrote: > Dear, > > I have some trouble to extract from XML file to a tab some Lat Lng > points. > > On the code bellow, I create a tab "pointsparcours" that will contain > all the coordinate of the XML file.
Where is your map? http://groups.google.com/group/Google-Maps-API/web/suggested-posting-guidelines http://groups.google.com/group/google-maps-api/web/why-including-a-link-is-critical > > I use pointsparcours.push(pts[i]); that work fine at this point > (alert(pointsparcours[0]); show me that the coordinate are well > pushed). > > The problem is that I can't get this tab data out. > The last line alert(pointsparcours[0]); give me an "undefined" alert > message. > > How could I get this tab with data for an external use ? (...if > possible). > > Thanks !! > > > var request = GXmlHttp.create(); > request.open("GET", "example-valmy-15.xml", true); > request.onreadystatechange = function() { GXmlHttp is asynchronous, the call back function runs when the data comes back. See Mike Williams' tutorial for working examples, this has the concept discussion: Javascript Concepts - Part 2 Asynchronous I/O http://econym.org.uk/gmap/async.htm > if (request.readyState == 4) { > var xmlDoc = GXml.parse(request.responseText); > This sends the request. > request.send(null); The request hasn't come back from the server yet. > alert(pointsparcours[0]); -- Larry -- 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.
