AnsweredAssumed Answered

setLayerDrawingOptions

Question asked by rhyck.m on Dec 7, 2015
Latest reply on Dec 7, 2015 by rhyck.m

I am trying to render a layer within ArcGISDynamicMapServiceLayer as per this API: ArcGISDynamicMapServiceLayer | API Reference | ArcGIS API for JavaScript

This code is not working.

 

 //Rendering the parcels symbology to black
    var parcelSymbol = new SimpleFillSymbol().setStyle(SimpleFillSymbol.STYLE_NULL);
    parcelSymbol.outline.setStyle(SimpleLineSymbol.STYLE_SOLID);
    parcelSymbol.outline.setWidth(1);
    parcelSymbol.outline.setColor(new Color([0, 0, 0]));


    var dynamicData = new ArcGISDynamicMapServiceLayer(".../MapServer");


    var newrenderer = new SimpleRenderer(parcelSymbol);
    var optionsArray = [];
    var drawingOptions = new esri.layers.LayerDrawingOptions();
    drawingOptions.renderer = newrenderer;
    optionsArray[1] = drawingOptions;
    dynamicData.setLayerDrawingOptions(optionsArray);
    map.addLayer(dynamicData);

Outcomes