I don't know the reason, but when I load different KML files, their
load is erratic: sometimes are loaded correctly (they are visible) and
other times the API say me the files are loaded but they are not
visible. Any idea? The code is:
function loadKMLUser(url) {
try {map.removeOverlay(ns.kmlUser);}catch(e){}
setMapCursor('wait');
ns.kmlUser = loadKML(url, function(){setMapCursor('default');centerKML
(ns.kmlUser, map);},function(){setMapCursor('default');});
if (ns.kmlUser) map.addOverlay(ns.kmlUser);
}
function loadKML(url, callback_success, callback_error) {
var geoxml = new GGeoXml(url, function(){
if
(geoxml.loadedCorrectly()) {
if (callback_success) {callback_success(geoxml);}
} else {
if (callback_error) {callback_error();}
}});
return geoxml;
}
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---