Thanks larry and rossko! I will look into this asynchronous thing.

-vishal garg

On Wed, Nov 16, 2011 at 12:30 AM, Rossko <ros...@culzean.clara.co.uk> wrote:
>> what does asynchronous imply here?
>
> Description
> http://econym.org.uk/gmap/async.htm
> Implication, you can't use results until after they have returned
>
> Cross-posted in v3 group
>> You can access the code at
>> http://web.iiit.ac.in/~vishal.gargug08/test/index.php
>
> You have
>   dirn1.loadFromWaypoints([p11.toUrlValue(6),p11.toUrlValue(6)],
> {getPolyline:true});
>   dirn2.loadFromWaypoints([p22.toUrlValue(6),p22.toUrlValue(6)],
> {getPolyline:true});
> These only fire off requests to Google's servers, without waiting for
> a response.  So dirn1 fires, followed by dirn2, and then whatever code
> comes next - but results are not yet available.
>
> Note that there are speed limits on the rate at which you can fire
> requests, to prevent abuse.  Firing multiple requests is likely to
> fail.  Search this group for handling multiple requests, or
> http://econym.org.uk/gmap/geomulti.htm
>
>
>   var p1 = dirn1.getPolyline().getVertex(0);
> There is no polyline yet.  If you want to do something with the
> results from the requests, you need to listen for when they available
> by setting up a 'load' event listener and using the results only in
> the callback.
> http://econym.org.uk/gmap/steps.htm
>
> --
> You received this message because you are subscribed to the Google Groups 
> "Google Maps API V2" 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.
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Google Maps API V2" 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.

Reply via email to