The following block of code seems to work fine, but when I code to add a second kml layer, only the second layer loads
This is based off of the kml sample in the js api documentation https://developers.arcgis.com/javascript/jssamples/layers_kml.html
Anyone know why I can only load a single layer? Is there some limits beyond what's stated in the documentation on loading KML layers?
require([
"esri/map", "esri/layers/KMLLayer",
"dojo/parser", "dojo/dom-style",
"dijit/layout/BorderContainer", "dijit/layout/ContentPane", "dojo/domReady!"
], function(
Map, KMLLayer,
parser, domStyle
) {
var map = new Map("map", {
center: [-108.663, 42.68],
zoom: 8,
basemap: "topo",
showAttribution: false,
logo: false
});
parser.parse();
var kmlUrl = "https://dl.dropboxusercontent.com/u/2654618/kml/Wyoming.kml";
var kml = new KMLLayer(kmlUrl);
map.addLayer(kml);
kml.on("load", function() {
domStyle.set("loading", "display", "none");
});
/*
var kml2 = new KMLLayer("https://gmaps-samples.googlecode.com/svn/trunk/ggeoxml/cta.kml");
map.addLayer(kml2);
kml2.on("load", function() {
domStyle.set("loading", "display", "none");
});
*/
});