Georgie.Cassar

ImageParameter - Can't display SubLayer from Exclusive Parent group

Discussion created by Georgie.Cassar on Feb 14, 2011
Latest reply on Feb 15, 2011 by hzhu
I have a group of raster layers that are set under a group layer.  The group layer is set to "EXCLUSIVE=TRUE" so that only one raster sublayer can display at any one time.
Id's are :
Parent layer 93
Sub layers 94, 95, 96 and 97     (94 is on by default in the map service)

I want to switch the display to layer 97.

I try to do this with the following code:

imageParameters.layerIds = [29, 97];
imageParameters.layerOption = esri.layers.ImageParameters.LAYER_OPTION_INCLUDE;
var myMapLayer = new esri.layers.ArcGISDynamicMapServiceLayer "http://gsportenf/ArcGIS/rest/services/General_30/MapServer", {"imageParameters":imageParameters});
map.addLayer(myMapLayer);


After running the code above, it still displays layer 94 instead of 97.  Do I need to somehow disable the display of the parent layer or sublayer 94 before I can display layer 93 ?

ps: I tried excluding all the unwanted layers first with
imageParameters.layerIds = [93, 94, 95, 96];
imageParameters.layerOption = esri.layers.ImageParameters.LAYER_OPTION_EXCLUDE
(Made no difference.)

Hoping someone can help.

Outcomes