I call several times getElevationAlongPath, the problem is that the
response can arrive in different order because the calls are
asynchronous.  One solution is:

waitj=0;
elevationService2.getElevationAlongPath({
          path: latlngs,
          samples: SAMPLES
        }, plotElevation_especial);
while (waitj==0);
 //in this case, the running stops until in plotElevation_especial I
change to waitj=1

function ploElevation_especial()
{
stuff
waitj = 1
}

In this way, I can calculate the final result, because the data
arrives in order.
Is there a better way to accomplish this?
thanks a lot friends
mariovi

-- 
You received this message because you are subscribed to the Google Groups 
"Google Maps JavaScript API v3" 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-js-api-v3?hl=en.

Reply via email to