Esri / landscape-modeler-js

A JavaScript web application for designing, running, and saving weighted overlay models using the Esri ArcGIS API for JavaScript and ArcGIS Server image services.
http://landscapemodeler.arcgis.com/
Apache License 2.0
29 stars 17 forks source link

Consider allowing MapServer layers to be used for preview functionality #28

Open skocher42 opened 10 years ago

skocher42 commented 10 years ago

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);
}