A JavaScript web application for designing, running, and saving weighted overlay models using the Esri ArcGIS API for JavaScript and ArcGIS Server image services.
Sometimes it's not possible to publish an ImageServer of a raster layer with the correct symbology (for example when ArcMap crashes while trying to use the Edit Raster Function tool to apply a saved rft.xml template containing the symbology). For the purposes of the Preview functionality, any service will do to let users see a layer, in which case we could let either an ImageServer or a MapServer service be used. I suggest changing line 59 of WeightedOverlayLayersSelector.js to read something like:
if (url.indexOf('ImageServer') > -1) {
var imageServiceLayer = new ArcGISImageServiceLayer(url, options);
return map.addLayer(imageServiceLayer);
} else {
var mapServiceLayer = new ArcGISDynamicMapServiceLayer(url, options);
return map.addLayer(mapServiceLayer);
}
Sometimes it's not possible to publish an ImageServer of a raster layer with the correct symbology (for example when ArcMap crashes while trying to use the Edit Raster Function tool to apply a saved rft.xml template containing the symbology). For the purposes of the Preview functionality, any service will do to let users see a layer, in which case we could let either an ImageServer or a MapServer service be used. I suggest changing line 59 of WeightedOverlayLayersSelector.js to read something like: