Hello All, I'm working with the flex sample code (non sample viewer) found in the resource center, specifically with the "Identify" and "Dynamic Map Layers on/off" components. In my identify function, I've added an identify parameter "identifyParams.layerIds = [0]" to only run the identify on the specified layer in my map service (in the example below, the specified layer is the layer with a layer ID of 0):
var identifyParams:IdentifyParameters = new IdentifyParameters();
identifyParams.returnGeometry = true;
identifyParams.tolerance = 3;
identifyParams.width = myMap.width;
identifyParams.height = myMap.height;
identifyParams.geometry = event.mapPoint;
identifyParams.mapExtent = myMap.extent;
identifyParams.spatialReference = myMap.spatialReference;
identifyParams.layerOption = IdentifyParameters.LAYER_OPTION_ALL;
identifyParams.layerIds = [0];
In the LayerTOC.mxml, I'd like to create an itemClick function in the DataGrid that does the following:1) Create a new array variable2) populates the array with the Layer ID of the selected layer in the TOCI'd like to then bind the new array variable to my main.mxml and set it as the array for my identifyParams.layerIds array. Basically, I want to be able to set the layer I'd like to do the identify on by selecting it in the TOC. The concept seems pretty straightforward, but I can't seem to create and bind my array without creating several errors.Any help is appreciated.Thanks,Jason