I am using the FEMA flood base map service located at
This base map service has many layers. I am interested in layers 3,27 and 28.
I tried limiting the layers using the following code
var imageParameters = new ImageParameters();
imageParameters.layerIds = [3,27,28];
imageParameters.layerOption = ImageParameters.LAYER_OPTION_SHOW;
imageParameters.transparent = false;
var dynamicMapServiceLayer = new EsriArcGISDynamicMapServiceLayer(oneLayer.url,{"ImageParameters": imageParameters});
map.addLayer(dynamicMapServiceLayer);
The request goes out to FEMA as below.
The correct request should be as below requesting only the layers needed
Do I need to modify add something to my code snippet in order to request the only the layers that I need/
Any help is appreciated.
Thanks
Neema
You have the syntax wrong when you construct the dynamic layer. You're using "ImageParameters" when you have to use "imageParameters". Instead of
var dynamicMapServiceLayer = new EsriArcGISDynamicMapServiceLayer(oneLayer.url,{"ImageParameters": imageParameters});
you have to use this
var dynamicMapServiceLayer = new EsriArcGISDynamicMapServiceLayer(oneLayer.url,{"imageParameters": imageParameters});