AnsweredAssumed Answered

Calling setLayerDrawingOptions ignored on agol traffic layer

Question asked by j.eyreesri-ch-esridist Employee on Sep 20, 2017

When I call setLayerDrawingOptions on a layer in the World Traffic mapservice, the drawing options are ignored.

(https://traffic.arcgis.com/arcgis/rest/services/World/Traffic/MapServer)

Is this functionality some how disabled on this mapservice? 

 

Here is my code:

 

var trafficLayer = this.map.getLayer(trafficLayerId) as ArcGISDynamicMapServiceLayer;
var layerDrawingOptions = [];
var layerDrawingOption = new LayerDrawingOptions();
layerDrawingOption.renderer = jsonUtils.fromJson({
"type": "simple",
"symbol":
{
"type": "esriSLS",
"style": "esriSLSDot",
"color": [115,76,0,255],
"width": 1
}
});
layerDrawingOptions[23] = layerDrawingOption;
trafficLayer.setLayerDrawingOptions(layerDrawingOptions);

Outcomes