The new function will be created at the time the call to GES is made,
so that it has a callback to call.  The Opera results given show quite
clearly that each call has the expected index value.

On Jul 12, 6:09 pm, Rossko <[email protected]> wrote:
> >         GoogleES.getElevationAlongPath( {path:LLs, samples:samples}, new
> > Function("path","status", "reqTerrainCB("+ index +
> > ",path,status);") );
>
> I'm not convinced this will always give the result you expect ; I
> wonder if it might even be browser dependant.  When will the "new
> Function(..)" body string get evaluated, what will be the value of
> 'index' at that time?   I don't know enough about it myself, but not
> convinced that closure will be obtained.  Your Opera results seem to
> illustrate that?

-- 
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