I have the following code to add 7 kmz files for estimating flood-inundation for a creek in Kansas. When I first built the page this code worked fine and the map loaded all the layers normally. Recently I have started getting sporadic errors saying some of the files didn't load because of "internal kml parser errors", but its not always for the same files. If I then load them using the Chrome console, they all load, and then when I refresh the page they will load normally. Does anyone have any ideas what might be going on? var kmlLayers = ["http://ks.water.usgs.gov/esrimaps/17ft.kmz",
"http://ks.water.usgs.gov/esrimaps/18ft.kmz",
"http://ks.water.usgs.gov/esrimaps/19ft.kmz",
"http://ks.water.usgs.gov/esrimaps/20ft.kmz",
"http://ks.water.usgs.gov/esrimaps/21ft.kmz",
"http://ks.water.usgs.gov/esrimaps/22ft.kmz",
"http://ks.water.usgs.gov/esrimaps/23ft.kmz"]
for (i = 0; i < kmlLayers.length; i++){
var kml = new esri.layers.KMLLayer(kmlLayers, {id:String(i + 1)});
map.addLayer(kml);
if (i != 0){
kml.setVisibility(false);
}
dojo.connect(kml, 'onLoad', setTrans);
}
... View more