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?
Thank you for your help.
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
-~----------~----~----~----~------~----~------~--~---