AnsweredAssumed Answered

KML loading limits in JS API

Question asked by ndorman on Jul 20, 2015
Latest reply on Jul 21, 2015 by ndorman

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


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?



    "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




    var kmlUrl = "";

    var kml = new KMLLayer(kmlUrl);


    kml.on("load", function() {

      domStyle.set("loading", "display", "none");



    var kml2 = new KMLLayer("");


    kml2.on("load", function() {

      domStyle.set("loading", "display", "none");