Geographic Information Systems Asked by GeoGene on June 10, 2021
This error is becoming a major problem and I am completely mystified on what to do about it. I already addressed the issue with the arcgis javascript loading before the JQuery libraries, so I know this is not the issue. The error pops up this time when I try and load a ArcGISImageServiceLayer from a REST service. This should be very simple, I have NOT defined anything twice. The error gives no information, so I narrowed the suspect code down by simply commenting out code until I could be sure of the exact code block that is throwing the error.
mo._addBioVolumeLayer = function(year, map) {
console.log("map ", map);
let bioLyr = map.getLayer("Bio Volume Fisheries");
console.log("bioLyr ", bioLyr);
if (bioLyr) {
map.removeLayer(bioLyr);
}
//const year = dom.byId("monitor-year-search").value;
console.log("adding bio-volume data to map for year ", year);
let Url = "https://myDomain..._BioVolume" + year + "/ImageServer";
console.log("image url = ", Url);
let bioVolLayer = new ArcGISImageServiceLayer(Url, { ///this line is throwing the error
id: "Bio Volume Fisheries",
opacity: 0
});
map.addLayer(bioVolLayer, 1);
}
Here is the error:
I don’t know what to look for under ‘info’ to give me a clue where to look to fix the error. In the code above, if I comment out where I define ‘bioVolume’ I don’t get an error. Also, I am loading a Graphics layer in the same .js file without issue. I just need some ideas on where to go from here.
Get help from others!
Recent Answers
Recent Questions
© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP