On Oct 2, 11:39 am, "Elia C." <[email protected]> wrote:
> I notice that onGDirectionsLoad is called only one time (the last
> direction load).
>
> How can I synchronize the call and the answer? Or is it an other
> tecnique to use to solve my problem?
Marcelo's answered the last question.
The reason for the observed behaviour is that you are re-using a
single GDirections object.
You start with this
directions.load("from: "+$('x').value+" to: "+$('a').value);
and then immediately cancel that by submitting
directions.load("from: "+$('x').value+" to: "+$('b').value);
etc.
If you want more than one GDirections call "in flight" at a time, you
must either use separate objects -- say directions1, directions2,
directions3 -- or trigger subsequent calls from the "load" event-
handler to ensure that each one is completed.
Andrew
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---