/*
 COPYRIGHT 2009 ESRI

 TRADE SECRETS: ESRI PROPRIETARY AND CONFIDENTIAL
 Unpublished material - all rights reserved under the
 Copyright Laws of the United States and applicable international
 laws, treaties, and conventions.

 For additional information, contact:
 Environmental Systems Research Institute, Inc.
 Attn: Contracts and Legal Services Department
 380 New York Street
 Redlands, California, 92373
 USA

 email: contracts@esri.com
 */

window[esri._dojoScopeName||"dojo"]._xdResourceLoaded(function(_1,_2,_3){return {depends:[["provide","esri.tasks.identify"],["require","esri.tasks._task"]],defineResource:function(_4,_5,_6){if(!_4._hasResource["esri.tasks.identify"]){_4._hasResource["esri.tasks.identify"]=true;_4.provide("esri.tasks.identify");_4.require("esri.tasks._task");_4.declare("esri.tasks.IdentifyTask",esri.tasks._Task,{constructor:function(_7,_8){this._url.path+="/identify";this._handler=_4.hitch(this,this._handler);this.gdbVersion=_8&&_8.gdbVersion;},__msigns:[{n:"execute",c:3,a:[{i:0,p:["geometry"]}],e:2}],_handler:function(_9,io,_a,_b,_c){try{var _d=[],_e=esri.tasks.IdentifyResult;_4.forEach(_9.results,function(_f,i){_d[i]=new _e(_f);});this._successHandler([_d],"onComplete",_a,_c);}catch(err){this._errorHandler(err,_b,_c);}},execute:function(_10,_11,_12,_13){var _14=_13.assembly,_15=this._encode(_4.mixin({},this._url.query,{f:"json"},_10.toJson(_14&&_14[0]))),_16=this._handler,_17=this._errorHandler;if(this.gdbVersion){_15.gdbVersion=this.gdbVersion;}return esri.request({url:this._url.path,content:_15,callbackParamName:"callback",load:function(r,i){_16(r,i,_11,_12,_13.dfd);},error:function(r){_17(r,_12,_13.dfd);}});},onComplete:function(){}});esri._createWrappers("esri.tasks.IdentifyTask");_4.declare("esri.tasks.IdentifyParameters",null,{constructor:function(){this.layerOption=esri.tasks.IdentifyParameters.LAYER_OPTION_TOP;},geometry:null,spatialReference:null,layerIds:null,tolerance:null,returnGeometry:false,mapExtent:null,width:esri.config.defaults.map.width,height:esri.config.defaults.map.height,dpi:96,layerDefinitions:null,timeExtent:null,layerTimeOptions:null,dynamicLayerInfos:null,toJson:function(_18){var g=_18&&_18["geometry"]||this.geometry,ext=this.mapExtent,sr=this.spatialReference,_19=this.layerIds,_1a={geometry:g,tolerance:this.tolerance,returnGeometry:this.returnGeometry,mapExtent:ext,imageDisplay:this.width+","+this.height+","+this.dpi,maxAllowableOffset:this.maxAllowableOffset};if(g){_1a.geometryType=esri.geometry.getJsonType(g);}if(sr!==null){_1a.sr=sr.wkid||_4.toJson(sr.toJson());}else{if(g){_1a.sr=g.spatialReference.wkid||_4.toJson(g.spatialReference.toJson());}else{if(ext){_1a.sr=ext.spatialReference.wkid||_4.toJson(ext.spatialReference.toJson());}}}_1a.layers=this.layerOption;if(_19){_1a.layers+=":"+_19.join(",");}_1a.layerDefs=esri._serializeLayerDefinitions(this.layerDefinitions);var _1b=this.timeExtent;_1a.time=_1b?_1b.toJson().join(","):null;_1a.layerTimeOptions=esri._serializeTimeOptions(this.layerTimeOptions);if(this.dynamicLayerInfos&&this.dynamicLayerInfos.length>0){var _1c,_1d={extent:ext,width:this.width,spatialReference:ext.spatialReference},_1e=esri.geometry.getScale(_1d),_1f=esri._getLayersForScale(_1e,this.dynamicLayerInfos),_20=[];_4.forEach(this.dynamicLayerInfos,function(_21){if(!_21.subLayerIds){var _22=_21.id;if((!this.layerIds||(this.layerIds&&_4.indexOf(this.layerIds,_22)!==-1))&&_4.indexOf(_1f,_22)!==-1){var _23={id:_22};_23.source=_21.source&&_21.source.toJson();var _24;if(this.layerDefinitions&&this.layerDefinitions[_22]){_24=this.layerDefinitions[_22];}if(_24){_23.definitionExpression=_24;}var _25;if(this.layerTimeOptions&&this.layerTimeOptions[_22]){_25=this.layerTimeOptions[_22];}if(_25){_23.layerTimeOptions=_25.toJson();}_20.push(_23);}}},this);_1c=_4.toJson(_20);if(_1c==="[]"){_1c="[{}]";}_1a.dynamicLayers=_1c;}return _1a;}});_4.mixin(esri.tasks.IdentifyParameters,{LAYER_OPTION_TOP:"top",LAYER_OPTION_VISIBLE:"visible",LAYER_OPTION_ALL:"all"});_4.declare("esri.tasks.IdentifyResult",null,{constructor:function(_26){_4.mixin(this,_26);this.feature=new esri.Graphic(_26.geometry?esri.geometry.fromJson(_26.geometry):null,null,_26.attributes);delete this.geometry;delete this.attributes;}});}}};});