AnsweredAssumed Answered

ERROR when changing renderer for dynamic map layer. PLEASE HELP

Question asked by xajhqffl on Nov 16, 2013
Latest reply on Nov 18, 2013 by xajhqffl
Hello,

I met this error when changing the rendere for dynamic layer. I think I did everything right..

Resource interpreted as Image but transferred with MIME type text/plain.."http://...../arcgis/rest/services/.../.../MapSer???581%2C80.57984028028211&bboxSR=32611&imageSR=32611&size=1532%2C250&f=image".

app.map = new Map("map");        var basemap = new esri.layers.ArcGISDynamicMapServiceLayer("http://xxx/arcgis/rest/servicesxxxx/MapServer");         app.map.addLayer(basemap);          $("#submit").click(function(){          var classDef = new ClassBreaksDefinition();    classDef.classificationField = "attr1";       classDef.classificationMethod = "natural-breaks"; // always natural breaks       classDef.breakCount = 10; // always five classes          var colorRamp = new AlgorithmicColorRamp();       colorRamp.fromColor = new Color.fromHex("#ffffcc");       colorRamp.toColor = new Color.fromHex("#006837");       colorRamp.algorithm = "hsv"; // options are:  "cie-lab", "hsv", "lab-lch"              classDef.baseSymbol = new SimpleFillSymbol("solid", null, null);       classDef.colorRamp = colorRamp;          var params = new GenerateRendererParameters();       params.classificationDefinition = classDef;       var generateRenderer = new GenerateRendererTask("http://xxxx/arcgis/rest/services/xxx/xxx/MapServer/0");       generateRenderer.execute(params, applyRenderer, errorHandler);         });       function applyRenderer(renderer) {                      var optionsArray = [];           var drawingOptions = new LayerDrawingOptions();           drawingOptions.renderer = renderer;            optionsArray[1] = drawingOptions;           basemap.setLayerDrawingOptions(optionsArray);           basemap.refresh();   }

Outcomes