AnsweredAssumed Answered

layerDefinitions property for identifyParams

Question asked by gbilotta on Feb 28, 2014
Latest reply on Mar 4, 2014 by JGravois-esristaff
I have seen some old posts regarding the layerDefinitions property for the identifyParams object and how it was not working in the javascript api or is not available, but it is there in the current documentation.  I am trying to use it now with the 3.8 api and arcgis server 10.2.1 with no luck.  Is this property still not working?  Has anyone else been able to get it to work?  I can do an identify task without a problem until I try to set this property of the identifyParams object.  As soon as I try to set this property, I get an error.  I am using it like this identifyParams.layerDefinitions[17]="user='test'".  If I just use the identifyParams and identifTask without that line like this, everything works fine.:

identifyTask = new IdentifyTask("http://" + domain + "/ArcGIS/rest/services/" + ServiceName + "/MapServer");
identifyParams = new IdentifyParameters();
identifyParams.tolerance = 5;
identifyParams.returnGeometry = true;
identifyParams.layerIds = visibleLayers;                   
identifyParams.layerOption = IdentifyParameters.LAYER_OPTION_VISIBLE;

Using fiddler, I get an error "Unable to set property of undefined or null reference". 

Thank you for any help.