In the mapclick event handler I get the elevation point, with
something like:
elevator.getElevationForLocations(positionalRequest,
function(resultsz, status)
this is working ok. When I click the map I get the elevation in that
point :)
Somewhere else, I have a button that calculates volume of shape, where
at some point I need to request elevation points with:
j==0;
elevationService2.getElevationAlongPath({
path: latlngs,
samples: SAMPLES
}, plotElevation_especial);
while (j==0); //this is my may to make this call synchronous
Problem: the volume only gets calculated only if I click the map, and
the getElevationForLocations is executed. I mean
plotElevation_especial makes j=1 and the program continues ok.
If I dont click the map and I request volume, plotElevation_especial
never sets j=1, and enters a loop. this is really weird, because the
two codes are independent, actually there are 1500 lines between them.
In both cases latlngs is set correctly.
Somebody has had this mysterious behavior?
what is going on?
thanks
mariovi
--
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 [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.