AnsweredAssumed Answered

Failed to add an operational layer.

Question asked by shaningesri on Jan 24, 2014
Latest reply on Jan 24, 2014 by kenbuja
I created a mayservice (containing only 1 layer) a couple of days ago, and I could add it as a operational layer by:
var operationalLayer = new esri.layers.ArcGISDynamicMapServiceLayer(serverURL, { "opacity": 0.5 } );
map.addLayers([basemap, operationalLayer, featureLayer]);
After I updated the mapservice to hold multiple layers.  Then I revised the code as
var operationalLayer = new esri.layers.ArcGISDynamicMapServiceLayer(serverURL + "/0", { "opacity": 0.5 } );
where the '/0' points to the layer to be added.  However, in this way, the operational layer is not added or displayed.  What's wrong I did here?  Thanks if you can point out.