Select to view content in your preferred language

setLayerDrawingOptions

3453
2
Jump to solution
12-07-2015 10:47 AM
RichardMoussopo
Frequent Contributor

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);
0 Kudos
1 Solution

Accepted Solutions
thejuskambi
Frequent Contributor

You need to enable support for dynamic layer on the map service in ArcGIS Server. Has it been enabled?

View solution in original post

2 Replies
thejuskambi
Frequent Contributor

You need to enable support for dynamic layer on the map service in ArcGIS Server. Has it been enabled?

RichardMoussopo
Frequent Contributor

Thank you, this fixed one service that I host myself, but not for the other one hosted by a different party. I am assuming this option is not enabled. I guess I have to find a work around for this one! Any suggestions please?

0 Kudos