i tried to get it to wait but what i created developed some sort of
memory leak
here is the offending code, i start by passing it a kml file in the
url....
document.getElementById("status").innerHTML = "Loading...";
var geoXml = new GGeoXml(daUrl);
GEvent.addListener(geoXml, 'load', function() {
if (geoXml.loadedCorrectly()) {
geoXml.hide();
map.addOverlay(geoXml);
document.getElementById("status").innerHTML = "";
}
});
you can see where it was located (its commented out) here..
http://region3.dfg.googlepages.com/r3starter1_6.html
EXAMPLE USE...
http://region3.dfg.googlepages.com/r3starter1_6.html?kml=http://ftp.dfg.ca.gov/Public/R3_BDR/gis_exports/dfg_lands_r3.kmz
On Jan 21, 5:22 pm, Rossko <[email protected]> wrote:
> > here is a simple example where i try to use .hide() and it does
> > nothinghttp://region3.dfg.googlepages.com/r3starter1_1.html
>
> GGeoXml is asynchronous. It sends off a request to Google's servers,
> they read your KML and construct some overlays, and pass it all back
> to the API script on the browser, which renders it on the map. That
> takes a long time.
>
> Your script doesn't wait for all that, it carries on executing.
> The hide() action is executed long before the GGeoXml response comes
> back, there's nothing to hide yet.
>
> Have a look at th GGeoXml load() event
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---