On Oct 24, 3:10 am, Mini0n <[EMAIL PROTECTED]> wrote:
> I've seen that... But no good. Don't know where I'm failing.
> I have:
>
> request = GXmlHttp.create();
> request.open("GET", "file.xml", true);
> request.onreadystatechange = function()
> {
>         if (request.readyState == 4)
>         {
>                 var xmlDoc = GXml.parse(request.responseText);
>                 // obtain the array of markers and loop through it
>                 var markers = 
> xmlDoc.documentElement.getElementsByTagName("marker");
>                 if(markers.length!=0)
>                 {
>                         // code for extracting falues from the XML
>                 }
>         }}
>
> request.send(null);
>
> In Mike William's page it states that for the GXmlHttp to be
> synchronous, we must set the third parameter of request.send to false.
> Here I suppose it's the request.open's third parameter, since
> request.send only has one.
>
> But if I set it to false, no point appear. =(
>
> As of GDirections, I'm not seeing how to make the callback nor what to
> call after the listner has done it's job.
> I have:
>
> dirn.loadFromWaypoints(points, {getPolyline:true});
> GEvent.addListener(dirn,"load", function()
> {
>         // bla bla bla
>
> });
>
> Where to put the callback and what to call?

 Currently your page is failing here:
        data_1234[i] = markers[i].getAttribute("num");
Because i == 2 and you only have two markers in your xml (marker[0]
and marker[1])

I don't understand why you have all the i++ sprinkled inside the for
(var i = 0; ...) loop.

Get it working for one xml file, then extend it to multiple routes in
the same file or multiple xml files.

  -- Larry



>
> On Oct 24, 10:44 am, Rossko <[EMAIL PROTECTED]> wrote:
>
> > > I can't make the goddamn snapped polyline withou having one alert
> > > before, or else no point appear.
>
> > This is a clue that you haven't grasped the asynchronous nature of
> > GXmlHttp and GDirections etc.
> > Have another look at-http://econym.org.uk/gmap/async.htm
>
> > Yes, if you can master that you can update the map rather than re-
> > creating it.
>
> > 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 [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
-~----------~----~----~----~------~----~------~--~---

Reply via email to