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);
Solved! Go to Solution.
You need to enable support for dynamic layer on the map service in ArcGIS Server. Has it been enabled?
You need to enable support for dynamic layer on the map service in ArcGIS Server. Has it been enabled?
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?