mons0160

renderer.setColorInfo for Dynamic Map Service drawing options

Discussion created by mons0160 on Apr 15, 2014
I can get the new renderer.setColorInfo to work on a feature layer being drawn client side.  I cannot however get the exact same parameters to work as drawing options for a dynamic map service.  The information is being passed (see below) but the returned image is not respecting the color ramp. Border comes in as set, fill is not adhering. Any ideas? Something obvious?

 
[{"id":0,"source":{"type":"mapLayer","mapLayerId":0},"drawingInfo":{"renderer":{"colorInfo":{"field":"A101001_00","minDataValue":544909,"maxDataValue":27320402,"colors":[[0,0,255,255],[0,128,0,255]]},"type":"simple","symbol":{"color":[0,0,0,64],"outline":{"color":[0,0,0,255],"width":4.125,"type":"esriSLS","style":"esriSLSSolid"},"type":"esriSFS","style":"esriSFSSolid"}}},"minScale":0,"maxScale":0}]



Here is the code.....
 var optionsArray = [];
        var drawingOptions = new esri.layers.LayerDrawingOptions();
      
        
        var renderer = new esri.renderer.SimpleRenderer(new esri.symbol.SimpleFillSymbol().setOutline(new esri.symbol.SimpleLineSymbol().setWidth(5.5)));
          renderer.setColorInfo({
            field: "A101001_00",
            minDataValue: 544909,
            maxDataValue: 27320402,
            colors: [
              new esri.Color("blue"),
              new esri.Color("green")
            ]
          });
        
        drawingOptions.renderer = renderer;
        optionsArray[0] = drawingOptions;
        app.usaLayer.setLayerDrawingOptions(optionsArray);
        // add the layer to the map
        app.map.addLayer(app.usaLayer);

Outcomes