ArcGis Js Api Issue with adding KML Layer


#1

I’m using Electron + Arcgis JS API for an application, trying to add a KmlLayer to the map returns error, i’ve tried pointing the file locally however it fails.

var kml = new KMLLayer("https://dl.dropboxusercontent.com/s/vlu533qmzrx4vxa/KML-zip_20160509011759.kml");
            map.addLayer(kml);
            kml.on("load", function() {
                domStyle.set("loading", "display", "none");
            });

Returns the following error, somehow it treats all callback as file://, is there anyway to bypass this ?

GET file://utility.arcgis.com/sharing/kml?url=https%3A%2F%2Futility.arcgis.com%…7B%22wkid%22%3A4326%7D&model=simple&folders=&outSR=%7B%22wkid%22%3A4326%7D net::ERR_FILE_NOT_FOUND