
(function(){var _1=function(){var _2=function(){var _3=4326;var _4=102113;var _5="{*}";var _6="kmz";var _7="json";var _8=256;var _9=256;var _a=0;var _b=19;var _c=[156543.039989205,78271.5200078317,39135.7599906866,19567.880000635,9783.9400003175,4891.96999883583,2445.98499994708,1222.99250010583,611.496250052917,305.748124894166,152.8740625,76.4370312632292,38.2185156316146,19.1092578131615,9.55462890525781,4.77731445262891,2.38865722657904,1.19432861315723,0.597164306578613,0.298582153289307];var _d=window.GBrowserIsCompatible?true:false;var _e=!_d;var _f={polylineStrokeColor:"#ff0000",polylineStrokeWeight:5,polylineStrokeOpacity:0.75,polygonFillColor:"#0000ff",polygonFillOpacity:0.3,polygonStrokeColor:"#0000ff",polygonStrokeWeight:2,polygonStrokeOpacity:0.75,geometryServiceUrl:null,proxyUrl:null,alwaysUseProxy:false};var _10=function(_11,_12,_13,_14){if(_11&&_12){var arg=[_11,_12];arg=arg.concat(_14);GEvent.trigger.apply(null,arg);}if(_13){_13.apply(null,_14);}};var _16=function(_17){var j;if(_17&&/^[\],:{}\s]*$/.test(_17.replace(/\\./g,"@").replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(:?[eE][+\-]?\d+)?/g,"]").replace(/(?:^|:|,)(?:\s*\[)+/g,""))){j=eval("("+_17+")");return j;}throw new Error("Error: Invalid JSON");};var _19=function(_1a){if(_1a){if(_1a instanceof Array||(typeof _1a.length==="number"&&!_1a.propertyIsEnumerable("length")&&typeof _1a.splice==="function")){return true;}}return false;};var _1b=function(_1c){return(typeof _1c==="function"||_1c instanceof Function);};var _1d=function(_1e){if(typeof _1e==="undefined"){return false;}return(_1e===null||typeof _1e==="object"||_19(_1e)||_1b(_1e));};var _1f=function(_20){if(_20===undefined||_20===null||_20===""){return false;}else{return true;}};var _21=function(_22){return(typeof _22==="string"||_22 instanceof String);};var _23=function(arr,_25){if(arr&&arr.length){for(var i=0,il=arr.length;i<il;i++){if(arr[i]===_25){return i;}}}return-1;};var _28=function(url){var ret={};var idx=url.indexOf("?");if(idx===-1){ret.path=url;ret.query={};}else{ret.path=url.substring(0,idx);var q=(ret.query={});var str=url.substring(idx+1);var qp=str.split("&");var dec=decodeURIComponent;for(var i=0,il=qp.length;i<il;i++){var it=qp[i];if(it.length){var _33=it.split("=");var _34=dec(_33.shift());var val=dec(_33.join("="));if(_1f(q[_34])){q[_34]=[q[_34]];}if(_19(q[_34])){q[_34].push(val);}else{q[_34]=val;}}}}return ret;};var _36=function(url,_38){var tok=_38.token;if(_1f(tok)){url+=("?token="+encodeURIComponent(tok));}return url;};var _3a=function(_3b){var _3c=0;var _3d=_3b.length;var p1,p2;for(var i=0;i<_3d;i++){p1=_3b[i];p2=_3b[(i+1)%_3d];_3c+=((p1[0]*p2[1])-(p2[0]*p1[1]));}if((_3c/2)>0){return _3b.reverse();}return _3b;};var _41=function(obj){if(obj){for(var x in obj){if(obj.hasOwnProperty(x)){return true;}}}return false;};var _44=function(obj){var _46;if(!obj){return obj;}if(_19(obj)){_46=[];for(var i=0,il=obj.length;i<il;i++){_46.push(_44(obj[i]));}return _46;}else{if(_1d(obj)){_46=new obj.constructor();for(var x in obj){if(!(x in _46)||_46[x]!==obj[x]){_46[x]=_44(obj[x]);}}return _46;}}return obj;};var _4a=function(_4b,_4c){var _4d="";if(_4b===_5){for(var x in _4c){if(_4c.hasOwnProperty(x)){_4d+=("<b>"+x+": </b>"+_4c[x]+"<br/>");}}}else{_4d=_4b.replace(/\{([^\s\:\}]+)\}/g,function(_4f,key){var _51=_4c[key];if(_51===undefined||_51===null){_51=_4f;}return _51;});}return _4d;};var _52=function(_53){var _54={gmapsType:null,esriType:null};var gm=null,es=null;if(_53 instanceof GLatLng){gm="GLatLng";es="esriGeometryPoint";}else{if(_53 instanceof GMarker){gm="GMarker";es="esriGeometryPoint";}else{if(_53 instanceof GLatLngBounds){gm="GLatLngBounds";es="esriGeometryEnvelope";}else{if(_53 instanceof GPolyline){gm="GPolyline";es="esriGeometryPolyline";}else{if(_53 instanceof GPolygon){gm="GPolygon";es="esriGeometryPolygon";}else{if(_19(_53)){_54=_52(_53[0]);if(_54.gmapsType){_54.gmapsType+="[]";if(_54.esriType==="esriGeometryPoint"){_54.esriType="esriGeometryMultipoint";}}return _54;}}}}}}_54.gmapsType=gm;_54.esriType=es;return _54;};var _57=function(){var _58=6378137;var _PI=Math.PI;var _5a=57.29577951308232;var _5b=0.017453292519943;var _5c=function(rad){return rad*_5a;};var _5e=function(deg){return deg*_5b;};return{xToLng:function(x){var _61=x/_58;var _62=_5c(_61);var _63=Math.floor((_62+180)/360);var lng=_62-(_63*360);return lng;},yToLat:function(y){var _66=(_PI/2)-(2*Math.atan(Math.exp(-1*y/_58)));var _67=_5c(_66);return _67;},lngToX:function(lng){return _5e(lng)*_58;},latToY:function(lat){var _6a=_5e(lat);var y=_58/2*Math.log((1+Math.sin(_6a))/(1-Math.sin(_6a)));return y;}};}();var _6c=function(_6d){return"{"+"x:"+_6d.lng()+",y:"+_6d.lat()+",spatialReference:{wkid:"+_3+"}"+"}";};var _6e=function(_6f){var loc;var _71=[];for(var i=0,_73=_6f.length;i<_73;i++){loc=_6f[i];_71.push("["+loc.lng()+","+loc.lat()+"]");}return"{points:["+_71.join(",")+"],spatialReference:{wkid:"+_3+"}}";};var _74=function(_75){return _6c(_75.getLatLng());};var _76=function(_77){var loc,_79=[];for(var i=0,_7b=_77.length;i<_7b;i++){loc=_77[i].getLatLng();_79.push("["+loc.lng()+","+loc.lat()+"]");}return"{points:["+_79.join(",")+"],spatialReference:{wkid:"+_3+"}}";};var _7c=function(_7d){var sw=_7d.getSouthWest();var ne=_7d.getNorthEast();return"{"+"xmin:"+sw.lng()+",ymin:"+sw.lat()+",xmax:"+ne.lng()+",ymax:"+ne.lat()+",spatialReference:{wkid:"+_3+"}"+"}";};var _80={};var _81,_82;if(_e){_80.getLatLngsAsync=function(_83,_84){var in1=[];for(var i=0,il=_83.length;i<il;i++){in1.push(_83[i]);in1.push("getPoint");}in1.push(function(){var _88=[];for(var j=0,jl=arguments.length;j<jl;j++){_88.push(arguments[j]);}_84(_88);});GAsync.apply(null,in1);};_80._markerToJsonTextAsync=function(_8b,_8c){_80.getLatLngsAsync([_8b],function(_8d){_8c(_6c(_8d[0]));});};_80._markersToJsonTextAsync=function(_8e,_8f){_80.getLatLngsAsync(_8e,function(_90){var loc,_92=[];for(var i=0,_94=_90.length;i<_94;i++){loc=_90[i];_92.push("["+loc.lng()+","+loc.lat()+"]");}_8f("{points:["+_92.join(",")+"],spatialReference:{wkid:"+_3+"}}");});};_80._getVerticesAsync=function(_95,_96){var in1=[];for(var i=0,il=_95.length;i<il;i++){in1.push(_95[i]);in1.push("getVertexCount");}in1.push(function(){var in2=[],_9b=[],_9c,j,k,jl;for(j=0,jl=arguments.length;j<jl;j++){_9c=arguments[j];_9b.push(_9c);for(k=0;k<_9c;k++){in2.push(_95[j]);in2.push("getVertex");in2.push([k]);}}in2.push(function(){var _a0=[],_a1=null;var _a2=0,cnt,x,y,xl;for(x=0,xl=_9b.length;x<xl;x++){cnt=_9b[x];_a1=[];for(y=_a2;y<_a2+cnt;y++){_a1.push(arguments[y]);}_a0.push(_a1);_a2+=cnt;}_96(_a0);});GAsync.apply(null,in2);});GAsync.apply(null,in1);};_80._polylinesToJsonTextAsync=function(_a7,_a8){_80._getVerticesAsync(_a7,function(_a9){var _aa,vtx,_ac,_ad=[];for(var i=0,il=_a9.length;i<il;i++){_ac=_a9[i];_aa=[];for(var j=0,jl=_ac.length;j<jl;j++){vtx=_ac[j];_aa.push("["+vtx.lng()+","+vtx.lat()+"]");}_ad.push("["+_aa.join(",")+"]");}_a8("{paths:["+_ad.join(",")+"],spatialReference:{wkid:"+_3+"}}");});};_80._polygonsToJsonTextAsync=function(_b2,_b3){_80._getVerticesAsync(_b2,function(_b4){var _b5,vtx,_b7,_b8=[];for(var i=0,il=_b4.length;i<il;i++){_b7=_b4[i];_b5=[];for(var j=0,jl=_b7.length;j<jl;j++){vtx=_b7[j];_b5.push("["+vtx.lng()+","+vtx.lat()+"]");}_b8.push("["+_b5.join(",")+"]");}_b3("{rings:["+_b8.join(",")+"],spatialReference:{wkid:"+_3+"}}");});};}else{_81=function(_bd){var vtx;var _bf,_c0;var _c1=[];for(var i=0,_c3=_bd.length;i<_c3;i++){_c0=_bd[i];_bf=[];for(var j=0,_c5=_c0.getVertexCount();j<_c5;j++){vtx=_c0.getVertex(j);_bf.push("["+vtx.lng()+","+vtx.lat()+"]");}_c1.push("["+_bf.join(",")+"]");}return"{paths:["+_c1.join(",")+"],spatialReference:{wkid:"+_3+"}}";};_82=function(_c6){var vtx;var _c8,_c9;var _ca=[];for(var i=0,_cc=_c6.length;i<_cc;i++){_c9=_c6[i];_c8=[];for(var j=0,_ce=_c9.getVertexCount();j<_ce;j++){vtx=_c9.getVertex(j);_c8.push("["+vtx.lng()+","+vtx.lat()+"]");}_ca.push("["+_c8.join(",")+"]");}return"{rings:["+_ca.join(",")+"],spatialReference:{wkid:"+_3+"}}";};}var _cf=function(_d0,_d1,_d2){var _d3="";switch(_d1){case"GLatLng":_d3=_6c(_d0);break;case"GLatLng[]":_d3=_6e(_d0);break;case"GMarker":if(_d2){_80._markerToJsonTextAsync(_d0,_d2);return;}else{_d3=_74(_d0);}break;case"GMarker[]":if(_d2){_80._markersToJsonTextAsync(_d0,_d2);return;}else{_d3=_76(_d0);}break;case"GLatLngBounds":_d3=_7c(_d0);break;case"GPolyline":if(_d2){_80._polylinesToJsonTextAsync([_d0],_d2);return;}else{_d3=_81([_d0]);}break;case"GPolyline[]":if(_d2){_80._polylinesToJsonTextAsync(_d0,_d2);return;}else{_d3=_81(_d0);}break;case"GPolygon":if(_d2){_80._polygonsToJsonTextAsync([_d0],_d2);return;}else{_d3=_82([_d0]);}break;case"GPolygon[]":if(_d2){_80._polygonsToJsonTextAsync(_d0,_d2);return;}else{_d3=_82(_d0);}break;default:throw new Error("_geometryToJsonText(): unsupported geometry type - supported types are GLatLng, GLatLng[], GMarker, GMarker[], GLatLngBounds, GPolyline, GPolyline[], GPolygon, GPolygon[]");}if(_d2){_d2(_d3);}else{return _d3;}};var _d4;var _d5=function(arr){var _d7=[];var val,enc=encodeURIComponent;if(arr._AG_){var _da=arr._PT_?arr[0]:arr;return _cf(_da,_52(_da).gmapsType);}for(var x=0,xl=arr.length;x<xl;x++){val=arr[x];if(_1f(val)&&typeof val!=="function"){if(_19(val)){val._AG_=arr._AAG_;_d7.push(_d5(val));}else{if(typeof val==="object"){val._AG_=arr._AAG_;_d7.push(_d4(val));}else{_d7.push(enc(_21(val)?("\""+val+"\""):val));}}}}return"["+_d7.join(",")+"]";};var _dd;_d4=function(obj){var _df=[];var val,enc=encodeURIComponent;if(obj._AG_){return _cf(obj,_52(obj).gmapsType);}else{if(obj instanceof _dd){var _e2=obj.features,_e3=obj.geometryType||"",_e4;if(_19(_e2)){_e4=_e2[0];if(_e4&&_e4.geometry){_e4.geometry._AG_=true;if(_e3==="esriGeometryPoint"){_e4.geometry._PT_=true;}}}}}for(var x in obj){if(obj.hasOwnProperty(x)){val=obj[x];if(_1f(val)&&typeof val!=="function"){if(_19(val)){_df.push(x+":"+_d5(val));}else{if(typeof val==="object"){_df.push(x+":"+_d4(val));}else{_df.push(x+":"+enc(_21(val)?("\""+val+"\""):val));}}}}}return"{"+_df.join(",")+"}";};var _e6=function(_e7){var _e8=[];var val,enc=encodeURIComponent;for(var x in _e7){if(_e7.hasOwnProperty(x)){val=_e7[x];if(_1f(val)&&typeof val!=="function"){if(_19(val)){if(_1f(val[0])&&typeof val[0]!=="function"&&typeof val[0]==="object"){_e8.push(x+"="+_d5(val));}else{_e8.push(x+"="+enc(val.join(",")));}}else{if(typeof val==="object"){_e8.push(x+"="+_d4(val));}else{_e8.push(x+"="+enc(val));}}}}}return _e8.join("&");};if(_e){_80._arrayToJsonTextAsync=function(arr,_ed){var _ee=[];var _ef=[];var val,enc=encodeURIComponent;if(arr._AG_){var _f2=arr._PT_?arr[0]:arr;_cf(_f2,_52(_f2).gmapsType,_ed);return;}for(var x=0,xl=arr.length;x<xl;x++){val=arr[x];if(_1f(val)&&typeof val!=="function"){if(_19(val)){val._AG_=arr._AAG_;_ef.push(_80);_ef.push("_arrayToJsonText");_ef.push([val]);}else{if(typeof val==="object"){val._AG_=arr._AAG_;_ef.push(_80);_ef.push("_objectToJsonText");_ef.push([val]);}else{_ee.push(enc(_21(val)?("\""+val+"\""):val));}}}}if(_ef.length>0){_ef.push(function(){for(var i=0,il=arguments.length;i<il;i++){_ee.push(arguments[i]);}_ed("["+_ee.join(",")+"]");});GAsync.apply(null,_ef);}else{_ed("["+_ee.join(",")+"]");}};_80._objectToJsonTextAsync=function(obj,_f8){var _f9=[];var _fa=[],_fb=[];var val,enc=encodeURIComponent;if(obj._AG_){_cf(obj,_52(obj).gmapsType,_f8);return;}else{if(obj instanceof _dd){var _fe=obj.features,_ff=obj.geometryType||"",_100;if(_19(_fe)){_100=_fe[0];if(_100&&_100.geometry){_100.geometry._AG_=true;if(_ff==="esriGeometryPoint"){_100.geometry._PT_=true;}}}}}for(var x in obj){if(obj.hasOwnProperty(x)){val=obj[x];if(_1f(val)&&typeof val!=="function"){if(_19(val)){_fa.push(_80);_fa.push("_arrayToJsonText");_fa.push([val]);_fb.push(x);}else{if(typeof val==="object"){_fa.push(_80);_fa.push("_objectToJsonText");_fa.push([val]);_fb.push(x);}else{_f9.push(x+":"+enc(_21(val)?("\""+val+"\""):val));}}}}}if(_fa.length>0){_fa.push(function(){for(var i=0,il=_fb.length;i<il;i++){_f9.push(_fb[i]+":"+arguments[i]);}_f8("{"+_f9.join(",")+"}");});GAsync.apply(null,_fa);}else{_f8("{"+_f9.join(",")+"}");}};_80._parametersToJsonTextAsync=function(_104,_105){var _106=[];var args=[],_108=[];var val,enc=encodeURIComponent;for(var x in _104){if(_104.hasOwnProperty(x)){val=_104[x];if(_1f(val)&&typeof val!=="function"){if(_19(val)){if(_1f(val[0])&&typeof val[0]!=="function"&&typeof val[0]==="object"){args.push(_80);args.push("_arrayToJsonText");args.push([val]);_108.push(x);}else{_106.push(x+"="+enc(val.join(",")));}}else{if(typeof val==="object"){args.push(_80);args.push("_objectToJsonText");args.push([val]);_108.push(x);}else{_106.push(x+"="+enc(val));}}}}}if(args.length>0){args.push(function(){for(var i=0,il=_108.length;i<il;i++){_106.push(_108[i]+"="+arguments[i]);}_105(_106.join("&"));});GAsync.apply(null,args);}else{_105(_106.join("&"));}};}var _10e=function(json){return new GMarker(new GLatLng(json.y,json.x));};var _110=function(json){return[new GMarker(new GLatLng(json.y,json.x))];};var _112=function(json){var _114=json.points;var pt;var _116=[];for(var i=0,npts=_114.length;i<npts;i++){pt=_114[i];_116[i]=new GMarker(new GLatLng(pt[1],pt[0]));}return _116;};var _119=function(json){var sw=new GLatLng(json.ymin,json.xmin);var nw=new GLatLng(json.ymax,json.xmin);var ne=new GLatLng(json.ymax,json.xmax);var se=new GLatLng(json.ymin,json.xmax);var poly=new GPolygon([sw,nw,ne,se],_f.polygonStrokeColor,_f.polygonStrokeWeight,_f.polygonStrokeOpacity,_f.polygonFillColor,_f.polygonFillOpacity);return[poly];};var _120=function(json,_122){var xmin=json.xmin,ymin=json.ymin;var xmax=json.xmax,ymax=json.ymax;var _127=_57.xToLng;var _128=_57.yToLat;if(_122){xmin=_127(xmin);ymin=_128(ymin);xmax=_127(xmax);ymax=_128(ymax);}var sw=new GLatLng(ymin,xmin);var ne=new GLatLng(ymax,xmax);var _12b=new GLatLngBounds(sw,ne);return _12b;};var _12c=function(json){var _12e=json.paths;var _12f,_130,_131,pt;_131=[];for(var i=0,nseg=_12e.length;i<nseg;i++){_12f=_12e[i];_130=[];for(var j=0,npts=_12f.length;j<npts;j++){pt=_12f[j];_130[j]=new GLatLng(pt[1],pt[0]);}_131[i]=new GPolyline(_130,_f.polylineStrokeColor,_f.polylineStrokeWeight,_f.polylineStrokeOpacity);}return _131;};var _137=function(json){var _139=json.rings;var _13a,_13b,_13c,pt;_13c=[];for(var i=0,nseg=_139.length;i<nseg;i++){_13a=_139[i];_13b=[];for(var j=0,npts=_13a.length;j<npts;j++){pt=_13a[j];_13b[j]=new GLatLng(pt[1],pt[0]);}_13c[i]=new GPolygon(_13b,_f.polygonStrokeColor,_f.polygonStrokeWeight,_f.polygonStrokeOpacity,_f.polygonFillColor,_f.polygonFillOpacity);}return _13c;};var _142=function(_143,html,_145,_146,map){if(_146&&html){if(_143.openInfoWindow){if(_19(html)){GEvent.addListener(_143,"click",function(){_143.openInfoWindowTabsHtml(html,_145);});}else{GEvent.addListener(_143,"click",function(){_143.openInfoWindowHtml(html,_145);});}}else{if(_19(html)){GEvent.addListener(_143,"click",function(_148){map.openInfoWindowTabsHtml(_148,html,_145);});}else{GEvent.addListener(_143,"click",function(_149){map.openInfoWindowHtml(_149,html,_145);});}}}map.addOverlay(_143);};var _14a=function(_14b,type){var line=(type==="GPolyline[]")?true:false;var _14e={stc:(_14b&&_14b.strokeColor!==undefined)?_14b.strokeColor:(line)?_f.polylineStrokeColor:_f.polygonStrokeColor,stw:(_14b&&_14b.strokeWeight!==undefined)?_14b.strokeWeight:(line)?_f.polylineStrokeWeight:_f.polygonStrokeWeight,sto:(_14b&&_14b.strokeOpacity!==undefined)?_14b.strokeOpacity:(line)?_f.polylineStrokeOpacity:_f.polygonStrokeOpacity,fic:(_14b&&_14b.fillColor!==undefined)?_14b.fillColor:_f.polygonFillColor,fio:(_14b&&_14b.fillOpacity!==undefined)?_14b.fillOpacity:_f.polygonFillOpacity};return _14e;};var _14f,_150,_151;if(_e){_80._createAddMarkersAsync=function(_152,_153,_154,_155,map,_157){var args=[];for(var i=0,il=_152.length;i<il;i++){args.push(_152[i]);args.push("getPoint");}args.push(function(){var _15b=[],mark,opts,_15e=_155.attr,iw=_155.meta.flags.clickable,html=_155.html;for(var j=0,jl=arguments.length;j<jl;j++){opts=_44(_153.markerOptions);if(opts&&opts.title){opts.title=_4a(opts.title,_15e);}mark=new GMarker(arguments[j],opts);_142(mark,html,_154,iw,map);_15b.push(mark);}_157(_15b);});GAsync.apply(null,args);};_80._createAddPolylinesAsync=function(_163,_164,_165,_166,map,_168){_80._getVerticesAsync(_163,function(_169){var _16a=[],poly,i,il,_16e=_166.meta.style,iw=_166.meta.flags.clickable,html=_166.html;var opts=_164.polylineOptions;for(i=0,il=_169.length;i<il;i++){poly=new GPolyline(_169[i],_16e.stc,_16e.stw,_16e.sto,opts);_142(poly,html,_165,iw,map);_16a.push(poly);}_168(_16a);});};_80._createAddPolygonsAsync=function(_172,_173,_174,_175,map,_177){_80._getVerticesAsync(_172,function(_178){var _179=[],poly,i,il,_17d=_175.meta.style,iw=_175.meta.flags.clickable,html=_175.html;var opts=_173.polylineOptions;for(i=0,il=_178.length;i<il;i++){poly=new GPolygon(_178[i],_17d.stc,_17d.stw,_17d.sto,_17d.fic,_17d.fio,opts);_142(poly,html,_174,iw,map);_179.push(poly);}_177(_179);});};}else{_14f=function(_181,_182,_183,_184,map){var _186=[],mark,opts,i,il,_18b=_184.attr,iw=_184.meta.flags.clickable,html=_184.html;for(i=0,il=_181.length;i<il;i++){opts=_44(_182.markerOptions);if(opts&&opts.title){opts.title=_4a(opts.title,_18b);}mark=new GMarker(_181[i].getLatLng(),opts);_142(mark,html,_183,iw,map);_186.push(mark);}return _186;};_150=function(_18e,_18f,_190,_191,map){var _193=[],_194,poly,opts,_197,i,il,j,jl,_19c=_191.meta.style,iw=_191.meta.flags.clickable,html=_191.html;opts=_18f.polylineOptions;for(i=0,il=_18e.length;i<il;i++){_194=_18e[i];_197=[];for(j=0,jl=_194.getVertexCount();j<jl;j++){_197.push(_194.getVertex(j));}poly=new GPolyline(_197,_19c.stc,_19c.stw,_19c.sto,opts);_142(poly,html,_190,iw,map);_193.push(poly);}return _193;};_151=function(_19f,_1a0,_1a1,_1a2,map){var _1a4=[],_1a5,poly,opts,_1a8,i,il,j,jl,_1ad=_1a2.meta.style,iw=_1a2.meta.flags.clickable,html=_1a2.html;opts=_1a0.polygonOptions;for(i=0,il=_19f.length;i<il;i++){_1a5=_19f[i];_1a8=[];for(j=0,jl=_1a5.getVertexCount();j<jl;j++){_1a8.push(_1a5.getVertex(j));}poly=new GPolygon(_1a8,_1ad.stc,_1ad.stw,_1ad.sto,_1ad.fic,_1ad.fio,opts);_142(poly,html,_1a1,iw,map);_1a4.push(poly);}return _1a4;};}var _1b0=function(_1b1,_1b2){if(_19(_1b1)){var tab,_1b4,_1b5;var tabs=[];for(var i=0,ilen=_1b1.length;i<ilen;i++){tab=_1b1[i];_1b4=_4a(tab.label,_1b2);_1b5=_4a(tab.content,_1b2);tabs[i]=new GInfoWindowTab(_1b4,_1b5);}return tabs;}else{return _4a(_1b1,_1b2);}};var _1b9=function(_1ba,_1bb,_1bc,meta,map,_1bf){var geom=_1ba.geometry;var attr=_1ba.attributes;var type=meta.type;var _1c3=meta.flags;var iwc,_1c5;if(_1bc){iwc=_1bc.content;_1c5=_1bc.contentTabs;}var _1c6={attr:attr,html:_1b0((iwc||_1c5||_5),attr),meta:meta};var ovs,_1c8=false;switch(type){case"GMarker[]":if(_1c3.marker){if(_1bf){_80._createAddMarkersAsync(geom,_1bb,_1bc,_1c6,map,_1bf);return;}else{ovs=_14f(geom,_1bb,_1bc,_1c6,map);}}else{ovs=geom;_1c8=true;}break;case"GPolyline[]":if(_1c3.newpolyline){if(_1bf){_80._createAddPolylinesAsync(geom,_1bb,_1bc,_1c6,map,_1bf);return;}else{ovs=_150(geom,_1bb,_1bc,_1c6,map);}}else{_1c8=true;ovs=geom;}break;case"GPolygon[]":if(_1c3.newpolygon){if(_1bf){_80._createAddPolygonsAsync(geom,_1bb,_1bc,_1c6,map,_1bf);return;}else{ovs=_151(geom,_1bb,_1bc,_1c6,map);}}else{_1c8=true;ovs=geom;}break;}if(_1c8){for(var i=0,il=ovs.length;i<il;i++){_142(ovs[i],_1c6.html,_1bc,_1c3.clickable,map);}}if(_1bf){_1bf(ovs);}else{return ovs;}};_80._addCustomOverlaysAsync=_1b9;var _1cb=function(_1cc,type){var _1ce,_1cf,_1d0,_1d1,_1d2;_1ce=_1cf=_1d0=_1d1=_1d2=false;var _1d3=true;if(_1cc){var fco=_1cc.fillColor;var fop=_1cc.fillOpacity;var sco=_1cc.strokeColor;var swt=_1cc.strokeWeight;var sop=_1cc.strokeOpacity;var mop=_1cc.markerOptions;var plop=_1cc.polylineOptions;var pgop=_1cc.polygonOptions;_1ce=(fco||fop)?true:false;_1cf=(sco||swt||sop)?true:false;_1d0=(mop&&_41(mop))?true:false;_1d1=(plop&&_41(plop))?true:false;_1d2=(pgop&&_41(pgop))?true:false;if(_1d0&&_1f(mop.clickable)){_1d3=mop.clickable;}if(_1d1&&_1f(plop.clickable)){_1d3=plop.clickable;}if(_1d2&&_1f(pgop.clickable)){_1d3=pgop.clickable;}}var _1dc={fill:_1ce,stroke:_1cf,marker:_1d0,polyline:_1d1,polygon:_1d2,clickable:(_e&&(type==="GPolyline[]"||type==="GPolygon[]"))?false:_1d3,newpolyline:_1cf||_1d1,newpolygon:_1cf||_1ce||_1d2};return _1dc;};var _1dd=function(){var purl=_f.proxyUrl;if(!purl){throw new Error("Error: esri.arcgis.gmaps.Config.proxyUrl is not set. A web proxy page is required to make cross-domain XMLHttpRequest calls");}return _28(purl);};var _1df=function(url){if(_f.alwaysUseProxy){var uo=_1dd();var _url=_28(url);var p1=_e6(uo.query);var p2=_e6(_url.query);p1=p1&&("?"+p1);p2=p2&&(((p1&&"&")||("?"))+p2);url=uo.path+"?"+_url.path+p1+p2;}return url;};var _1e5=function(){var _1e6=[];var _1e7="ArcGISJsonScript_";var _1e8="ArcGISJson_";var _1e9="ArcGISKmz_";var _1ea=2000;var _1eb=function(id){delete _1e6[id];};var _1ed=function(url,_1ef){this.url=url;this.handler=_1ef;var nat=window.XMLHttpRequest;var acx=window.ActiveXObject;this._xhr=null;if(nat&&!(acx)){this._xhr=new XMLHttpRequest();}else{if(acx){try{this._xhr=new ActiveXObject("Msxml2.XMLHTTP");}catch(e1){try{this._xhr=new ActiveXObject("Microsoft.XMLHTTP");}catch(e2){}}}else{throw new Error("This browser does not support XMLHttpRequest object");}}var self=this;this._xhr.onreadystatechange=function(){self._callback.call(self);};this._xhr.open("POST",url,true);};_1ed.prototype.send=function(_1f3){this._xhr.setRequestHeader("Content-Type","application/x-www-form-urlencoded");this._xhr.send(_1f3);};_1ed.prototype._callback=function(){var req=this._xhr;if(req.readyState===4){this.handler(_16(req.responseText));}};_1ed.prototype.cancel=function(){this._xhr.abort();};var _1f5=function(id,url,_1f8){this.id=_1e8+id;this.url=url;this.handler=_1f8;this._id=id;};_1f5.prototype.send=function(_1f9){var plen=_1f9.length+this.url.length;if(plen>_1ea||_f.alwaysUseProxy){var uo=_1dd();var p1=_e6(uo.query);p1=p1&&((_1f9&&"&")+p1);var self=this;this._xhr=new _1ed(uo.path+"?"+this.url,function(){self._callback.call(self,arguments[0]);});this._xhr.send(_1f9+p1+"&f=json");}else{var el=document.createElement("script");el.id=(this.scriptId=_1e7+this._id);el.type="text/javascript";el.src=this.url+"?"+_1f9+"&f=json"+"&callback=esri.arcgis.gmaps._RestRequest._requestQueue."+this.id+"._callback";document.getElementsByTagName("head").item(0).appendChild(el);}};_1f5.prototype._callback=function(_1ff){this._cleanup();if(this.cancelled){return;}var err=_1ff.error||null;if(err){_1ff=null;}this.handler.call(null,_1ff,err);};_1f5.prototype._cleanup=function(){if(this.scriptId){var el=document.getElementById(this.scriptId);el.parentNode.removeChild(el);}_1eb(this.id);};_1f5.prototype.cancel=function(){if(!this.cancelled){this.cancelled=true;var xhr=this._xhr;if(xhr){xhr.cancel();this._cleanup();}}};var _203=function(id,url,_206){this.id=_1e9+id;this.url=url;this.handler=_206;};_203.prototype.send=function(_207){var self=this;var _209=null;var _cb=function(){self._callback.call(self,_209);};_209=new GGeoXml(this.url+"?"+_207+"&f=kmz",_cb);if(_e){_cb();}};_203.prototype._callback=function(_20b){this._cleanup();if(this.cancelled){return;}if(_d){if(!_20b.hasLoaded()){throw new Error("GGeoXml object could not finish loading the KML file");}else{if(!_20b.loadedCorrectly()){throw new Error("GGeoXml object could not load the KML file correctly");}}}this.handler.call(null,_20b,null);};_203.prototype._cleanup=function(){_1eb(this.id);};_203.prototype.cancel=function(){if(!this.cancelled){this.cancelled=true;}};return{_requestQueue:_1e6,create:function(url,_20d,_20e){var nid=Math.random().toString(10).substring(2);var jh=null;switch(_20e){case _7:jh=new _1f5(nid,url,_20d);_1e6[_1e8+nid]=jh;break;case _6:jh=new _203(nid,url,_20d);_1e6[_1e9+nid]=jh;break;default:throw new Error("_RestRequest.create(): The requested REST response format '"+_20e+"' is not supported. Supported formats are: json, kmz");}return jh;},handle:function(url,op,_213,_214,_215,_216,_217,_218){if(!_214){_214="";}if(!op){op="";}var uo=_28(url);url=uo.path+"/"+op;var p3=_e6(uo.query);p3=(p3==="")?p3:("&"+p3);var _h=function(){var args=[];for(var i=0,il=arguments.length;i<il;i++){args.push(arguments[i]);}args.push(_218);_217.apply(_216,args);};var req=_1e5.create(url,_h,_215);if(req){var _cb=function(text){var par=text+_214+p3;par=(par.indexOf("&")===0)?((par.length!==1)?par.substring(1):""):par;req.send(par);};if(_d){_cb(_e6(_213));}else{_80._parametersToJsonTextAsync(_213,_cb);}}return req;},cancel:function(_223){_223.cancel();}};}();var _224={INTERSECTS:"esriSpatialRelIntersects",CONTAINS:"esriSpatialRelContains",CROSSES:"esriSpatialRelCrosses",ENVELOPE_INTERSECTS:"esriSpatialRelEnvelopeIntersects",INDEX_INTERSECTS:"esriSpatialRelIndexIntersects",OVERLAPS:"esriSpatialRelOverlaps",TOUCHES:"esriSpatialRelTouches",WITHIN:"esriSpatialRelWithin"};var _225=function(){this.queryGeometry=null;this.outFields=null;this.returnGeometry=true;this.spatialRelationship=_224.INTERSECTS;this.text=null;this.where=null;};var _226=function(){this.attributes=null;this.geometry=null;};_dd=function(){this.displayFieldName=null;this.features=null;this.geometryType=null;this.spatialReference={"wkid":_3};};var _227=function(json,type){var conv,geom,_22c;switch(type){case"esriGeometryPoint":conv=_110;break;case"esriGeometryMultipoint":conv=_112;break;case"esriGeometryEnvelope":conv=_119;break;case"esriGeometryPolyline":conv=_12c;break;case"esriGeometryPolygon":conv=_137;break;}_22c=new _226();_22c.attributes=json.attributes;geom=json.geometry;_22c.geometry=(geom&&conv)?conv(geom):null;return _22c;};var _22d=function(json){var fset=new _dd();fset.displayFieldName=json.displayFieldName;var type=(fset.geometryType=json.geometryType);var sr=json.spatialReference;fset.spatialReference=(sr)?{"wkid":sr.wkid}:null;var _232=(fset.features=[]);var _233=json.features;var _234;if(_233){for(var i=0,flen=_233.length;i<flen;i++){_234=_233[i];_232.push(_227(_234,type));}}return fset;};var _237=function(url){this.url=url;};_237.prototype.execute=function(_239,_23a,_23b){if(!_239){throw new Error("QueryTask.execute(): 'parameters' argument is required");}var geom=_239.queryGeometry;var txt=_239.text;var _23e=_239.where;if(!(_1f(geom)||_1f(txt)||_1f(_23e))){throw new Error("QueryTask.execute(): 'Query' must have value for atleast one of 'queryGeometry', 'text', 'where' properties");}var _23f={geometryType:_52(geom).esriType,geometry:geom,inSR:_3,outSR:_3,spatialRel:_239.spatialRelationship,returnGeometry:_239.returnGeometry,text:txt,where:_23e,outFields:_239.outFields};if(geom){_23f.geometry._AG_=true;}_1e5.handle(this.url,"query",_23f,null,((_23a)?_6:_7),this,this._responseHandler,_23b);};_237.prototype._responseHandler=function(_240,_241,_242){var _243=null;if(_240){if(_240 instanceof GGeoXml){_243=_240;}else{_243=_22d(_240);}}_10(this,"executecomplete",_242,[_243,_241]);};var _244=function(){this.address=null;this.location=null;this.score=null;this.attributes=null;};var _245=function(){this.addressCandidates=null;};var _246=function(_247){var _248=new _226();_248.geometry=[_247.location];var _249=(_248.attributes={});var _24a=_247.address;if(typeof(_24a)==="string"){_249.address=_24a;}else{for(var x in _24a){if(_24a.hasOwnProperty(x)){_249[x]=_24a[x];}}}var _24c=_247.attributes;if(_24c){for(var y in _24c){if(_24c.hasOwnProperty(y)){_249[y]=_24c[y];}}}_249.score=_247.score;return _248;};var _24e=function(url){this.url=url;};_24e.prototype.addressToLocations=function(_250,_251,_252,_253){if(!_250){throw new Error("Locator.addressToLocations(): 'address' argument is required");}_250.outFields=_251;_1e5.handle(this.url,"findAddressCandidates",_250,null,((_252)?_6:_7),this,this._geocodeHandler,_253);};_24e.prototype.locationToAddress=function(_254,_255,_256,_257){if(!_254){throw new Error("Locator.locationToAddress(): 'latlng' argument is required");}if(!_255){throw new Error("Locator.locationToAddress(): 'distance' argument is required");}var _258={location:_254.lng()+","+_254.lat(),distance:_255};_1e5.handle(this.url,"reverseGeocode",_258,null,((_256)?_6:_7),this,this._reverseGeocodeHandler,_257);};_24e.prototype._geocodeHandler=function(_259,_25a,_25b){var _25c=null;if(_259){if(_259 instanceof GGeoXml){_25c=_259;}else{var _25d=new _245();var _25e=(_25d.addressCandidates=[]);var _25f=_259.candidates;var _260,ac;for(var i=0,il=_25f.length;i<il;i++){_260=_25f[i];ac=new _244();ac.address=_260.address;ac.location=_10e(_260.location);ac.score=_260.score;ac.attributes=_260.attributes;_25e.push(ac);}_25c=_25d;}}_10(this,"addresstolocationscomplete",_25b,[_25c,_25a]);};_24e.prototype._reverseGeocodeHandler=function(_264,_265,_266){var _267=null;if(_264){if(_264 instanceof GGeoXml){_267=_264;}else{var _268=new _244();_268.address=_264.address;_268.location=_10e(_264.location);_268.score=100;_267=_268;}}_10(this,"locationtoaddresscomplete",_266,[_267,_265]);};var _269=function(){this.geometry=null;this.tolerance=null;this.layerIds=null;this.layerOption="top";this.returnGeometry=true;this.dpi=96;this.bounds=null;this.width=null;this.height=null;};var _26a=function(){this.layerId=null;this.layerName=null;this.displayFieldName=null;this.feature=null;};var _26b=function(){this.identifyResults=null;};var _26c=function(url){this.url=url;};_26c.prototype.execute=function(_26e,_26f){if(!_26e){throw new Error("IdentifyTask.execute(): 'parameters' argument is required");}var geom=_26e.geometry;var tol=_26e.tolerance;var ext=_26e.bounds;var w=_26e.width;var h=_26e.height;var dpi=_26e.dpi;if(!(_1f(geom)&&_1f(tol)&&_1f(ext)&&_1f(w)&&_1f(h)&&_1f(dpi))){throw new Error("IdentifyTask.execute(): 'IdentifyParameters' must have value for the following properties: 'geometry', 'tolerance', 'bounds', 'width', 'height' and 'dpi'");}var _276=_26e.layerOption;var lids=_26e.layerIds;if(lids){_276+=(":"+lids.join(","));}var _278={geometry:geom,geometryType:_52(geom).esriType,sr:_3,layers:_276,tolerance:tol,mapExtent:ext,imageDisplay:w+","+h+","+dpi,returnGeometry:_26e.returnGeometry};_278.geometry._AG_=true;_278.mapExtent._AG_=true;_1e5.handle(this.url,"identify",_278,null,_7,this,this._responseHandler,_26f);};_26c.prototype._responseHandler=function(_279,_27a,_27b){var _27c=null;if(_279){var _27d=_279.results;_27c=new _26b();var _27e=(_27c.identifyResults=[]);var _27f,_280;for(var i=0,il=_27d.length;i<il;i++){_27f=_27d[i];_280=new _26a();_280.layerId=_27f.layerId;_280.layerName=_27f.layerName;_280.displayFieldName=_27f.displayFieldName;_280.feature=_227({attributes:_27f.attributes,geometry:_27f.geometry},_27f.geometryType);_27e.push(_280);}}_10(this,"executecomplete",_27b,[_27c,_27a]);};var _283=function(){this.searchText=null;this.contains=true;this.searchFields=null;this.layerIds=null;this.returnGeometry=true;};var _284=function(){this.layerId=null;this.layerName=null;this.displayFieldName=null;this.foundFieldName=null;this.feature=null;};var _285=function(){this.findResults=null;};var _286=function(url){this.url=url;};_286.prototype.execute=function(_288,_289){if(!_288){throw new Error("FindTask.execute(): 'parameters' argument is required");}var txt=_288.searchText;var lyrs=_288.layerIds;if(!(_1f(txt)&&_1f(lyrs))){throw new Error("FindTask.execute(): 'FindParameters' must have value for the following properties: 'searchText' and 'layerIds'");}var _28c={searchText:txt,contains:_288.contains,searchFields:_288.searchFields,sr:_3,layers:lyrs,returnGeometry:_288.returnGeometry};_1e5.handle(this.url,"find",_28c,null,_7,this,this._responseHandler,_289);};_286.prototype._responseHandler=function(_28d,_28e,_28f){var _290=null;if(_28d){var _291=_28d.results;_290=new _285();var _292=(_290.findResults=[]);var _293,fres;for(var i=0,il=_291.length;i<il;i++){_293=_291[i];fres=new _284();fres.layerId=_293.layerId;fres.layerName=_293.layerName;fres.displayFieldName=_293.displayFieldName;fres.foundFieldName=_293.foundFieldName;fres.feature=_227({attributes:_293.attributes,geometry:_293.geometry},_293.geometryType);_292.push(fres);}}_10(this,"executecomplete",_28f,[_290,_28e]);};var _297={METER:9001,GERMAN_METER:9031,FOOT:9002,SURVEY_FOOT:9003,CLARKE_FOOT:9005,FATHOM:9014,NAUTICAL_MILE:9030,SURVEY_CHAIN:9033,SURVEY_LINK:9034,SURVEY_MILE:9035,KILOMETER:9036,CLARKE_YARD:9037,CLARKE_CHAIN:9038,CLARKE_LINK:9039,SEARS_YARD:9040,SEARS_FOOT:9041,SEARS_CHAIN:9042,SEARS_LINK:9043,BENOIT_1895A_YARD:9050,BENOIT_1895A_FOOT:9051,BENOIT_1895A_CHAIN:9052,BENOIT_1895A_LINK:9053,BENOIT_1895B_YARD:9060,BENOIT_1895B_FOOT:9061,BENOIT_1895B_CHAIN:9062,BENOIT_1895B_LINK:9063,INDIAN_FOOT:9080,INDIAN_1937_FOOT:9081,INDIAN_1962_FOOT:9082,INDIAN_1975_FOOT:9083,INDIAN_YARD:9084,INDIAN_1937_YARD:9085,INDIAN_1962_YARD:9086,INDIAN_1975_YARD:9087,FOOT_1865:9070,RADIAN:9101,DEGREE:9102,ARCMINUTE:9103,ARCSECOND:9104,GRAD:9105,GON:9106,MICRORADIAN:9109,ARCMINUTE_CENTESIMAL:9112,ARCSECOND_CENTESIMAL:9113,MIL6400:9114,BRITISH_1936_FOOT:9095,GOLDCOAST_FOOT:9094,INTERNATIONAL_CHAIN:109003,INTERNATIONAL_LINK:109004,INTERNATIONAL_YARD:109001,STATUTE_MILE:9093,SURVEY_YARD:109002,LENGTH_50KILOMETER:109030,LENGTH_150KILOMETER:109031,DECIMETER:109005,CENTIMETER:109006,MILLIMETER:109007,INTERNATIONAL_INCH:109008,US_SURVEY_INCH:109009,INTERNATIONAL_ROD:109010,US_SURVEY_ROD:109011,US_NAUTICAL_MILE:109012,UK_NAUTICAL_MILE:109013};var _298=function(){this.geometries=null;this.inSpatialReference=null;this.outSpatialReference=null;this.geometryType=null;};var _299=function(){this.geometries=null;this.distances=null;this.unit=_297.METER;this.unionResults=false;this.bufferSpatialReference=null;};var _29a=function(){this.geometries=null;};var _29b=function(){this.geometries=null;};var _29c=function(){this.geometries=null;};var _29d=function(url){this.url=url;};_29d.ANGULAR_UNITS=[9101,9102,9103,9104,9105,9106,9109,9112,9113,9114];_29d.prototype.project=function(_29f,_2a0){if(!_29f){throw new Error("Geometry.project(): 'parameters' argument is required");}var geom=_29f.geometries;var _2a2=_52(geom[0]).esriType;var type=_29f.geometryType||_2a2;var insr=_29f.inSpatialReference;var _2a5=_29f.outSpatialReference;if(!(_1f(geom)&&_1f(insr)&&_1f(_2a5)&&_1f(type))){throw new Error("Geometry.project(): 'parameters' must have value for the following properties: 'geometries', 'inSpatialReference', 'outSpatialReference' and 'geometryType'");}var _2a6={geometries:{geometryType:type,geometries:geom},inSR:insr,outSR:_2a5};if(_2a2){_2a6.geometries.geometries._AAG_=true;}_1e5.handle(this.url,"project",_2a6,null,_7,this,this._projectHandler,[_2a5,type,_2a0]);};_29d.prototype._projectHandler=function(_2a7,_2a8,_2a9){var _2aa=_2a9[0];var type=_2a9[1];var _2ac=_2a9[2];var _2ad=null;if(_2a7){var _2ae=_2a7.geometries;_2ad=new _29a();if(_2aa===_3){var _2af=(_2ad.geometries=[]);for(var i=0,il=_2ae.length;i<il;i++){_2af.push(_227({geometry:_2ae[i]},type).geometry);}}else{_2ad.geometries=_2ae;}}_10(this,"projectcomplete",_2ac,[_2ad,_2a8]);};_29d.prototype.simplify=function(_2b2,_2b3){if(!_2b2){throw new Error("Geometry.simplify(): 'geometries' argument is required");}var _2b4=_52(_2b2[0]).esriType;var _2b5={geometries:{geometryType:_2b4,geometries:_2b2},sr:_3};_2b5.geometries.geometries._AAG_=true;_1e5.handle(this.url,"simplify",_2b5,null,_7,this,this._simplifyHandler,[_2b4,_2b3]);};_29d.prototype._simplifyHandler=function(_2b6,_2b7,_2b8){var type=_2b8[0];var _2ba=_2b8[1];var _2bb=null;if(_2b6){var _2bc=_2b6.geometries;_2bb=new _29b();var _2bd=(_2bb.geometries=[]);for(var i=0,il=_2bc.length;i<il;i++){_2bd.push(_227({geometry:_2bc[i]},type).geometry);}}_10(this,"simplifycomplete",_2ba,[_2bb,_2b7]);};_29d.prototype.buffer=function(_2c0,_2c1){if(!_2c0){throw new Error("Geometry.buffer(): 'parameters' argument is required");}var geom=_2c0.geometries;var dt=_2c0.distances;if(!(_1f(geom)&&_1f(dt))){throw new Error("Geometry.buffer(): 'parameters' must have value for the following properties: 'geometries', 'distances'");}var unit=_2c0.unit;var _2c5={geometries:{geometryType:_52(geom[0]).esriType,geometries:geom},inSR:_3,bufferSR:_2c0.bufferSpatialReference||((_23(_29d.ANGULAR_UNITS,unit)!==-1)?_3:_4),outSR:_3,distances:dt,unit:unit,unionResults:_2c0.unionResults};_2c5.geometries.geometries._AAG_=true;_1e5.handle(this.url,"buffer",_2c5,null,_7,this,this._bufferHandler,_2c1);};_29d.prototype._bufferHandler=function(_2c6,_2c7,_2c8){var _2c9=null;if(_2c6){var _2ca=_2c6.geometries;_2c9=new _29c();var _2cb=(_2c9.geometries=[]);for(var i=0,il=_2ca.length;i<il;i++){_2cb.push(_137(_2ca[i]));}}_10(this,"buffercomplete",_2c8,[_2c9,_2c7]);};_29d.prototype.getAreasAndLengths=function(_2ce,_2cf){if(!_2ce){throw new Error("Geometry.getAreasAndLengths(): 'polygons' argument is required");}var _2d0=new _298();_2d0.geometries=_2ce;_2d0.inSpatialReference=4326;_2d0.outSpatialReference=102113;var self=this;this.project(_2d0,function(_2d2,_2d3){if(_2d3){throw new Error("Error "+_2d3.code+": "+_2d3.message+"("+_2d3.details.join(",")+")");}var _2d4={polygons:_2d2.geometries,sr:_4};_1e5.handle(self.url,"areasAndLengths",_2d4,null,_7,self,self._alHandler,_2cf);});};_29d.prototype._alHandler=function(_2d5,_2d6,_2d7){_10(this,"areasandlengthscomplete",_2d7,[_2d5,_2d6]);};_29d.prototype.getLengths=function(_2d8,_2d9){if(!_2d8){throw new Error("Geometry.getLengths(): 'polylines' argument is required");}var _2da=new _298();_2da.geometries=_2d8;_2da.inSpatialReference=4326;_2da.outSpatialReference=102113;var self=this;this.project(_2da,function(_2dc,_2dd){if(_2dd){throw new Error("Error "+_2dd.code+": "+_2dd.message+"("+_2dd.details.join(",")+")");}var _2de={polylines:_2dc.geometries,sr:_4};_1e5.handle(self.url,"lengths",_2de,null,_7,self,self._lHandler,_2d9);});};_29d.prototype._lHandler=function(_2df,_2e0,_2e1){_10(this,"lengthscomplete",_2e1,[_2df,_2e0]);};var _2e2=function(){this.paramName=null;this.dataType=null;this.value=null;};var _2e3=function(){this.type=null;this.description=null;};var _2e4=function(){this.date=null;this.format=null;};var _2e5=function(){this.distance=null;this.units=null;};var _2e6=function(){this.url=null;};var _2e7=function(){this.url=null;this.format=null;};var _2e8=function(){this.href=null;this.width=null;this.height=null;this.bounds=null;this.scale=null;};var _2e9=function(){this.results=null;this.messages=null;};var _2ea=function(){this.jobId=null;this.jobStatus=null;this.messages=null;};var _2eb={CANCELLED:"esriJobCancelled",CANCELLING:"esriJobCancelling",DELETED:"esriJobDeleted",DELETING:"esriJobDeleting",EXECUTING:"esriJobExecuting",FAILED:"esriJobFailed",NEW:"esriJobNew",SUBMITTED:"esriJobSubmitted",SUCCEEDED:"esriJobSucceeded",TIMED_OUT:"esriJobTimedOut",WAITING:"esriJobWaiting"};var _2ec=function(){this.format="png8";this.transparent=true;this.dpi=96;this.layerIds=null;this.layerOption="show";this.layerDefinitions=[];this.bounds=null;this.width=null;this.height=null;this.zoomLevel=null;this.imageSpatialReference=_4;};var _2ed=function(_2ee,_2ef,_2f0,_2f1){var _2f2=_2ee.layerOption;var lids=_2ee.layerIds;if(lids){_2f2+=(":"+lids.join(","));}else{_2f2="";}var bb=_2ef||_2ee.bounds;var _2f5=_2ee.layerDefinitions,defs=[];for(var id in _2f5){if(_2f5.hasOwnProperty(id)&&id&&_2f5[id]){defs.push(id+":"+_2f5[id]);}}var _2f8={bbox:bb,size:(_2f0||_2ee.width||400)+","+(_2f1||_2ee.height||400),dpi:_2ee.dpi,imageSR:(_2ee.imageSpatialReference||_4),bboxSR:_3,format:_2ee.format,transparent:_2ee.transparent,layers:_2f2,layerDefs:defs.join(";")};if(bb&&bb instanceof GLatLngBounds){_2f8.bbox._AG_=true;}return _2f8;};var _2f9=function(json,_2fb){var mimg=new _2e8();mimg.href=json.href;mimg.width=json.width;mimg.height=json.height;mimg.scale=json.scale;var _2fd=json.extent;if(_2fd){mimg.bounds=_120(_2fd,_2fb);}return mimg;};var _2fe=function(json){var out=[];var msg,_302;if(json&&json.length){for(var i=0,il=json.length;i<il;i++){msg=json[i];_302=new _2e3();_302.type=msg.type;_302.description=msg.description;out.push(_302);}}return out;};var _305=function(type,json){if(_23(["GPBoolean","GPDouble","GPLong","GPString"],type)!==-1){return json;}var out=null;var mimg;switch(type){case"GPDate":out=new _2e4();out.date=json;out.format="dow mon dd hh:mm:ss zzz yyyy";break;case"GPLinearUnit":out=new _2e5();out.distance=json.distance;out.units=json.units;break;case"GPDataFile":out=new _2e6();out.url=json.url;break;case"GPRasterData":case"GPRasterDataLayer":mimg=json.mapImage;if(mimg){out=_2f9(mimg);}else{out=new _2e7();out.url=json.url;out.format=json.format;}break;case"GPRecordSet":case"GPFeatureRecordSetLayer":mimg=json.mapImage;if(mimg){out=_2f9(mimg);}else{out=_22d(json);}break;default:out=json;break;}return out;};var _30a=function(url,_30c){this.url=url;this._delay=(_30c)?(_30c.statusUpdateInterval||1000):1000;this._outSR=(_30c)?(_30c.outSpatialReference||_3):_3;this._processSR=_30c&&_30c.processSpatialReference;this._timers=[];};_30a.prototype.execute=function(_30d,_30e,_30f){if(!_30d){throw new Error("Geoprocessor.execute(): 'parameters' argument is required");}_30d["env:outSR"]=this._outSR;_30d["env:processSR"]=this._processSR;_1e5.handle(this.url,"execute",_30d,null,((_30e)?_6:_7),this,this._executeHandler,_30f);};_30a.prototype._executeHandler=function(_310,_311,_312){var _313=null;if(_310){if(_310 instanceof GGeoXml){_313=_310;}else{var _314=_310.results;var _315=new _2e9();var _316=(_315.results=[]);var res,pval,_319;for(var i=0,il=_314.length;i<il;i++){res=_314[i];pval=new _2e2();pval.paramName=res.paramName;_319=(pval.dataType=res.dataType);pval.value=_305(_319,res.value);_316.push(pval);}_315.messages=_2fe(_310.messages);_313=_315;}}_10(this,"executecomplete",_312,[_313,_311]);};_30a.prototype.submitJob=function(_31c,_31d,_31e){if(!_31c){throw new Error("Geoprocessor.submitJob(): 'parameters' argument is required");}_31c["env:outSR"]=this._outSR;_31c["env:processSR"]=this._processSR;_1e5.handle(this.url,"submitJob",_31c,null,_7,this,this._jobHandler,[_31e,_31d,true]);};_30a.prototype._jobHandler=function(_31f,_320,_321){var cb=_321[0];var scb=_321[1];var _324=_321[2];if(_320){_10(this,"jobstatusupdate",null,[null,_320]);if(_324){_10(this,"jobcomplete",null,[null,_320]);}_10(null,null,scb,[null,_320]);if(_324){_10(null,null,cb,[null,_320]);}return;}var ji=new _2ea();var id=(ji.jobId=_31f.jobId);var _327=(ji.jobStatus=_31f.jobStatus);ji.messages=_2fe(_31f.messages);_10(this,"jobstatusupdate",null,[ji]);var done=false;if(_324){this.cancelJobStatusUpdates(id);switch(_327){case _2eb.SUBMITTED:case _2eb.EXECUTING:case _2eb.WAITING:case _2eb.NEW:var self=this;this._timers[id]=setTimeout(function(){self.checkJobStatus.call(self,id,cb,scb);},this._delay);break;default:done=true;_10(this,"jobcomplete",null,[ji]);break;}}_10(null,null,scb,[ji]);if(done){_10(null,null,cb,[ji]);}};_30a.prototype.checkJobStatus=function(_32a,_32b){if(!_32a){throw new Error("Geoprocessor.checkJobStatus(): 'jobId' argument is required");}var _32c;if(arguments.length===3){_32c=[_32b,arguments[2],true];}else{_32c=[null,_32b,false];}_1e5.handle(this.url,"jobs/"+_32a,{returnMessages:true},null,_7,this,this._jobHandler,_32c);};_30a.prototype.cancelJobStatusUpdates=function(_32d){clearTimeout(this._timers[_32d]);delete this._timers[_32d];};_30a.prototype.getResultData=function(_32e,_32f,_330,_331){if(!(_32e&&_32f)){throw new Error("Geoprocessor.getResultData(): 'jobId' and 'resultParameterName' arguments are required");}_1e5.handle(this.url,"jobs/"+_32e+"/results/"+_32f,{returnType:"data",outSR:_3},null,((_330)?_6:_7),this,this._resultDataHandler,_331);};_30a.prototype._resultDataHandler=function(_332,_333,_334){var _335=null;if(_332){if(_332 instanceof GGeoXml){_335=_332;}else{var out=new _2e2();out.paramName=_332.paramName;var _337=(out.dataType=_332.dataType);out.value=_305(_337,_332.value);_335=out;}}_10(this,"getresultdatacomplete",_334,[_335,_333]);};_30a.prototype.getResultImage=function(_338,_339,_33a,_33b){if(!(_338&&_339)){throw new Error("Geoprocessor.getResultImage(): 'jobId' and 'resultParameterName' arguments are required");}var _33c=_2ed(_33a||new _2ec());_1e5.handle(this.url,"jobs/"+_338+"/results/"+_339,_33c,null,_7,this,this._resultImageHandler,_33b);};_30a.prototype._resultImageHandler=function(_33d,_33e,_33f){var mi=null;if(_33d){var _341=_33d.href?_33d:_33d.value.mapImage;var ext=_341.extent;var sr=(ext)?ext.spatialReference:null;mi=_2f9(_341,((sr&&sr.wkid===102113)?true:false));}_10(this,"getresultimagecomplete",_33f,[mi,_33e]);};var _344;_30a.prototype.getResultImageLayer=function(_345,_346,_347){if(!(_345&&_346)){throw new Error("Geoprocessor.getResultLayer(): 'jobId' and 'resultParameterName' arguments are required");}var uo=_28(this.url);var url=uo.path+"/jobs/"+_345+"/results/"+_346;url=_36(url,uo.query);return new _344(url,_347,1,null,true);};var _34a=function(){this.id=null;this.name=null;this.parentLayerId=null;this.subLayerIds=null;this.defaultVisibility=null;};var _34b=function(res,xmin,xmax,_34f){if(!res){var _350=_57.lngToX;var x1=_350(xmin);var x2=_350(xmax);res=(x2-x1)/_34f;}var _353,_354,_355,glev,gres,_358,_359;_353=_354=-1;for(var i=0;i<=_b;i++){glev=i;gres=_c[i];if(res>=gres){_354=glev;_353=_354-1;break;}}if(_354===-1){_355=_b;}else{if(_353===-1){_355=_a;}else{_358=_c[_353]-res;_359=res-_c[_354];if(_358<=_359){_355=_353;}else{_355=_354;}}}return _355;};var _35b=function(json){var _35d=[];var lyr,_35f;for(var i=0,il=json.length;i<il;i++){lyr=json[i];_35f=new _34a();_35f.id=lyr.id;_35f.name=lyr.name;_35f.parentLayerId=lyr.parentLayerId;_35f.subLayerIds=lyr.subLayerIds;_35f.defaultVisibility=lyr.defaultVisibility;_35d.push(_35f);}return _35d;};var _362=function(url,_364,_365){this.url=url;this.fullExtent=null;this.initialExtent=null;this.layerInfos=null;this.description=null;this.copyright=null;var _366,opac,_368,_369;_366=opac=_368=_369=null;if(_364){_366=_364.copyrights;opac=_364.opacity;_368=_364.minResolution;_369=_364.maxResolution;}this._options=_44(_364);this._copyrights=_366;this._opacity=(opac!==null)?opac:1;this._minZoomLevel=(this._minResolution=(_368!==null)?_368:_a);this._maxZoomLevel=(this._maxResolution=(_369!==null)?_369:_b);this._format=null;this._fileExtension=null;this._tileZoomLevels=null;_1e5.handle(url,null,null,null,_7,this,this._responseHandler,_365);};if(_d){_362.prototype=new GTileLayer();}_362._BLANK_TILE="http://serverapi.arcgisonline.com/jsapi/gmaps/transparent.png";_362.prototype.getTileUrl=function(tile,zoom){var _36c=_362._BLANK_TILE;if(zoom<this._minZoomLevel||zoom>this._maxZoomLevel){return _36c;}var tx=tile.x;var ty=tile.y;var trng=this._tileRange[zoom];var swX=trng.swX;var swY=trng.swY;var neX=trng.neX;var neY=trng.neY;if((tx<swX||tx>neX)||(ty<neY||ty>swY)){return _36c;}var uo=_28(this.url);var url=uo.path+"/tile/"+this._tileZoomLevels[zoom]+"/"+ty+"/"+tx+"."+this._fileExtension;url=_36(url,uo.query);url=_1df(url);return url;};_362.prototype.isPng=function(){return(this._fileExtension==="png")?true:false;};_362.prototype.getOpacity=function(){return this._opacity;};_362.prototype.getCopyright=function(_376,zoom){var _378=this._copyrights;return(_378)?_378.getCopyrightNotice(_376,zoom):(this.copyright||"");};_362.prototype._responseHandler=function(_379,_37a,_37b){if(_379){var sr=_379.spatialReference;var _37d=_379.tileInfo;if(!_37d){throw new Error("The map service, "+this.url+", does not have tile information");}var wkid=sr.wkid||null;if(wkid!==_4){throw new Error("Spatial reference, "+wkid+", of the map service, "+this.url+", is not compatible with Google Maps. Expected spatial reference = "+_4);}var rows=_37d.rows||null;var cols=_37d.cols||null;if(rows!==_8||cols!==_9){throw new Error("Tile size, "+rows+"px X "+cols+"px, of the map service, "+this.url+", is not compatible with Google Maps. Expected tile size = "+_8+"px X "+_9+"px");}var lods=_37d.lods;if(!lods){throw new Error("The map service, "+this.url+", does not have zoom level information");}var full=_379.fullExtent;this.description=_379.description;this.copyright=_379.copyrightText;this.fullExtent=_120(full,true);this.initialExtent=_120(_379.initialExtent,true);this.layerInfos=_35b(_379.layers);this._format=_37d.format;this._fileExtension={PNG:"png",PNG8:"png",PNG24:"png",PNG32:"png",JPG:"jpg",JPEG:"jpg",GIF:"gif"}[this._format];this._setZoomLevels(lods);var _383=(this._tileRange=[]);var ori=_37d.origin;for(var i=_a;i<=_b;i++){_383[i]=this._getTileCoordinates(ori,full,i);}if(_e){var uo=_28(this.url);var url=uo.path+"/tile/{Z}/{Y}/{X}."+this._fileExtension;url=_36(url,uo.query);url=_1df(url);this._options.tileUrlTemplate=url;GTileLayer.call(this,null,this._minResolution,this._maxResolution,this._options);}}_10(this,"load",_37b,[this,_37a]);};_362.prototype._getTileCoordinates=function(_388,_389,zoom){var abs=Math.abs;var _38c=Math.floor;var res=_c[zoom];var _38e=res*_9;var _38f=res*_8;var _390=abs(_389.xmin-_388.x);var _391=abs(_389.ymin-_388.y);var _392=abs(_389.xmax-_388.x);var _393=abs(_389.ymax-_388.y);return{swX:_38c(_390/_38e),swY:_38c(_391/_38f),neX:_38c(_392/_38e),neY:_38c(_393/_38f)};};_362.prototype._setZoomLevels=function(lods){var tzl=(this._tileZoomLevels=[]);var lod,lev,res,_399;var _39a=_b;var _39b=_a;for(var i=0,il=lods.length;i<il;i++){lod=lods[i];lev=lod.level;res=lod.resolution;_399=_34b(res);tzl[_399]=lev;if(_399<_39a){_39a=_399;}if(_399>_39b){_39b=_399;}}this._minZoomLevel=(_39a>this._minResolution)?_39a:this._minResolution;this._maxZoomLevel=(_39b<this._maxResolution)?_39b:this._maxResolution;};_344=function(url,_39f,_3a0,_3a1){this.url=url;this.fullExtent=null;this.initialExtent=null;this.layerInfos=null;this.description=null;this.copyright=null;this._options=(_39f)?_44(_39f):new _2ec();this._opacity=_1f(_3a0)?_3a0:1;this._callback=_3a1;var gp=arguments[4];if(gp){this._GP_=true;return this;}else{_1e5.handle(this.url,null,null,null,_7,this,this._responseHandler,_3a1);}};if(_d){_344.prototype=new GOverlay();}_344.prototype.initialize=function(map){var div=document.createElement("div");div.style.position="absolute";map.getPane(G_MAP_MAP_PANE).appendChild(div);this._map=map;this._div=div;this.show();};_344.prototype.remove=function(){var img=this._img;var div=this._div;this.hide();if(img){img.parentNode.removeChild(img);}if(div){div.parentNode.removeChild(div);}this._img=this._div=this._map=null;};_344.prototype.copy=function(){return new _344(this.url,this._options,this._opacity,this._callback);};_344.prototype.redraw=function(_3a7){};_344.prototype._redraw=function(){if(this._img_loading){_1e5.cancel(this._request);this._request=this._img_loading=null;}var map=this._map;var _3a9=map.getBounds();_3a9=this._getAdjustedExtent(_3a9);var abs=Math.abs;var xmin=_3a9.xmin,ymin=_3a9.ymin,xmax=_3a9.xmax,ymax=_3a9.ymax;var sw=new GLatLng(ymin,xmin);var ne=new GLatLng(ymax,xmax);var c1=map.fromLatLngToDivPixel(sw);var c2=map.fromLatLngToDivPixel(ne);var _3b3=abs(c1.x-c2.x);var _3b4=abs(c1.y-c2.y);_3b3=this._getAdjustedWidth(xmin,xmax,map.getZoom(),_3b3);var _3b5=_2ed(this._options,_3a9,_3b3,_3b4);var img=document.createElement("img");img.style.position="absolute";this._img_loading=img;this._request=_1e5.handle(this.url,this._GP_?"":"export",_3b5,null,_7,this,this._redrawHandler,null);};_344.prototype._redrawHandler=function(_3b7,_3b8){if(_3b8){throw new Error("Error "+_3b8.code+": "+_3b8.message+"("+_3b8.details.join(",")+")");}if(this._moving){this._img_loading=null;return;}var _3b9=_3b7.href?_3b7:_3b7.value.mapImage;var uo=_28(this.url);var url=_3b9.href;url=_36(url,uo.query);url=_1df(url);var _3bc=_120(_3b9.extent,true);var div=this._div;var map=this._map;var c1=map.fromLatLngToDivPixel(_3bc.getSouthWest());var c2=map.fromLatLngToDivPixel(_3bc.getNorthEast());div.style.left=c1.x+"px";div.style.top=c2.y+"px";var img=this._img_loading;img.src=url;if(this._img){this._img.parentNode.removeChild(this._img);}this._img=img;this._img_loading=null;this.setOpacity(this._opacity);div.appendChild(img);div.style.display="";};_344.prototype._getAdjustedExtent=function(_3c2){var sw=_3c2.getSouthWest();var ne=_3c2.getNorthEast();var xmin=sw.lng(),ymin=sw.lat();var xmax=ne.lng(),ymax=ne.lat();if(xmin>xmax){xmin=-180;}if(ymax>89){ymax=89;}if(ymin<-89){ymin=-89;}return{xmin:xmin,ymin:ymin,xmax:xmax,ymax:ymax};};_344.prototype._getAdjustedWidth=function(xmin,xmax,zoom,_3cc){var _3cd=Math.floor;if(!_3cc){var _3ce=_57.lngToX;var x1=_3ce(xmin);var x2=_3ce(xmax);_3cc=_3cd((x2-x1)/_c[zoom]);}if(xmin===-180&&xmax===180){_3cc=_3cd(Math.pow(2,zoom)*_9);}return _3cc;};_344.prototype._getHeight=function(ymin,ymax,zoom){var _3d4=_57.latToY;var y1=_3d4(ymin);var y2=_3d4(ymax);var _3d7=Math.floor((y2-y1)/_c[zoom]);return _3d7;};_344.prototype._moveStartHandler=function(){this._movestart=true;this._div.style.display="";};_344.prototype._moveHandler=function(){if(!this._movestart){this._div.style.display="none";}else{this._div.style.display="";this._moving=true;}};_344.prototype._moveEndHandler=function(){this._movestart=false;this._moving=false;this._redraw();};_344.prototype._setHandlers=function(){var map=this._map;var bind=GEvent.bind;if(!this._handle_movestart){this._handle_movestart=bind(map,"movestart",this,this._moveStartHandler);}if(!this._handle_move){this._handle_move=bind(map,"move",this,this._moveHandler);}if(!this._handle_moveend){this._handle_moveend=bind(map,"moveend",this,this._moveEndHandler);}};_344.prototype._clearHandlers=function(){var _3da=this._handle_movestart;var move=this._handle_move;var end=this._handle_moveend;var _3dd=GEvent.removeListener;if(_3da){_3dd(_3da);}if(move){_3dd(move);}if(end){_3dd(end);}this._handle_movestart=this._handle_move=this._handle_moveend=null;};_344.prototype.show=function(){this._setVisiblity(true);this._visible=true;};_344.prototype.hide=function(){this._setVisiblity(false);this._visible=false;};_344.prototype._setVisiblity=function(v){var div=this._div;if(!div){return;}if(v){if(!this._visible){this._redraw();this._setHandlers();}}else{if(this._visible){div.style.display="none";this._clearHandlers();}}};_344.prototype.isHidden=function(){return!this._visible;};_344.prototype.supportsHide=function(){return true;};_344.prototype.setVisibleLayers=function(_3e0){var opts=this._options;opts.layerIds=_3e0;opts.layerOption="show";if(this._visible&&this._map){this._redraw();}};_344.prototype.setDefaultVisibleLayers=function(){this._options.layerIds=null;if(this._visible&&this._map){this._redraw();}};_344.prototype.setLayerDefinitions=function(_3e2){this._options.layerDefinitions=_3e2;if(this._visible&&this._map){this._redraw();}};_344.prototype.clearLayerDefinitions=function(){this._options.layerDefinitions=null;if(this._visible&&this._map){this._redraw();}};_344.prototype.setOpacity=function(_3e3){var op=(this._opacity=_3e3);var img=this._img;if(!img){return;}if(op<0){op=0;}if(op>1){op=1;}var ist=img.style;if("filter"in ist){ist.filter="alpha(opacity:"+Math.floor(op*100)+")";}if("KHTMLOpacity"in ist){ist.KHTMLOpacity=op;}if("MozOpacity"in ist){ist.MozOpacity=op;}if("opacity"in ist){ist.opacity=op;}};_344.prototype._responseHandler=function(_3e7,_3e8,_3e9){var done=true;if(_3e7){this.description=_3e7.description;this.copyright=_3e7.copyrightText;this.layerInfos=_35b(_3e7.layers);var init=_3e7.initialExtent;var full=_3e7.fullExtent;var isr=init.spatialReference.wkid;done=true;switch(isr){case 4326:this.initialExtent=_120(init);this.fullExtent=_120(full);break;case 102113:this.initialExtent=_120(init,true);this.fullExtent=_120(full,true);break;default:var _3ee=_f.geometryServiceUrl;this.initialExtent=init;this.fullExtent=full;if(_3ee){done=false;var gs=new _29d(_3ee);var _3f0=[{x:init.xmin,y:init.ymin},{x:init.xmax,y:init.ymax},{x:full.xmin,y:full.ymin},{x:full.xmax,y:full.ymax}];var _3f1=new _298();_3f1.geometries=_3f0;_3f1.geometryType="esriGeometryPoint";_3f1.inSpatialReference=isr;_3f1.outSpatialReference=_3;var self=this;var _cb=function(){self._projectHandler.call(self,arguments[0],arguments[1],_3e9);};gs.project(_3f1,_cb);}break;}}if(done){_10(this,"load",_3e9,[this,_3e8]);}};_344.prototype._projectHandler=function(_3f4,_3f5,_3f6){if(_3f4){var _3f7=_3f4.geometries;this.initialExtent=new GLatLngBounds(_3f7[0][0].getLatLng(),_3f7[1][0].getLatLng());this.fullExtent=new GLatLngBounds(_3f7[2][0].getLatLng(),_3f7[3][0].getLatLng());}_10(this,"load",_3f6,[this,_3f5]);};_344.prototype.exportMapImage=function(_3f8,_3f9){if(!_3f8){throw new Error("DynamicMapServiceLayer.exportMapImage(): 'parameters' argument is required");}var _3fa=_3f8.bounds;var _3fb=_3f8.width;var _3fc=_3f8.height;var zoom=_3f8.zoomLevel;if(!_1f(_3fa)){throw new Error("DynamicMapServiceLayer.exportMapImage(): 'parameters' must have a value for 'bounds' property");}if(_1f(zoom)){_3fa=this._getAdjustedExtent(_3fa);var xmin=_3fa.xmin,ymin=_3fa.ymin,xmax=_3fa.xmax,ymax=_3fa.ymax;_3fb=this._getAdjustedWidth(xmin,xmax,zoom);_3fc=this._getHeight(ymin,ymax,zoom);}var _402=_2ed(_3f8,_3fa,_3fb,_3fc);_1e5.handle(this.url,this._GP_?"":"export",_402,null,_7,this,this._exportHandler,_3f9);};_344.prototype._exportHandler=function(_403,_404,_405){var mi=null;if(_403){var ext=_403.extent;var sr=(ext)?ext.spatialReference:null;mi=_2f9(_403,((sr&&sr.wkid===102113)?true:false));}_10(this,"exportcomplete",_405,[mi,_404]);};var _409=function(_40a){var _40b=[],res;if(_40a instanceof _226){_40b.push(_40a);}else{if(_40a instanceof _dd){res=_40a.features;for(var i=0,il=res.length;i<il;i++){_40b.push(res[i]);}}}return _40b;};var _40f=function(_410){var _411=[],res;if(_410 instanceof _244){_411.push(_246(_410));}else{if(_410 instanceof _245){res=_410.addressCandidates;for(var i=0,il=res.length;i<il;i++){_411.push(_246(res[i]));}}}return _411;};var _415=function(_416){var _417=[],res;if(_416 instanceof _26a){_417.push(_416.feature);}else{if(_416 instanceof _26b){res=_416.identifyResults;for(var i=0,il=res.length;i<il;i++){_417.push(res[i].feature);}}}return _417;};var _41b=function(_41c){var _41d=[],res;if(_41c instanceof _284){_41d.push(_41c.feature);}else{if(_41c instanceof _285){res=_41c.findResults;for(var i=0,il=res.length;i<il;i++){_41d.push(res[i].feature);}}}return _41d;};var _421=function(_422){var _423=[],res,val,_426,i,il,j,jl;if(_422 instanceof _2e2){val=_422.value;if(val&&val instanceof _dd){res=val.features;for(i=0,il=res.length;i<il;i++){_423.push(res[i]);}}}else{if(_422 instanceof _2e9){_426=_422.results;for(i=0,il=_426.length;i<il;i++){val=_426[i].value;if(val&&val instanceof _dd){res=val.features;for(j=0,jl=res.length;j<jl;j++){_423.push(res[j]);}}}}}return _423;};var _42b=function(_42c){var _42d=[],res;res=_42c.geometries;for(var i=0,il=res.length;i<il;i++){_42d.push({geometry:res[i]});}return _42d;};var _431=function(_432){var ovs=null;if(_432 instanceof _226||_432 instanceof _dd){ovs=_409(_432);}else{if(_432 instanceof _244||_432 instanceof _245){ovs=_40f(_432);}else{if(_432 instanceof _26a||_432 instanceof _26b){ovs=_415(_432);}else{if(_432 instanceof _284||_432 instanceof _285){ovs=_41b(_432);}else{if(_432 instanceof _29a||_432 instanceof _29b||_432 instanceof _29c){ovs=_42b(_432);}else{if(_432 instanceof _2e2||_432 instanceof _2e9){ovs=_421(_432);}}}}}}return ovs;};var _434=function(map){this.map=map;};_434.prototype.addToMap=function(_436,_437,_438){if(_e){throw new Error("MapExtension: Asynchronous call to synchronous method: addToMap. Use addToMapAsync instead");}var _439=[],ovs,i,il,fe,type="",meta;var map=this.map;var fes=_431(_436);if(fes){fe=fes[0];if(fe&&fe.geometry){type=_52(fe.geometry).gmapsType;}meta={flags:_1cb(_437,type),style:_14a(_437,type),type:type};for(i=0,il=fes.length;i<il;i++){ovs=_1b9(fes[i],_437,_438,meta,map);_439.push(ovs);}}else{if(_436 instanceof GGeoXml){map.addOverlay(_436);_439.push([_436]);}else{if(_436 instanceof _362){var tov=new GTileLayerOverlay(_436);map.addOverlay(tov);_439.push([tov]);}else{throw new Error("MapExtension.addToMap(): 'results' argument should be one of the following types: FeatureSet, Feature, FindResults, FindResult, IdentifyResults, IdentifyResult, AddressResults, AddressCandidate, ProjectResults, SimplifyResults, BufferResults, GGeoXml, ParameterValue, GPResults, TiledMapServiceLayer");}}}return _439;};_434.prototype.addToMapAsync=function(_443,_444,_445,_446){if(!_446){throw new Error("MapExtension.addToMapAsync(): 'callback' argument is required");}_444=_44(_444);_445=_44(_445);var _447=[],i,il,fe,type="",meta;var map=this.map;var args=[];var fes=_431(_443);if(fes){fe=fes[0];if(fe&&fe.geometry){type=_52(fe.geometry).gmapsType;}meta={flags:_1cb(_444,type),style:_14a(_444,type),type:type};for(i=0,il=fes.length;i<il;i++){args.push(_80);args.push("_addCustomOverlays");args.push([fes[i],_444,_445,meta,map]);}args.push(function(){var j,jl,_447=[];for(j=0,jl=arguments.length;j<jl;j++){_447.push(arguments[j]);}_446(_447);});GAsync.apply(null,args);}else{if(_443 instanceof GGeoXml){map.addOverlay(_443);_447.push([_443]);_446(_447);}else{if(_443 instanceof _362){var tov=new GTileLayerOverlay(_443);map.addOverlay(tov);_447.push([tov]);_446(_447);}else{throw new Error("MapExtension.addToMapAsync(): 'results' argument should be one of the following types: FeatureSet, Feature, FindResults, FindResult, IdentifyResults, IdentifyResult, AddressResults, AddressCandidate, ProjectResults, SimplifyResults, BufferResults, GGeoXml, ParameterValue, GPResults, TiledMapServiceLayer");}}}};_434.prototype.removeFromMap=function(_453){if(!_453){return;}var map=this.map;var ovs,ov;for(var i=0,il=_453.length;i<il;i++){ovs=_453[i];for(var j=0,jl=ovs.length;j<jl;j++){ov=ovs[j];GEvent.clearListeners(ov,"click");map.removeOverlay(ov);}}};return{_RestRequest:_1e5,_MercatorProjection:_57,SpatialRelationship:_224,Config:_f,QueryTask:_237,Locator:_24e,FindTask:_286,Geometry:_29d,Geoprocessor:_30a,IdentifyTask:_26c,Query:_225,IdentifyParameters:_269,FindParameters:_283,FeatureSet:_dd,Feature:_226,SRUnitType:_297,ProjectParameters:_298,BufferParameters:_299,GPDate:_2e4,LinearUnit:_2e5,DataFile:_2e6,RasterData:_2e7,JobStatus:_2eb,TiledMapServiceLayer:_362,DynamicMapServiceLayer:_344,ImageParameters:_2ec,MapExtension:_434};};return{gmaps:_2()};};var _45b=function(ns,_45d){var ns_t=typeof _45d[ns];if(ns_t==="undefined"){_45d[ns]={};return _45d[ns];}else{if(ns_t==="object"){return _45d[ns];}}throw new Error("Unable to establish namespace for the library. Namespace \""+ns+"\" of type \""+ns_t+"\" already exists.");};var _45f=_45b("esri",this);var _460=_45b("arcgis",_45f);_460.gmaps=_1().gmaps;})();
