

(function(){var _1=function(){var _2=function(){var _3=parseFloat(navigator.appVersion.split("MSIE ")[1])||0;var _4=4326;var _5=102113;var _6="{*}";var _7="kmz";var _8="json";var _9=256;var _a=256;var _b=0;var _c=19;var _d=[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 _e=window.GBrowserIsCompatible?true:false;var _f=!_e;var _10={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 _11=function(_12,_13,_14,_15){if(_12&&_13){var arg=[_12,_13];arg=arg.concat(_15);GEvent.trigger.apply(null,arg);}if(_14){_14.apply(null,_15);}};var _17=function(_18){var j;if(_18&&/^[\],:{}\s]*$/.test(_18.replace(/\\./g,"@").replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(:?[eE][+\-]?\d+)?/g,"]").replace(/(?:^|:|,)(?:\s*\[)+/g,""))){j=eval("("+_18+")");return j;}throw new Error("Error: Invalid JSON");};var _1a=function(_1b){if(_1b){if(_1b instanceof Array||(typeof _1b.length==="number"&&!_1b.propertyIsEnumerable("length")&&typeof _1b.splice==="function")){return true;}}return false;};var _1c=function(_1d){return(typeof _1d==="function"||_1d instanceof Function);};var _1e=function(_1f){if(typeof _1f==="undefined"){return false;}return(_1f===null||typeof _1f==="object"||_1a(_1f)||_1c(_1f));};var _20=function(_21){if(_21===undefined||_21===null||_21===""){return false;}else{return true;}};var _22=function(_23){return(typeof _23==="string"||_23 instanceof String);};var _24=function(arr,_26){if(arr&&arr.length){for(var i=0,il=arr.length;i<il;i++){if(arr[i]===_26){return i;}}}return-1;};var _29=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 _34=it.split("=");var _35=dec(_34.shift());var val=dec(_34.join("="));if(_20(q[_35])){q[_35]=[q[_35]];}if(_1a(q[_35])){q[_35].push(val);}else{q[_35]=val;}}}}return ret;};var _37=function(url,_39){var tok=_39.token;if(_20(tok)){url+=("?token="+encodeURIComponent(tok));}return url;};var _3b=function(_3c){var _3d=0;var _3e=_3c.length;var p1,p2;for(var i=0;i<_3e;i++){p1=_3c[i];p2=_3c[(i+1)%_3e];_3d+=((p1[0]*p2[1])-(p2[0]*p1[1]));}if((_3d/2)>0){return _3c.reverse();}return _3c;};var _42=function(obj){if(obj){for(var x in obj){if(obj.hasOwnProperty(x)){return true;}}}return false;};var _45=function(obj){var _47;if(!obj){return obj;}if(_1a(obj)){_47=[];for(var i=0,il=obj.length;i<il;i++){_47.push(_45(obj[i]));}return _47;}else{if(_1e(obj)){_47=new obj.constructor();for(var x in obj){if(!(x in _47)||_47[x]!==obj[x]){_47[x]=_45(obj[x]);}}return _47;}}return obj;};var _4b=function(_4c,_4d){var _4e="";if(_4c===_6){for(var x in _4d){if(_4d.hasOwnProperty(x)){_4e+=("<b>"+x+": </b>"+_4d[x]+"<br/>");}}}else{_4e=_4c.replace(/\{([^\s\:\}]+)\}/g,function(_50,key){var _52=_4d[key];if(_52===undefined||_52===null){_52=_50;}return _52;});}return _4e;};var _53=function(_54){var _55={gmapsType:null,esriType:null};var gm=null,es=null;if(_54 instanceof GLatLng){gm="GLatLng";es="esriGeometryPoint";}else{if(_54 instanceof GMarker){gm="GMarker";es="esriGeometryPoint";}else{if(_54 instanceof GLatLngBounds){gm="GLatLngBounds";es="esriGeometryEnvelope";}else{if(_54 instanceof GPolyline){gm="GPolyline";es="esriGeometryPolyline";}else{if(_54 instanceof GPolygon){gm="GPolygon";es="esriGeometryPolygon";}else{if(_1a(_54)){_55=_53(_54[0]);if(_55.gmapsType){_55.gmapsType+="[]";if(_55.esriType==="esriGeometryPoint"){_55.esriType="esriGeometryMultipoint";}}return _55;}}}}}}_55.gmapsType=gm;_55.esriType=es;return _55;};var _58=function(){var _59=6378137;var _PI=Math.PI;var _5b=57.29577951308232;var _5c=0.017453292519943;var _5d=function(rad){return rad*_5b;};var _5f=function(deg){return deg*_5c;};return{xToLng:function(x){var _62=x/_59;var _63=_5d(_62);var _64=Math.floor((_63+180)/360);var lng=_63-(_64*360);return lng;},yToLat:function(y){var _67=(_PI/2)-(2*Math.atan(Math.exp(-1*y/_59)));var _68=_5d(_67);return _68;},lngToX:function(lng){return _5f(lng)*_59;},latToY:function(lat){var _6b=_5f(lat);var y=_59/2*Math.log((1+Math.sin(_6b))/(1-Math.sin(_6b)));return y;}};}();var _6d=function(_6e){return"{"+"x:"+_6e.lng()+",y:"+_6e.lat()+",spatialReference:{wkid:"+_4+"}"+"}";};var _6f=function(_70){var loc;var _72=[];for(var i=0,_74=_70.length;i<_74;i++){loc=_70[i];_72.push("["+loc.lng()+","+loc.lat()+"]");}return"{points:["+_72.join(",")+"],spatialReference:{wkid:"+_4+"}}";};var _75=function(_76){return _6d(_76.getLatLng());};var _77=function(_78){var loc,_7a=[];for(var i=0,_7c=_78.length;i<_7c;i++){loc=_78[i].getLatLng();_7a.push("["+loc.lng()+","+loc.lat()+"]");}return"{points:["+_7a.join(",")+"],spatialReference:{wkid:"+_4+"}}";};var _7d=function(_7e){var sw=_7e.getSouthWest();var ne=_7e.getNorthEast();return"{"+"xmin:"+sw.lng()+",ymin:"+sw.lat()+",xmax:"+ne.lng()+",ymax:"+ne.lat()+",spatialReference:{wkid:"+_4+"}"+"}";};var _81={};var _82,_83;if(_f){_81.getLatLngsAsync=function(_84,_85){var in1=[];for(var i=0,il=_84.length;i<il;i++){in1.push(_84[i]);in1.push("getPoint");}in1.push(function(){var _89=[];for(var j=0,jl=arguments.length;j<jl;j++){_89.push(arguments[j]);}_85(_89);});GAsync.apply(null,in1);};_81._markerToJsonTextAsync=function(_8c,_8d){_81.getLatLngsAsync([_8c],function(_8e){_8d(_6d(_8e[0]));});};_81._markersToJsonTextAsync=function(_8f,_90){_81.getLatLngsAsync(_8f,function(_91){var loc,_93=[];for(var i=0,_95=_91.length;i<_95;i++){loc=_91[i];_93.push("["+loc.lng()+","+loc.lat()+"]");}_90("{points:["+_93.join(",")+"],spatialReference:{wkid:"+_4+"}}");});};_81._getVerticesAsync=function(_96,_97){var in1=[];for(var i=0,il=_96.length;i<il;i++){in1.push(_96[i]);in1.push("getVertexCount");}in1.push(function(){var in2=[],_9c=[],_9d,j,k,jl;for(j=0,jl=arguments.length;j<jl;j++){_9d=arguments[j];_9c.push(_9d);for(k=0;k<_9d;k++){in2.push(_96[j]);in2.push("getVertex");in2.push([k]);}}in2.push(function(){var _a1=[],_a2=null;var _a3=0,cnt,x,y,xl;for(x=0,xl=_9c.length;x<xl;x++){cnt=_9c[x];_a2=[];for(y=_a3;y<_a3+cnt;y++){_a2.push(arguments[y]);}_a1.push(_a2);_a3+=cnt;}_97(_a1);});GAsync.apply(null,in2);});GAsync.apply(null,in1);};_81._polylinesToJsonTextAsync=function(_a8,_a9){_81._getVerticesAsync(_a8,function(_aa){var _ab,vtx,_ad,_ae=[];for(var i=0,il=_aa.length;i<il;i++){_ad=_aa[i];_ab=[];for(var j=0,jl=_ad.length;j<jl;j++){vtx=_ad[j];_ab.push("["+vtx.lng()+","+vtx.lat()+"]");}_ae.push("["+_ab.join(",")+"]");}_a9("{paths:["+_ae.join(",")+"],spatialReference:{wkid:"+_4+"}}");});};_81._polygonsToJsonTextAsync=function(_b3,_b4){_81._getVerticesAsync(_b3,function(_b5){var _b6,vtx,_b8,_b9=[];for(var i=0,il=_b5.length;i<il;i++){_b8=_b5[i];_b6=[];for(var j=0,jl=_b8.length;j<jl;j++){vtx=_b8[j];_b6.push("["+vtx.lng()+","+vtx.lat()+"]");}_b9.push("["+_b6.join(",")+"]");}_b4("{rings:["+_b9.join(",")+"],spatialReference:{wkid:"+_4+"}}");});};}else{_82=function(_be){var vtx;var _c0,_c1;var _c2=[];for(var i=0,_c4=_be.length;i<_c4;i++){_c1=_be[i];_c0=[];for(var j=0,_c6=_c1.getVertexCount();j<_c6;j++){vtx=_c1.getVertex(j);_c0.push("["+vtx.lng()+","+vtx.lat()+"]");}_c2.push("["+_c0.join(",")+"]");}return"{paths:["+_c2.join(",")+"],spatialReference:{wkid:"+_4+"}}";};_83=function(_c7){var vtx;var _c9,_ca;var _cb=[];for(var i=0,_cd=_c7.length;i<_cd;i++){_ca=_c7[i];_c9=[];for(var j=0,_cf=_ca.getVertexCount();j<_cf;j++){vtx=_ca.getVertex(j);_c9.push("["+vtx.lng()+","+vtx.lat()+"]");}_cb.push("["+_c9.join(",")+"]");}return"{rings:["+_cb.join(",")+"],spatialReference:{wkid:"+_4+"}}";};}var _d0=function(_d1,_d2,_d3){var _d4="";switch(_d2){case"GLatLng":_d4=_6d(_d1);break;case"GLatLng[]":_d4=_6f(_d1);break;case"GMarker":if(_d3){_81._markerToJsonTextAsync(_d1,_d3);return;}else{_d4=_75(_d1);}break;case"GMarker[]":if(_d3){_81._markersToJsonTextAsync(_d1,_d3);return;}else{_d4=_77(_d1);}break;case"GLatLngBounds":_d4=_7d(_d1);break;case"GPolyline":if(_d3){_81._polylinesToJsonTextAsync([_d1],_d3);return;}else{_d4=_82([_d1]);}break;case"GPolyline[]":if(_d3){_81._polylinesToJsonTextAsync(_d1,_d3);return;}else{_d4=_82(_d1);}break;case"GPolygon":if(_d3){_81._polygonsToJsonTextAsync([_d1],_d3);return;}else{_d4=_83([_d1]);}break;case"GPolygon[]":if(_d3){_81._polygonsToJsonTextAsync(_d1,_d3);return;}else{_d4=_83(_d1);}break;default:throw new Error("_geometryToJsonText(): unsupported geometry type - supported types are GLatLng, GLatLng[], GMarker, GMarker[], GLatLngBounds, GPolyline, GPolyline[], GPolygon, GPolygon[]");}if(_d3){_d3(_d4);}else{return _d4;}};var _d5;var _d6=function(arr){var _d8=[];var val,enc=encodeURIComponent;if(arr._AG_){var _db=arr._PT_?arr[0]:arr;return _d0(_db,_53(_db).gmapsType);}for(var x=0,xl=arr.length;x<xl;x++){val=arr[x];if(_20(val)&&typeof val!=="function"){if(_1a(val)){val._AG_=arr._AAG_;_d8.push(_d6(val));}else{if(typeof val==="object"){val._AG_=arr._AAG_;_d8.push(_d5(val));}else{_d8.push(enc(_22(val)?("\""+val+"\""):val));}}}}return"["+_d8.join(",")+"]";};var _de;_d5=function(obj){var _e0=[];var val,enc=encodeURIComponent;if(obj._AG_){return _d0(obj,_53(obj).gmapsType);}else{if(obj instanceof _de){var _e3=obj.features,_e4=obj.geometryType||"",_e5,_e6,len,b;if(_1a(_e3)){for(b=0;b<_e3.length;b++){_e5=_e3[b];_e6=_e5.geometry;len=_e6.length;if(_e5&&_e6){_e6._AG_=true;if(_e4!=="esriGeometryMultipoint"&&_e4==="esriGeometryPoint"||len===1){_e6._PT_=true;}}}}}}for(var x in obj){if(obj.hasOwnProperty(x)){val=obj[x];if(_20(val)&&typeof val!=="function"){if(_1a(val)){_e0.push(x+":"+_d6(val));}else{if(typeof val==="object"){_e0.push(x+":"+_d5(val));}else{_e0.push(x+":"+enc(_22(val)?("\""+val+"\""):val));}}}}}return"{"+_e0.join(",")+"}";};var _ea=function(_eb){var _ec=[];var val,enc=encodeURIComponent;for(var x in _eb){if(_eb.hasOwnProperty(x)){val=_eb[x];if(_20(val)&&typeof val!=="function"){if(_1a(val)){if(_20(val[0])&&typeof val[0]!=="function"&&typeof val[0]==="object"){_ec.push(x+"="+_d6(val));}else{_ec.push(x+"="+enc(val.join(",")));}}else{if(typeof val==="object"){_ec.push(x+"="+_d5(val));}else{_ec.push(x+"="+enc(val));}}}}}return _ec.join("&");};if(_f){_81._arrayToJsonTextAsync=function(arr,_f1){var _f2=[];var _f3=[];var val,enc=encodeURIComponent;if(arr._AG_){var _f6=arr._PT_?arr[0]:arr;_d0(_f6,_53(_f6).gmapsType,_f1);return;}for(var x=0,xl=arr.length;x<xl;x++){val=arr[x];if(_20(val)&&typeof val!=="function"){if(_1a(val)){val._AG_=arr._AAG_;_f3.push(_81);_f3.push("_arrayToJsonText");_f3.push([val]);}else{if(typeof val==="object"){val._AG_=arr._AAG_;_f3.push(_81);_f3.push("_objectToJsonText");_f3.push([val]);}else{_f2.push(enc(_22(val)?("\""+val+"\""):val));}}}}if(_f3.length>0){_f3.push(function(){for(var i=0,il=arguments.length;i<il;i++){_f2.push(arguments[i]);}_f1("["+_f2.join(",")+"]");});GAsync.apply(null,_f3);}else{_f1("["+_f2.join(",")+"]");}};_81._objectToJsonTextAsync=function(obj,_fc){var _fd=[];var _fe=[],_ff=[];var val,enc=encodeURIComponent;if(obj._AG_){_d0(obj,_53(obj).gmapsType,_fc);return;}else{if(obj instanceof _de){var _102=obj.features,type=obj.geometryType||"",_104,geom,len,b;if(_1a(_102)){for(b=0;b<_102.length;b++){_104=_102[b];geom=_104.geometry;len=geom.length;if(_104&&geom){geom._AG_=true;if(type!=="esriGeometryMultipoint"&&type==="esriGeometryPoint"||len===1){geom._PT_=true;}}}}}}for(var x in obj){if(obj.hasOwnProperty(x)){val=obj[x];if(_20(val)&&typeof val!=="function"){if(_1a(val)){_fe.push(_81);_fe.push("_arrayToJsonText");_fe.push([val]);_ff.push(x);}else{if(typeof val==="object"){_fe.push(_81);_fe.push("_objectToJsonText");_fe.push([val]);_ff.push(x);}else{_fd.push(x+":"+enc(_22(val)?("\""+val+"\""):val));}}}}}if(_fe.length>0){_fe.push(function(){for(var i=0,il=_ff.length;i<il;i++){_fd.push(_ff[i]+":"+arguments[i]);}_fc("{"+_fd.join(",")+"}");});GAsync.apply(null,_fe);}else{_fc("{"+_fd.join(",")+"}");}};_81._parametersToJsonTextAsync=function(_10b,_10c){var _10d=[];var args=[],_10f=[];var val,enc=encodeURIComponent;for(var x in _10b){if(_10b.hasOwnProperty(x)){val=_10b[x];if(_20(val)&&typeof val!=="function"){if(_1a(val)){if(_20(val[0])&&typeof val[0]!=="function"&&typeof val[0]==="object"){args.push(_81);args.push("_arrayToJsonText");args.push([val]);_10f.push(x);}else{_10d.push(x+"="+enc(val.join(",")));}}else{if(typeof val==="object"){args.push(_81);args.push("_objectToJsonText");args.push([val]);_10f.push(x);}else{_10d.push(x+"="+enc(val));}}}}}if(args.length>0){args.push(function(){for(var i=0,il=_10f.length;i<il;i++){_10d.push(_10f[i]+"="+arguments[i]);}_10c(_10d.join("&"));});GAsync.apply(null,args);}else{_10c(_10d.join("&"));}};}var _115=function(json){return new GMarker(new GLatLng(json.y,json.x));};var _117=function(json){return[new GMarker(new GLatLng(json.y,json.x))];};var _119=function(json){var _11b=json.points;var pt;var _11d=[];for(var i=0,npts=_11b.length;i<npts;i++){pt=_11b[i];_11d[i]=new GMarker(new GLatLng(pt[1],pt[0]));}return _11d;};var _120=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],_10.polygonStrokeColor,_10.polygonStrokeWeight,_10.polygonStrokeOpacity,_10.polygonFillColor,_10.polygonFillOpacity);return[poly];};var _127=function(json,_129){var xmin=json.xmin,ymin=json.ymin;var xmax=json.xmax,ymax=json.ymax;var _12e=_58.xToLng;var _12f=_58.yToLat;if(_129){xmin=_12e(xmin);ymin=_12f(ymin);xmax=_12e(xmax);ymax=_12f(ymax);}var sw=new GLatLng(ymin,xmin);var ne=new GLatLng(ymax,xmax);var _132=new GLatLngBounds(sw,ne);return _132;};var _133=function(json){var _135=json.paths;var _136,_137,_138,pt;_138=[];for(var i=0,nseg=_135.length;i<nseg;i++){_136=_135[i];_137=[];for(var j=0,npts=_136.length;j<npts;j++){pt=_136[j];_137[j]=new GLatLng(pt[1],pt[0]);}_138[i]=new GPolyline(_137,_10.polylineStrokeColor,_10.polylineStrokeWeight,_10.polylineStrokeOpacity);}return _138;};var _13e=function(json){var _140=json.rings;var _141,_142,_143,pt;_143=[];for(var i=0,nseg=_140.length;i<nseg;i++){_141=_140[i];_142=[];for(var j=0,npts=_141.length;j<npts;j++){pt=_141[j];_142[j]=new GLatLng(pt[1],pt[0]);}_143[i]=new GPolygon(_142,_10.polygonStrokeColor,_10.polygonStrokeWeight,_10.polygonStrokeOpacity,_10.polygonFillColor,_10.polygonFillOpacity);}return _143;};var _149=function(_14a,html,_14c,_14d,map){if(_14d&&html){if(_14a.openInfoWindow){if(_1a(html)){GEvent.addListener(_14a,"click",function(){_14a.openInfoWindowTabsHtml(html,_14c);});}else{GEvent.addListener(_14a,"click",function(){_14a.openInfoWindowHtml(html,_14c);});}}else{if(_1a(html)){GEvent.addListener(_14a,"click",function(_14f){map.openInfoWindowTabsHtml(_14f,html,_14c);});}else{GEvent.addListener(_14a,"click",function(_150){map.openInfoWindowHtml(_150,html,_14c);});}}}map.addOverlay(_14a);};var _151=function(_152,type){var line=(type==="GPolyline[]")?true:false;var _155={stc:(_152&&_152.strokeColor!==undefined)?_152.strokeColor:(line)?_10.polylineStrokeColor:_10.polygonStrokeColor,stw:(_152&&_152.strokeWeight!==undefined)?_152.strokeWeight:(line)?_10.polylineStrokeWeight:_10.polygonStrokeWeight,sto:(_152&&_152.strokeOpacity!==undefined)?_152.strokeOpacity:(line)?_10.polylineStrokeOpacity:_10.polygonStrokeOpacity,fic:(_152&&_152.fillColor!==undefined)?_152.fillColor:_10.polygonFillColor,fio:(_152&&_152.fillOpacity!==undefined)?_152.fillOpacity:_10.polygonFillOpacity};return _155;};var _156,_157,_158;if(_f){_81._createAddMarkersAsync=function(_159,_15a,_15b,_15c,map,_15e){var args=[];for(var i=0,il=_159.length;i<il;i++){args.push(_159[i]);args.push("getPoint");}args.push(function(){var _162=[],mark,opts,_165=_15c.attr,iw=_15c.meta.flags.clickable,html=_15c.html;for(var j=0,jl=arguments.length;j<jl;j++){opts=_45(_15a.markerOptions);if(opts&&opts.title){opts.title=_4b(opts.title,_165);}mark=new GMarker(arguments[j],opts);_149(mark,html,_15b,iw,map);_162.push(mark);}_15e(_162);});GAsync.apply(null,args);};_81._createAddPolylinesAsync=function(_16a,_16b,_16c,_16d,map,_16f){_81._getVerticesAsync(_16a,function(_170){var _171=[],poly,i,il,_175=_16d.meta.style,iw=_16d.meta.flags.clickable,html=_16d.html;var opts=_16b.polylineOptions;for(i=0,il=_170.length;i<il;i++){poly=new GPolyline(_170[i],_175.stc,_175.stw,_175.sto,opts);_149(poly,html,_16c,iw,map);_171.push(poly);}_16f(_171);});};_81._createAddPolygonsAsync=function(_179,_17a,_17b,_17c,map,_17e){_81._getVerticesAsync(_179,function(_17f){var _180=[],poly,i,il,_184=_17c.meta.style,iw=_17c.meta.flags.clickable,html=_17c.html;var opts=_17a.polylineOptions;for(i=0,il=_17f.length;i<il;i++){poly=new GPolygon(_17f[i],_184.stc,_184.stw,_184.sto,_184.fic,_184.fio,opts);_149(poly,html,_17b,iw,map);_180.push(poly);}_17e(_180);});};}else{_156=function(_188,_189,_18a,_18b,map){var _18d=[],mark,opts,i,il,_192=_18b.attr,iw=_18b.meta.flags.clickable,html=_18b.html;for(i=0,il=_188.length;i<il;i++){opts=_45(_189.markerOptions);if(opts&&opts.title){opts.title=_4b(opts.title,_192);}mark=new GMarker(_188[i].getLatLng(),opts);_149(mark,html,_18a,iw,map);_18d.push(mark);}return _18d;};_157=function(_195,_196,_197,_198,map){var _19a=[],_19b,poly,opts,_19e,i,il,j,jl,_1a3=_198.meta.style,iw=_198.meta.flags.clickable,html=_198.html;opts=_196.polylineOptions;for(i=0,il=_195.length;i<il;i++){_19b=_195[i];_19e=[];for(j=0,jl=_19b.getVertexCount();j<jl;j++){_19e.push(_19b.getVertex(j));}poly=new GPolyline(_19e,_1a3.stc,_1a3.stw,_1a3.sto,opts);_149(poly,html,_197,iw,map);_19a.push(poly);}return _19a;};_158=function(_1a6,_1a7,_1a8,_1a9,map){var _1ab=[],_1ac,poly,opts,_1af,i,il,j,jl,_1b4=_1a9.meta.style,iw=_1a9.meta.flags.clickable,html=_1a9.html;opts=_1a7.polygonOptions;for(i=0,il=_1a6.length;i<il;i++){_1ac=_1a6[i];_1af=[];for(j=0,jl=_1ac.getVertexCount();j<jl;j++){_1af.push(_1ac.getVertex(j));}poly=new GPolygon(_1af,_1b4.stc,_1b4.stw,_1b4.sto,_1b4.fic,_1b4.fio,opts);_149(poly,html,_1a8,iw,map);_1ab.push(poly);}return _1ab;};}var _1b7=function(_1b8,_1b9){if(_1a(_1b8)){var tab,_1bb,_1bc;var tabs=[];for(var i=0,ilen=_1b8.length;i<ilen;i++){tab=_1b8[i];_1bb=_4b(tab.label,_1b9);_1bc=_4b(tab.content,_1b9);tabs[i]=new GInfoWindowTab(_1bb,_1bc);}return tabs;}else{return _4b(_1b8,_1b9);}};var _1c0=function(_1c1,_1c2,_1c3,meta,map,_1c6){var geom=_1c1.geometry;var attr=_1c1.attributes;var type=meta.type;var _1ca=meta.flags;var iwc,_1cc;if(_1c3){iwc=_1c3.content;_1cc=_1c3.contentTabs;}var _1cd={attr:attr,html:_1b7((iwc||_1cc||_6),attr),meta:meta};var ovs,_1cf=false;switch(type){case"GMarker[]":if(_1ca.marker){if(_1c6){_81._createAddMarkersAsync(geom,_1c2,_1c3,_1cd,map,_1c6);return;}else{ovs=_156(geom,_1c2,_1c3,_1cd,map);}}else{ovs=geom;_1cf=true;}break;case"GPolyline[]":if(_1ca.newpolyline){if(_1c6){_81._createAddPolylinesAsync(geom,_1c2,_1c3,_1cd,map,_1c6);return;}else{ovs=_157(geom,_1c2,_1c3,_1cd,map);}}else{_1cf=true;ovs=geom;}break;case"GPolygon[]":if(_1ca.newpolygon){if(_1c6){_81._createAddPolygonsAsync(geom,_1c2,_1c3,_1cd,map,_1c6);return;}else{ovs=_158(geom,_1c2,_1c3,_1cd,map);}}else{_1cf=true;ovs=geom;}break;}if(_1cf){for(var i=0,il=ovs.length;i<il;i++){_149(ovs[i],_1cd.html,_1c3,_1ca.clickable,map);}}if(_1c6){_1c6(ovs);}else{return ovs;}};_81._addCustomOverlaysAsync=_1c0;var _1d2=function(_1d3,type){var _1d5,_1d6,_1d7,_1d8,_1d9;_1d5=_1d6=_1d7=_1d8=_1d9=false;var _1da=true;if(_1d3){var fco=_1d3.fillColor;var fop=_1d3.fillOpacity;var sco=_1d3.strokeColor;var swt=_1d3.strokeWeight;var sop=_1d3.strokeOpacity;var mop=_1d3.markerOptions;var plop=_1d3.polylineOptions;var pgop=_1d3.polygonOptions;_1d5=(fco||fop)?true:false;_1d6=(sco||swt||sop)?true:false;_1d7=(mop&&_42(mop))?true:false;_1d8=(plop&&_42(plop))?true:false;_1d9=(pgop&&_42(pgop))?true:false;if(_1d7&&_20(mop.clickable)){_1da=mop.clickable;}if(_1d8&&_20(plop.clickable)){_1da=plop.clickable;}if(_1d9&&_20(pgop.clickable)){_1da=pgop.clickable;}}var _1e3={fill:_1d5,stroke:_1d6,marker:_1d7,polyline:_1d8,polygon:_1d9,clickable:(_f&&(type==="GPolyline[]"||type==="GPolygon[]"))?false:_1da,newpolyline:_1d6||_1d8,newpolygon:_1d6||_1d5||_1d9};return _1e3;};var _1e4=function(){var purl=_10.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 _29(purl);};var _1e6=function(url){if(_10.alwaysUseProxy){var uo=_1e4();var _url=_29(url);var p1=_ea(uo.query);var p2=_ea(_url.query);p1=p1&&("?"+p1);p2=p2&&(((p1&&"&")||("?"))+p2);url=uo.path+"?"+_url.path+p1+p2;}return url;};var _1ec=function(){var _1ed=[];var _1ee="ArcGISJsonScript_";var _1ef="ArcGISJson_";var _1f0="ArcGISKmz_";var _1f1=2000;var _1f2=function(id){delete _1ed[id];};var _1f4=function(url,_1f6){this.url=url;this.handler=_1f6;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);};_1f4.prototype.send=function(_1fa){this._xhr.setRequestHeader("Content-Type","application/x-www-form-urlencoded");this._xhr.send(_1fa);};_1f4.prototype._callback=function(){var req=this._xhr;if(req.readyState===4){this.handler(_17(req.responseText));}};_1f4.prototype.cancel=function(){this._xhr.abort();};var _1fc=function(id,url,_1ff){this.id=_1ef+id;this.url=url;this.handler=_1ff;this._id=id;};_1fc.prototype.send=function(_200){var plen=_200.length+this.url.length;if(plen>_1f1||_10.alwaysUseProxy){var uo=_1e4();var p1=_ea(uo.query);p1=p1&&((_200&&"&")+p1);var self=this;this._xhr=new _1f4(uo.path+"?"+this.url,function(){self._callback.call(self,arguments[0]);});this._xhr.send(_200+p1+"&f=json");}else{var el=document.createElement("script");el.id=(this.scriptId=_1ee+this._id);el.type="text/javascript";el.src=this.url+"?"+_200+"&f=json"+"&callback=esri.arcgis.gmaps._RestRequest._requestQueue."+this.id+"._callback";document.getElementsByTagName("head").item(0).appendChild(el);}};_1fc.prototype._callback=function(_206){this._cleanup();if(this.cancelled){return;}var err=_206.error||null;if(err){_206=null;}this.handler.call(null,_206,err);};_1fc.prototype._cleanup=function(){if(this.scriptId){var el=document.getElementById(this.scriptId);el.parentNode.removeChild(el);}_1f2(this.id);};_1fc.prototype.cancel=function(){if(!this.cancelled){this.cancelled=true;var xhr=this._xhr;if(xhr){xhr.cancel();this._cleanup();}}};var _20a=function(id,url,_20d){this.id=_1f0+id;this.url=url;this.handler=_20d;};_20a.prototype.send=function(_20e){var self=this;var _210=null;var _cb=function(){self._callback.call(self,_210);};_210=new GGeoXml(this.url+"?"+_20e+"&f=kmz",_cb);if(_f){_cb();}};_20a.prototype._callback=function(_212){this._cleanup();if(this.cancelled){return;}if(_e){if(!_212.hasLoaded()){throw new Error("GGeoXml object could not finish loading the KML file");}else{if(!_212.loadedCorrectly()){throw new Error("GGeoXml object could not load the KML file correctly");}}}this.handler.call(null,_212,null);};_20a.prototype._cleanup=function(){_1f2(this.id);};_20a.prototype.cancel=function(){if(!this.cancelled){this.cancelled=true;}};return{_requestQueue:_1ed,create:function(url,_214,_215){var nid=Math.random().toString(10).substring(2);var jh=null;switch(_215){case _8:jh=new _1fc(nid,url,_214);_1ed[_1ef+nid]=jh;break;case _7:jh=new _20a(nid,url,_214);_1ed[_1f0+nid]=jh;break;default:throw new Error("_RestRequest.create(): The requested REST response format '"+_215+"' is not supported. Supported formats are: json, kmz");}return jh;},handle:function(url,op,_21a,_21b,_21c,_21d,_21e,_21f){if(!_21b){_21b="";}if(!op){op="";}var uo=_29(url);url=uo.path+"/"+op;var p3=_ea(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(_21f);_21e.apply(_21d,args);};var req=_1ec.create(url,_h,_21c);if(req){var _cb=function(text){var par=text+_21b+p3;par=(par.indexOf("&")===0)?((par.length!==1)?par.substring(1):""):par;req.send(par);};if(_e){_cb(_ea(_21a));}else{_81._parametersToJsonTextAsync(_21a,_cb);}}return req;},cancel:function(_22a){_22a.cancel();}};}();var _22b={INTERSECTS:"esriSpatialRelIntersects",CONTAINS:"esriSpatialRelContains",CROSSES:"esriSpatialRelCrosses",ENVELOPE_INTERSECTS:"esriSpatialRelEnvelopeIntersects",INDEX_INTERSECTS:"esriSpatialRelIndexIntersects",OVERLAPS:"esriSpatialRelOverlaps",TOUCHES:"esriSpatialRelTouches",WITHIN:"esriSpatialRelWithin"};var _22c=function(){this.queryGeometry=null;this.outFields=null;this.returnGeometry=true;this.spatialRelationship=_22b.INTERSECTS;this.text=null;this.where=null;};var _22d=function(){this.attributes=null;this.geometry=null;};_de=function(){this.displayFieldName=null;this.features=null;this.geometryType=null;this.spatialReference={"wkid":_4};this.fieldAliases=null;};var _22e=function(json,type){var conv,geom,_233;switch(type){case"esriGeometryPoint":conv=_117;break;case"esriGeometryMultipoint":conv=_119;break;case"esriGeometryEnvelope":conv=_120;break;case"esriGeometryPolyline":conv=_133;break;case"esriGeometryPolygon":conv=_13e;break;}_233=new _22d();_233.attributes=json.attributes;geom=json.geometry;_233.geometry=(geom&&conv)?conv(geom):null;return _233;};var _234=function(json){var fset=new _de();fset.displayFieldName=json.displayFieldName;var type=(fset.geometryType=json.geometryType);var sr=json.spatialReference;fset.spatialReference=(sr)?{"wkid":sr.wkid}:null;fset.fieldAliases=json.fieldAliases;var _239=(fset.features=[]);var _23a=json.features;var _23b;if(_23a){for(var i=0,flen=_23a.length;i<flen;i++){_23b=_23a[i];_239.push(_22e(_23b,type));}}return fset;};var _23e=function(url){this.url=url;};_23e.prototype.execute=function(_240,_241,_242){if(!_240){throw new Error("QueryTask.execute(): 'parameters' argument is required");}var geom=_240.queryGeometry;var txt=_240.text;var _245=_240.where;if(!(_20(geom)||_20(txt)||_20(_245))){throw new Error("QueryTask.execute(): 'Query' must have value for atleast one of 'queryGeometry', 'text', 'where' properties");}var _246={geometryType:_53(geom).esriType,geometry:geom,inSR:_4,outSR:_4,spatialRel:_240.spatialRelationship,returnGeometry:_240.returnGeometry,text:txt,where:_245,outFields:_240.outFields};if(geom){_246.geometry._AG_=true;}_1ec.handle(this.url,"query",_246,null,((_241)?_7:_8),this,this._responseHandler,_242);};_23e.prototype._responseHandler=function(_247,_248,_249){var _24a=null;if(_247){if(_247 instanceof GGeoXml){_24a=_247;}else{_24a=_234(_247);}}_11(this,"executecomplete",_249,[_24a,_248]);};var _24b=function(){this.address=null;this.location=null;this.score=null;this.attributes=null;};var _24c=function(){this.addressCandidates=null;};var _24d=function(_24e){var _24f=new _22d();_24f.geometry=[_24e.location];var _250=(_24f.attributes={});var _251=_24e.address;if(typeof(_251)==="string"){_250.address=_251;}else{for(var x in _251){if(_251.hasOwnProperty(x)){_250[x]=_251[x];}}}var _253=_24e.attributes;if(_253){for(var y in _253){if(_253.hasOwnProperty(y)){_250[y]=_253[y];}}}_250.score=_24e.score;return _24f;};var _255=function(url){this.url=url;};_255.prototype.addressToLocations=function(_257,_258,_259,_25a){if(!_257){throw new Error("Locator.addressToLocations(): 'address' argument is required");}_257.outFields=_258;_1ec.handle(this.url,"findAddressCandidates",_257,null,((_259)?_7:_8),this,this._geocodeHandler,_25a);};_255.prototype.locationToAddress=function(_25b,_25c,_25d,_25e){if(!_25b){throw new Error("Locator.locationToAddress(): 'latlng' argument is required");}if(!_25c){throw new Error("Locator.locationToAddress(): 'distance' argument is required");}var _25f={location:_25b.lng()+","+_25b.lat(),distance:_25c};_1ec.handle(this.url,"reverseGeocode",_25f,null,((_25d)?_7:_8),this,this._reverseGeocodeHandler,_25e);};_255.prototype._geocodeHandler=function(_260,_261,_262){var _263=null;if(_260){if(_260 instanceof GGeoXml){_263=_260;}else{var _264=new _24c();var _265=(_264.addressCandidates=[]);var _266=_260.candidates;var _267,ac;for(var i=0,il=_266.length;i<il;i++){_267=_266[i];ac=new _24b();ac.address=_267.address;ac.location=_115(_267.location);ac.score=_267.score;ac.attributes=_267.attributes;_265.push(ac);}_263=_264;}}_11(this,"addresstolocationscomplete",_262,[_263,_261]);};_255.prototype._reverseGeocodeHandler=function(_26b,_26c,_26d){var _26e=null;if(_26b){if(_26b instanceof GGeoXml){_26e=_26b;}else{var _26f=new _24b();_26f.address=_26b.address;_26f.location=_115(_26b.location);_26f.score=100;_26e=_26f;}}_11(this,"locationtoaddresscomplete",_26d,[_26e,_26c]);};var _270=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 _271=function(){this.layerId=null;this.layerName=null;this.displayFieldName=null;this.feature=null;};var _272=function(){this.identifyResults=null;};var _273=function(url){this.url=url;};_273.prototype.execute=function(_275,_276){if(!_275){throw new Error("IdentifyTask.execute(): 'parameters' argument is required");}var geom=_275.geometry;var tol=_275.tolerance;var ext=_275.bounds;var w=_275.width;var h=_275.height;var dpi=_275.dpi;if(!(_20(geom)&&_20(tol)&&_20(ext)&&_20(w)&&_20(h)&&_20(dpi))){throw new Error("IdentifyTask.execute(): 'IdentifyParameters' must have value for the following properties: 'geometry', 'tolerance', 'bounds', 'width', 'height' and 'dpi'");}var _27d=_275.layerOption;var lids=_275.layerIds;if(lids){_27d+=(":"+lids.join(","));}var _27f={geometry:geom,geometryType:_53(geom).esriType,sr:_4,layers:_27d,tolerance:tol,mapExtent:ext,imageDisplay:w+","+h+","+dpi,returnGeometry:_275.returnGeometry};_27f.geometry._AG_=true;_27f.mapExtent._AG_=true;_1ec.handle(this.url,"identify",_27f,null,_8,this,this._responseHandler,_276);};_273.prototype._responseHandler=function(_280,_281,_282){var _283=null;if(_280){var _284=_280.results;_283=new _272();var _285=(_283.identifyResults=[]);var _286,_287;for(var i=0,il=_284.length;i<il;i++){_286=_284[i];_287=new _271();_287.layerId=_286.layerId;_287.layerName=_286.layerName;_287.displayFieldName=_286.displayFieldName;_287.feature=_22e({attributes:_286.attributes,geometry:_286.geometry},_286.geometryType);_285.push(_287);}}_11(this,"executecomplete",_282,[_283,_281]);};var _28a=function(){this.searchText=null;this.contains=true;this.searchFields=null;this.layerIds=null;this.returnGeometry=true;};var _28b=function(){this.layerId=null;this.layerName=null;this.displayFieldName=null;this.foundFieldName=null;this.feature=null;};var _28c=function(){this.findResults=null;};var _28d=function(url){this.url=url;};_28d.prototype.execute=function(_28f,_290){if(!_28f){throw new Error("FindTask.execute(): 'parameters' argument is required");}var txt=_28f.searchText;var lyrs=_28f.layerIds;if(!(_20(txt)&&_20(lyrs))){throw new Error("FindTask.execute(): 'FindParameters' must have value for the following properties: 'searchText' and 'layerIds'");}var _293={searchText:txt,contains:_28f.contains,searchFields:_28f.searchFields,sr:_4,layers:lyrs,returnGeometry:_28f.returnGeometry};_1ec.handle(this.url,"find",_293,null,_8,this,this._responseHandler,_290);};_28d.prototype._responseHandler=function(_294,_295,_296){var _297=null;if(_294){var _298=_294.results;_297=new _28c();var _299=(_297.findResults=[]);var _29a,fres;for(var i=0,il=_298.length;i<il;i++){_29a=_298[i];fres=new _28b();fres.layerId=_29a.layerId;fres.layerName=_29a.layerName;fres.displayFieldName=_29a.displayFieldName;fres.foundFieldName=_29a.foundFieldName;fres.feature=_22e({attributes:_29a.attributes,geometry:_29a.geometry},_29a.geometryType);_299.push(fres);}}_11(this,"executecomplete",_296,[_297,_295]);};var _29e={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 _29f=function(){this.geometries=null;this.inSpatialReference=null;this.outSpatialReference=null;this.geometryType=null;};var _2a0=function(){this.geometries=null;this.distances=null;this.unit=_29e.METER;this.unionResults=false;this.bufferSpatialReference=null;};var _2a1=function(){this.geometries1=null;this.geometries2=null;this.relation=null;this.comparisonString=null;};var _2a2={CROSS:"esriGeometryRelationCross",DISJOINT:"esriGeometryRelationDisjoint",IN:"esriGeometryRelationIn",INTERIOR_INTERSECTION:"esriGeometryRelationInteriorIntersection",INTERSECTION:"esriGeometryRelationIntersection",LINE_COINCIDENCE:"esriGeometryRelationLineCoincidence",LINE_TOUCH:"esriGeometryRelationLineTouch",OVERLAP:"esriGeometryRelationOverlap",POINT_TOUCH:"esriGeometryRelationPointTouch",TOUCH:"esriGeometryRelationTouch",WITHIN:"esriGeometryRelationWithin",RELATION:"esriGeometryRelationRelation"};var _2a3=function(){this.geometries=null;};var _2a4=function(){this.geometries=null;};var _2a5=function(){this.geometries=null;};var _2a6=function(url){this.url=url;};_2a6.ANGULAR_UNITS=[9101,9102,9103,9104,9105,9106,9109,9112,9113,9114];_2a6.prototype.project=function(_2a8,_2a9){if(!_2a8){throw new Error("Geometry.project(): 'parameters' argument is required");}var geom=_2a8.geometries;var _2ab=_53(geom[0]).esriType;var type=_2a8.geometryType||_2ab;var insr=_2a8.inSpatialReference;var _2ae=_2a8.outSpatialReference;if(!(_20(geom)&&_20(insr)&&_20(_2ae)&&_20(type))){throw new Error("Geometry.project(): 'parameters' must have value for the following properties: 'geometries', 'inSpatialReference', 'outSpatialReference' and 'geometryType'");}var _2af={geometries:{geometryType:type,geometries:geom},inSR:insr,outSR:_2ae};if(_2ab){_2af.geometries.geometries._AAG_=true;}_1ec.handle(this.url,"project",_2af,null,_8,this,this._projectHandler,[_2ae,type,_2a9]);};_2a6.prototype._projectHandler=function(_2b0,_2b1,_2b2){var _2b3=_2b2[0];var type=_2b2[1];var _2b5=_2b2[2];var _2b6=null;if(_2b0){var _2b7=_2b0.geometries;_2b6=new _2a3();if(_2b3===_4){var _2b8=(_2b6.geometries=[]);for(var i=0,il=_2b7.length;i<il;i++){_2b8.push(_22e({geometry:_2b7[i]},type).geometry);}}else{_2b6.geometries=_2b7;}}_11(this,"projectcomplete",_2b5,[_2b6,_2b1]);};_2a6.prototype.simplify=function(_2bb,_2bc){if(!_2bb){throw new Error("Geometry.simplify(): 'geometries' argument is required");}var _2bd=_53(_2bb[0]).esriType;var _2be={geometries:{geometryType:_2bd,geometries:_2bb},sr:_4};_2be.geometries.geometries._AAG_=true;_1ec.handle(this.url,"simplify",_2be,null,_8,this,this._simplifyHandler,[_2bd,_2bc]);};_2a6.prototype._simplifyHandler=function(_2bf,_2c0,_2c1){var type=_2c1[0];var _2c3=_2c1[1];var _2c4=null;if(_2bf){var _2c5=_2bf.geometries;_2c4=new _2a4();var _2c6=(_2c4.geometries=[]);for(var i=0,il=_2c5.length;i<il;i++){_2c6.push(_22e({geometry:_2c5[i]},type).geometry);}}_11(this,"simplifycomplete",_2c3,[_2c4,_2c0]);};_2a6.prototype.buffer=function(_2c9,_2ca){if(!_2c9){throw new Error("Geometry.buffer(): 'parameters' argument is required");}var geom=_2c9.geometries;var dt=_2c9.distances;if(!(_20(geom)&&_20(dt))){throw new Error("Geometry.buffer(): 'parameters' must have value for the following properties: 'geometries', 'distances'");}var unit=_2c9.unit;var _2ce={geometries:{geometryType:_53(geom[0]).esriType,geometries:geom},inSR:_4,bufferSR:_2c9.bufferSpatialReference||((_24(_2a6.ANGULAR_UNITS,unit)!==-1)?_4:_5),outSR:_4,distances:dt,unit:unit,unionResults:_2c9.unionResults};_2ce.geometries.geometries._AAG_=true;_1ec.handle(this.url,"buffer",_2ce,null,_8,this,this._bufferHandler,_2ca);};_2a6.prototype._bufferHandler=function(_2cf,_2d0,_2d1){var _2d2=null;if(_2cf){var _2d3=_2cf.geometries;_2d2=new _2a5();var _2d4=(_2d2.geometries=[]);for(var i=0,il=_2d3.length;i<il;i++){_2d4.push(_13e(_2d3[i]));}}_11(this,"buffercomplete",_2d1,[_2d2,_2d0]);};_2a6.prototype.getAreasAndLengths=function(_2d7,_2d8){if(!_2d7){throw new Error("Geometry.getAreasAndLengths(): 'polygons' argument is required");}var inSR,_2da=_2d7[0];if(_2da&&_2da.spatialReference){inSR=_2da.spatialReference.wkid;}else{inSR=_4;}var self=this;if(inSR!==_5){var _2dc=new _29f();_2dc.geometries=_2d7;_2dc.inSpatialReference=inSR;_2dc.outSpatialReference=_5;_2dc.geometryType="esriGeometryPolygon";this.project(_2dc,function(_2dd,_2de){if(_2de){throw new Error("Error "+_2de.code+": "+_2de.message+"("+_2de.details.join(",")+")");}self._areasAndLengths(_2dd.geometries,_2d8);});}else{this._areasAndLengths(_2d7,_2d8);}};_2a6.prototype._areasAndLengths=function(_2df,_2e0){var _2e1={polygons:_2df,sr:_5};_1ec.handle(this.url,"areasAndLengths",_2e1,null,_8,this,this._alHandler,_2e0);};_2a6.prototype._alHandler=function(_2e2,_2e3,_2e4){_11(this,"areasandlengthscomplete",_2e4,[_2e2,_2e3]);};_2a6.prototype.getLengths=function(_2e5,_2e6){if(!_2e5){throw new Error("Geometry.getLengths(): 'polylines' argument is required");}var inSR,_2e8=_2e5[0];if(_2e8&&_2e8.spatialReference){inSR=_2e8.spatialReference.wkid;}else{inSR=_4;}var self=this;if(inSR!==_5){var _2ea=new _29f();_2ea.geometries=_2e5;_2ea.inSpatialReference=inSR;_2ea.outSpatialReference=_5;_2ea.geometryType="esriGeometryPolyline";this.project(_2ea,function(_2eb,_2ec){if(_2ec){throw new Error("Error "+_2ec.code+": "+_2ec.message+"("+_2ec.details.join(",")+")");}self._lengths(_2eb.geometries,_2e6);});}else{this._lengths(_2e5,_2e6);}};_2a6.prototype._lengths=function(_2ed,_2ee){var _2ef={polylines:_2ed,sr:_5};_1ec.handle(this.url,"lengths",_2ef,null,_8,this,this._lHandler,_2ee);};_2a6.prototype._lHandler=function(_2f0,_2f1,_2f2){_11(this,"lengthscomplete",_2f2,[_2f0,_2f1]);};_2a6.prototype.getLabelPoints=function(_2f3,_2f4){if(!_2f3){throw new Error("Geometry.getLabelPoints(): 'polygons' argument is required");}var _2f5={polygons:_2f3,sr:_4};_2f5.polygons._AAG_=true;_1ec.handle(this.url,"labelPoints",_2f5,null,_8,this,this._lpHandler,_2f4);};_2a6.prototype._lpHandler=function(_2f6,_2f7,_2f8){var _2f9=null;if(_2f6){var _2fa=_2f6.labelPoints,_2fb=[],i;if(_2fa){for(i=0;i<_2fa.length;i++){_2fb[i]=_115(_2fa[i]);}}_2f9={labelPoints:_2fb};}_11(this,"labelpointscomplete",_2f8,[_2f9,_2f7]);};_2a6.prototype.relation=function(_2fd,_2fe){if(!_2fd){throw new Error("Geometry.relation(): 'parameters' argument is required");}var g1=_2fd.geometries1,g2=_2fd.geometries2,_301=_2fd.relation,_302=_2fd.comparisonString;if(!(_20(g1)&&_20(g2)&&_20(_301))){throw new Error("Geometry.relation(): 'parameters' must have value for the following properties: 'geometries1', 'geometries2', 'relation'");}if(_301===_2a2.RELATION&&!_20(_302)){throw new Error("Geometry.relation(): 'parameters' must have a valid 'comparisonString' property when 'relation' is RelationType.RELATION");}var _303={geometries1:{geometryType:_53(g1[0]).esriType,geometries:g1},geometries2:{geometryType:_53(g2[0]).esriType,geometries:g2},relation:_301,relationParam:_302,sr:_4};_303.geometries1.geometries._AAG_=_303.geometries2.geometries._AAG_=true;_1ec.handle(this.url,"relation",_303,null,_8,this,this._relHandler,_2fe);};_2a6.prototype._relHandler=function(_304,_305,_306){_11(this,"relationcomplete",_306,[_304,_305]);};var _307=function(){this.paramName=null;this.dataType=null;this.value=null;};var _308=function(){this.type=null;this.description=null;};var _309=function(){this.date=null;this.format=null;};var _30a=function(){this.distance=null;this.units=null;};var _30b=function(){this.url=null;};var _30c=function(){this.url=null;this.format=null;};var _30d=function(){this.href=null;this.width=null;this.height=null;this.bounds=null;this.scale=null;};var _30e=function(){this.results=null;this.messages=null;};var _30f=function(){this.jobId=null;this.jobStatus=null;this.messages=null;};var _310={CANCELLED:"esriJobCancelled",CANCELLING:"esriJobCancelling",DELETED:"esriJobDeleted",DELETING:"esriJobDeleting",EXECUTING:"esriJobExecuting",FAILED:"esriJobFailed",NEW:"esriJobNew",SUBMITTED:"esriJobSubmitted",SUCCEEDED:"esriJobSucceeded",TIMED_OUT:"esriJobTimedOut",WAITING:"esriJobWaiting"};var _311=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=_5;};var _312=function(_313,_314,_315,_316,_317){var _318=_313.layerOption;var lids=_313.layerIds;if(lids){_318+=(":"+lids.join(","));}else{_318="";}var bb=_314||_313.bounds;var _31b=_313.layerDefinitions,defs=[];for(var id in _31b){if(_31b.hasOwnProperty(id)&&id&&_31b[id]){defs.push(id+":"+_31b[id]);}}var _31e={bbox:bb,size:(_315||_313.width||400)+","+(_316||_313.height||400),dpi:_313.dpi,imageSR:(_313.imageSpatialReference||_5),bboxSR:_317?_5:_4,format:_313.format,transparent:_313.transparent,layers:_318,layerDefs:defs.join(";")};if(bb&&bb instanceof GLatLngBounds){_31e.bbox._AG_=true;}return _31e;};var _31f=function(json,_321){var mimg=new _30d();mimg.href=json.href;mimg.width=json.width;mimg.height=json.height;mimg.scale=json.scale;var _323=json.extent;if(_323){mimg.bounds=_127(_323,_321);}return mimg;};var _324=function(json){var out=[];var msg,_328;if(json&&json.length){for(var i=0,il=json.length;i<il;i++){msg=json[i];_328=new _308();_328.type=msg.type;_328.description=msg.description;out.push(_328);}}return out;};var _32b=function(type,json){if(_24(["GPBoolean","GPDouble","GPLong","GPString"],type)!==-1){return json;}var out=null;var mimg;switch(type){case"GPDate":out=new _309();out.date=json;out.format="dow mon dd hh:mm:ss zzz yyyy";break;case"GPLinearUnit":out=new _30a();out.distance=json.distance;out.units=json.units;break;case"GPDataFile":out=new _30b();out.url=json.url;break;case"GPRasterData":case"GPRasterDataLayer":mimg=json.mapImage;if(mimg){out=_31f(mimg);}else{out=new _30c();out.url=json.url;out.format=json.format;}break;case"GPRecordSet":case"GPFeatureRecordSetLayer":mimg=json.mapImage;if(mimg){out=_31f(mimg);}else{out=_234(json);}break;default:out=json;break;}return out;};var _330=function(url,_332){this.url=url;this._delay=(_332)?(_332.statusUpdateInterval||1000):1000;this._outSR=(_332)?(_332.outSpatialReference||_4):_4;this._processSR=_332&&_332.processSpatialReference;this._timers=[];};_330.prototype.execute=function(_333,_334,_335){if(!_333){throw new Error("Geoprocessor.execute(): 'parameters' argument is required");}_333["env:outSR"]=this._outSR;_333["env:processSR"]=this._processSR;_1ec.handle(this.url,"execute",_333,null,((_334)?_7:_8),this,this._executeHandler,_335);};_330.prototype._executeHandler=function(_336,_337,_338){var _339=null;if(_336){if(_336 instanceof GGeoXml){_339=_336;}else{var _33a=_336.results;var _33b=new _30e();var _33c=(_33b.results=[]);var res,pval,_33f;for(var i=0,il=_33a.length;i<il;i++){res=_33a[i];pval=new _307();pval.paramName=res.paramName;_33f=(pval.dataType=res.dataType);pval.value=_32b(_33f,res.value);_33c.push(pval);}_33b.messages=_324(_336.messages);_339=_33b;}}_11(this,"executecomplete",_338,[_339,_337]);};_330.prototype.submitJob=function(_342,_343,_344){if(!_342){throw new Error("Geoprocessor.submitJob(): 'parameters' argument is required");}_342["env:outSR"]=this._outSR;_342["env:processSR"]=this._processSR;_1ec.handle(this.url,"submitJob",_342,null,_8,this,this._jobHandler,[_344,_343,true]);};_330.prototype._jobHandler=function(_345,_346,_347){var cb=_347[0];var scb=_347[1];var _34a=_347[2];if(_346){_11(this,"jobstatusupdate",null,[null,_346]);if(_34a){_11(this,"jobcomplete",null,[null,_346]);}_11(null,null,scb,[null,_346]);if(_34a){_11(null,null,cb,[null,_346]);}return;}var ji=new _30f();var id=(ji.jobId=_345.jobId);var _34d=(ji.jobStatus=_345.jobStatus);ji.messages=_324(_345.messages);_11(this,"jobstatusupdate",null,[ji]);var done=false;if(_34a){this.cancelJobStatusUpdates(id);switch(_34d){case _310.SUBMITTED:case _310.EXECUTING:case _310.WAITING:case _310.NEW:var self=this;this._timers[id]=setTimeout(function(){self.checkJobStatus.call(self,id,cb,scb);},this._delay);break;default:done=true;_11(this,"jobcomplete",null,[ji]);break;}}_11(null,null,scb,[ji]);if(done){_11(null,null,cb,[ji]);}};_330.prototype.checkJobStatus=function(_350,_351){if(!_350){throw new Error("Geoprocessor.checkJobStatus(): 'jobId' argument is required");}var _352;if(arguments.length===3){_352=[_351,arguments[2],true];}else{_352=[null,_351,false];}_1ec.handle(this.url,"jobs/"+_350,{returnMessages:true},null,_8,this,this._jobHandler,_352);};_330.prototype.cancelJobStatusUpdates=function(_353){clearTimeout(this._timers[_353]);delete this._timers[_353];};_330.prototype.getResultData=function(_354,_355,_356,_357){if(!(_354&&_355)){throw new Error("Geoprocessor.getResultData(): 'jobId' and 'resultParameterName' arguments are required");}_1ec.handle(this.url,"jobs/"+_354+"/results/"+_355,{returnType:"data",outSR:_4},null,((_356)?_7:_8),this,this._resultDataHandler,_357);};_330.prototype._resultDataHandler=function(_358,_359,_35a){var _35b=null;if(_358){if(_358 instanceof GGeoXml){_35b=_358;}else{var out=new _307();out.paramName=_358.paramName;var _35d=(out.dataType=_358.dataType);out.value=_32b(_35d,_358.value);_35b=out;}}_11(this,"getresultdatacomplete",_35a,[_35b,_359]);};_330.prototype.getResultImage=function(_35e,_35f,_360,_361){if(!(_35e&&_35f)){throw new Error("Geoprocessor.getResultImage(): 'jobId' and 'resultParameterName' arguments are required");}var _362=_312(_360||new _311());_1ec.handle(this.url,"jobs/"+_35e+"/results/"+_35f,_362,null,_8,this,this._resultImageHandler,_361);};_330.prototype._resultImageHandler=function(_363,_364,_365){var mi=null;if(_363){var _367=_363.href?_363:_363.value.mapImage;var ext=_367.extent;var sr=(ext)?ext.spatialReference:null;mi=_31f(_367,((sr&&sr.wkid===102113)?true:false));}_11(this,"getresultimagecomplete",_365,[mi,_364]);};var _36a;_330.prototype.getResultImageLayer=function(_36b,_36c,_36d){if(!(_36b&&_36c)){throw new Error("Geoprocessor.getResultLayer(): 'jobId' and 'resultParameterName' arguments are required");}var uo=_29(this.url);var url=uo.path+"/jobs/"+_36b+"/results/"+_36c;url=_37(url,uo.query);return new _36a(url,_36d,1,null,true);};var _370=function(){this.id=null;this.name=null;this.parentLayerId=null;this.subLayerIds=null;this.defaultVisibility=null;};var _371=function(res,xmin,xmax,_375){if(!res){var _376=_58.lngToX;var x1=_376(xmin);var x2=_376(xmax);res=(x2-x1)/_375;}var _379,_37a,_37b,glev,gres,_37e,_37f;_379=_37a=-1;for(var i=0;i<=_c;i++){glev=i;gres=_d[i];if(res>=gres){_37a=glev;_379=_37a-1;break;}}if(_37a===-1){_37b=_c;}else{if(_379===-1){_37b=_b;}else{_37e=_d[_379]-res;_37f=res-_d[_37a];if(_37e<=_37f){_37b=_379;}else{_37b=_37a;}}}return _37b;};var _381=function(json){var _383=[];var lyr,_385;for(var i=0,il=json.length;i<il;i++){lyr=json[i];_385=new _370();_385.id=lyr.id;_385.name=lyr.name;_385.parentLayerId=lyr.parentLayerId;_385.subLayerIds=lyr.subLayerIds;_385.defaultVisibility=lyr.defaultVisibility;_383.push(_385);}return _383;};var _388=function(url,_38a,_38b){this.url=url;this.fullExtent=null;this.initialExtent=null;this.layerInfos=null;this.description=null;this.copyright=null;var _38c,opac,_38e,_38f;_38c=opac=_38e=_38f=null;if(_38a){_38c=_38a.copyrights;opac=_38a.opacity;_38e=_38a.minResolution;_38f=_38a.maxResolution;}this._options=_45(_38a);this._copyrights=_38c;this._opacity=(opac!==null)?opac:1;this._minZoomLevel=(this._minResolution=(_38e!==null)?_38e:_b);this._maxZoomLevel=(this._maxResolution=(_38f!==null)?_38f:_c);this._format=null;this._fileExtension=null;this._tileZoomLevels=null;_1ec.handle(url,null,null,null,_8,this,this._responseHandler,_38b);};if(_e){_388.prototype=new GTileLayer();}_388._BLANK_TILE="http://serverapi.arcgisonline.com/jsapi/gmaps/transparent.png";_388.prototype.getTileUrl=function(tile,zoom){var _392=_388._BLANK_TILE;if(zoom<this._minZoomLevel||zoom>this._maxZoomLevel){return _392;}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 _392;}var uo=_29(this.url);var url=uo.path+"/tile/"+this._tileZoomLevels[zoom]+"/"+ty+"/"+tx+"."+this._fileExtension;url=_37(url,uo.query);url=_1e6(url);return url;};_388.prototype.isPng=function(){return(this._fileExtension==="png")?true:false;};_388.prototype.getOpacity=function(){return this._opacity;};_388.prototype.getCopyright=function(_39c,zoom){var _39e=this._copyrights;return(_39e)?_39e.getCopyrightNotice(_39c,zoom):(this.copyright||"");};_388.prototype._responseHandler=function(_39f,_3a0,_3a1){if(_39f){var sr=_39f.spatialReference;var _3a3=_39f.tileInfo;if(!_3a3){throw new Error("The map service, "+this.url+", does not have tile information");}var wkid=sr.wkid||null;if(wkid!==_5){throw new Error("Spatial reference, "+wkid+", of the map service, "+this.url+", is not compatible with Google Maps. Expected spatial reference = "+_5);}var rows=_3a3.rows||null;var cols=_3a3.cols||null;if(rows!==_9||cols!==_a){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 = "+_9+"px X "+_a+"px");}var lods=_3a3.lods;if(!lods){throw new Error("The map service, "+this.url+", does not have zoom level information");}var full=_39f.fullExtent;this.description=_39f.description;this.copyright=_39f.copyrightText;this.fullExtent=_127(full,true);this.initialExtent=_127(_39f.initialExtent,true);this.layerInfos=_381(_39f.layers);this._format=_3a3.format;this._fileExtension={PNG:"png",PNG8:"png",PNG24:"png",PNG32:"png",JPG:"jpg",JPEG:"jpg",GIF:"gif"}[this._format];this._setZoomLevels(lods);var _3a9=(this._tileRange=[]);var ori=_3a3.origin;for(var i=_b;i<=_c;i++){_3a9[i]=this._getTileCoordinates(ori,full,i);}if(_f){var uo=_29(this.url);var url=uo.path+"/tile/{Z}/{Y}/{X}."+this._fileExtension;url=_37(url,uo.query);url=_1e6(url);this._options.tileUrlTemplate=url;GTileLayer.call(this,null,this._minResolution,this._maxResolution,this._options);}}_11(this,"load",_3a1,[this,_3a0]);};_388.prototype._getTileCoordinates=function(_3ae,_3af,zoom){var abs=Math.abs;var _3b2=Math.floor;var res=_d[zoom];var _3b4=res*_a;var _3b5=res*_9;var _3b6=abs(_3af.xmin-_3ae.x);var _3b7=abs(_3af.ymin-_3ae.y);var _3b8=abs(_3af.xmax-_3ae.x);var _3b9=abs(_3af.ymax-_3ae.y);return{swX:_3b2(_3b6/_3b4),swY:_3b2(_3b7/_3b5),neX:_3b2(_3b8/_3b4),neY:_3b2(_3b9/_3b5)};};_388.prototype._setZoomLevels=function(lods){var tzl=(this._tileZoomLevels=[]);var lod,lev,res,_3bf;var _3c0=_c;var _3c1=_b;for(var i=0,il=lods.length;i<il;i++){lod=lods[i];lev=lod.level;res=lod.resolution;_3bf=_371(res);tzl[_3bf]=lev;if(_3bf<_3c0){_3c0=_3bf;}if(_3bf>_3c1){_3c1=_3bf;}}this._minZoomLevel=(_3c0>this._minResolution)?_3c0:this._minResolution;this._maxZoomLevel=(_3c1<this._maxResolution)?_3c1:this._maxResolution;};_36a=function(url,_3c5,_3c6,_3c7){this.url=url;this.fullExtent=null;this.initialExtent=null;this.layerInfos=null;this.description=null;this.copyright=null;this._options=(_3c5)?_45(_3c5):new _311();this._opacity=_20(_3c6)?_3c6:1;this._callback=_3c7;this._operation="export";var _3c8=this._options.format;var _3c9=this._options.transparent;this._png24=_3===6&&_3c8&&_3c8.toLowerCase()==="png24"&&_3c9;this._tag=this._png24?"div":"img";var gp=arguments[4];if(gp){this._GP_=true;this._operation="";return this;}else{_1ec.handle(this.url,null,null,null,_8,this,this._responseHandler,_3c7);}};if(_e){_36a.prototype=new GOverlay();}_36a.prototype.initialize=function(map){var div=document.createElement("div");div.style.position="absolute";map.getPane(G_MAP_OVERLAY_LAYER_PANE).appendChild(div);this._map=map;this._div=div;this.show();};_36a.prototype.remove=function(){var div=this._div;this._cancelRequests();this.hide();this._markImages();this._removeImages();if(div){div.parentNode.removeChild(div);}this._images=this._div=this._map=null;};_36a.prototype.copy=function(){return new _36a(this.url,this._options,this._opacity,this._callback);};_36a.prototype.redraw=function(_3ce){};_36a.prototype._redraw=function(){if(this._pending){this._cancelRequests();}this._requests=[];this._pending=1;var _3cf=this._map.getBounds();var _3d0=_3cf.isFullLng();var _3d1=this._getAdjustedExtents(_3cf);var _3d2=this._getRequestParameters(_3d1),i,len=_3d2.length;this._pending=len;this._markImages();for(i=0;i<len;i++){this._requests[i]=_1ec.handle(this.url,this._operation,_3d2[i],null,_8,this,this._redrawHandler,[_3d0,len]);}};_36a.prototype._redrawHandler=function(_3d5,_3d6,_3d7){if(_3d6){throw new Error("Error "+_3d6.code+": "+_3d6.message+"("+_3d6.details.join(",")+")");}if(this._moving){this._cancelRequests();return;}var _3d8=_3d7[0],_3d9=_3d7[1];if(this._png24){if(this._pending===_3d9){this._removeImages();}this._pending--;}var _3da=_3d5.href?_3d5:_3d5.value.mapImage;var uo=_29(this.url);var url=_3da.href;url=_37(url,uo.query);url=_1e6(url);var _3dd=_127(_3da.extent,true);var div=this._div;var map=this._map;var left=map.fromLatLngToDivPixel(_3dd.getSouthWest()).x;var top=map.fromLatLngToDivPixel(_3dd.getNorthEast()).y;var _3e2=map.getSize().width;var _3e3=[[left,top]];if(_3d8){var _3e4=parseInt(div.parentNode.parentNode.style.left,10);var _3e5=Math.floor(Math.pow(2,map.getZoom())*_a);var pos=left-_3e5,_3e7=pos+_3e4,_3e8;while(_3e7>0){_3e3.push([pos,top]);_3e7-=_3e5;pos-=_3e5;}_3e3.push([pos,top]);pos=left+_3e5;_3e8=pos+_3e4;while(_3e8<=_3e2){_3e3.push([pos,top]);_3e8+=_3e5;pos+=_3e5;}if(!this._png24){this._pending=_3e3.length;}}this._createImages(url,_3e3,_3da.width+"px",_3da.height+"px");this.setOpacity(this._opacity);if(this._png24){div.style.display="";if(this._pending===0){_11(this,"update",null,[]);}}};_36a.prototype._cancelRequests=function(){var req=this._requests;if(!req){return;}var i,len=req.length;for(i=0;i<len;i++){_1ec.cancel(req[i]);}this._requests=this._pending=null;var j,_3ed=this._images;if(_3ed){len=_3ed.length;for(j=0;j<len;j++){GEvent.clearListeners(_3ed[j],"load");}}this._images=this._markedImages;this._markedImages=null;};_36a.prototype._createImages=function(url,_3ef,_3f0,_3f1){var i,len=_3ef.length,div=this._div,img,_3f6=this._images||[],ist;for(i=0;i<len;i++){img=document.createElement(this._tag);ist=img.style;ist.position="absolute";ist.left=_3ef[i][0]+"px";ist.top=_3ef[i][1]+"px";if(this._png24){ist.width=_3f0;ist.height=_3f1;div.appendChild(img);}else{GEvent.addDomListener(img,"load",GEvent.callbackArgs(this,this._imageLoaded,img));}img.src=url;_3f6.push(img);}this._images=_3f6;};_36a.prototype._imageLoaded=function(img){GEvent.clearListeners(img,"load");this._pending--;if(this._pending===0){_11(this,"update",null,[]);this._removeImages();this._div.style.display="";this._addImages();}};_36a.prototype._addImages=function(){var i,_3fa=this._images,len,div=this._div;if(!_3fa){return;}len=_3fa.length;for(i=0;i<len;i++){div.appendChild(_3fa[i]);}};_36a.prototype._markImages=function(){this._markedImages=this._images;this._images=null;};_36a.prototype._removeImages=function(){var _3fd=this._markedImages;if(!_3fd){return;}var i,len=_3fd.length,img;for(i=0;i<len;i++){img=_3fd[i];img.parentNode.removeChild(img);}this._markedImages=null;};_36a.prototype._getRequestParameters=function(_401){var _402,i,len=_401.length,map=this._map,abs=Math.abs,xmin,ymin,xmax,ymax,c1,c2,_40d,_40e,merc=_58,_410=[];for(i=0;i<len;i++){_402=_401[i];xmin=_402.xmin;ymin=_402.ymin;xmax=_402.xmax;ymax=_402.ymax;c1=map.fromLatLngToDivPixel(new GLatLng(ymin,xmin));c2=map.fromLatLngToDivPixel(new GLatLng(ymax,xmax));_40d=abs(c1.x-c2.x);_40e=abs(c1.y-c2.y);_40d=this._getAdjustedWidth(xmin,xmax,map.getZoom(),_40d);_402.xmin=merc.lngToX(_402.xmin);_402.ymin=merc.latToY(_402.ymin);_402.xmax=merc.lngToX(_402.xmax);_402.ymax=merc.latToY(_402.ymax);_410.push(this._getExportParameters(this._options,_402,_40d,_40e,true));}return _410;};_36a.prototype._getExportParameters=_312;_36a.prototype._getAdjustedExtents=function(_411){var sw=_411.getSouthWest();var ne=_411.getNorthEast();var xmin=sw.lng(),ymin=sw.lat();var xmax=ne.lng(),ymax=ne.lat();if(ymax>89){ymax=89;}if(ymin<-89){ymin=-89;}var _418=[{xmin:xmin,ymin:ymin,xmax:xmax,ymax:ymax}];if(xmin>xmax){_418[1]=_45(_418[0]);_418[1].xmin=-180;_418[0].xmax=180;}return _418;};_36a.prototype._getAdjustedWidth=function(xmin,xmax,zoom,_41c){var _41d=Math.floor;if(!_41c){var _41e=_58.lngToX;var x1=_41e(xmin);var x2=_41e(xmax);_41c=_41d((x2-x1)/_d[zoom]);}if(xmin===-180&&xmax===180){_41c=_41d(Math.pow(2,zoom)*_a);}return _41c;};_36a.prototype._getHeight=function(ymin,ymax,zoom){var _424=_58.latToY;var y1=_424(ymin);var y2=_424(ymax);var _427=Math.floor((y2-y1)/_d[zoom]);return _427;};_36a.prototype._moveStartHandler=function(){this._movestart=true;this._div.style.display="";};_36a.prototype._moveHandler=function(){if(!this._movestart){this._div.style.display="none";}else{this._div.style.display="";this._moving=true;}};_36a.prototype._moveEndHandler=function(){this._movestart=false;this._moving=false;this._redraw();};_36a.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);}};_36a.prototype._clearHandlers=function(){var _42a=this._handle_movestart;var move=this._handle_move;var end=this._handle_moveend;var _42d=GEvent.removeListener;if(_42a){_42d(_42a);}if(move){_42d(move);}if(end){_42d(end);}this._handle_movestart=this._handle_move=this._handle_moveend=null;};_36a.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();}}};_36a.prototype.show=function(){this._setVisiblity(true);this._visible=true;};_36a.prototype.hide=function(){this._setVisiblity(false);this._visible=false;};_36a.prototype.isHidden=function(){return!this._visible;};_36a.prototype.supportsHide=function(){return true;};_36a.prototype.refresh=function(){if(this._visible&&this._map){this._redraw();}};_36a.prototype.setVisibleLayers=function(_430){var opts=this._options;opts.layerIds=_430;opts.layerOption="show";this.refresh();};_36a.prototype.getVisibleLayers=function(){var _432=this._options.layerIds,_433=this._defaultVisibleLayers,_434=null;if(_432){_434=_432.slice(0);}else{if(_433){_434=_433.slice(0);}}return _434;};_36a.prototype.setDefaultVisibleLayers=function(){this._options.layerIds=null;this.refresh();};_36a.prototype.setLayerDefinitions=function(_435){this._options.layerDefinitions=_435;this.refresh();};_36a.prototype.getLayerDefinitions=function(){var _436=this._options.layerDefinitions,_437=null,id;if(_436){_437=[];for(id in _436){if(_436.hasOwnProperty(id)){_437[id]=_436[id];}}}return _437;};_36a.prototype.clearLayerDefinitions=function(){this._options.layerDefinitions=null;this.refresh();};_36a.prototype.setOpacity=function(_439){var op=(this._opacity=_439);var _43b=this._images;if(!_43b){return;}if(op<0){op=0;}if(op>1){op=1;}var _43c,_43d,ist=document.createElement("img").style;if("filter"in ist){var _op=Math.floor(op*100);_43c="filter";_43d="alpha(opacity:"+_op+")";}if("KHTMLOpacity"in ist){_43c="KHTMLOpacity";_43d=op;}if("MozOpacity"in ist){_43c="MozOpacity";_43d=op;}if("opacity"in ist){_43c="opacity";_43d=op;}var i,len=_43b.length;for(i=0;i<len;i++){_43b[i].style[_43c]=this._png24?"progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+_43b[i].src+"'), "+_43d:_43d;}};_36a.prototype._responseHandler=function(_442,_443,_444){var done=true;if(_442){this.description=_442.description;this.copyright=_442.copyrightText;this.layerInfos=_381(_442.layers);var i,_447=[],_448=this.layerInfos,len=_448.length,_44a;for(i=0;i<len;i++){_44a=_448[i];if(_44a.defaultVisibility){_447.push(_44a.id);}}this._defaultVisibleLayers=_447;var init=_442.initialExtent;var full=_442.fullExtent;var isr=init.spatialReference.wkid;done=true;switch(isr){case 4326:this.initialExtent=_127(init);this.fullExtent=_127(full);break;case 102113:this.initialExtent=_127(init,true);this.fullExtent=_127(full,true);break;default:var _44e=_10.geometryServiceUrl;this.initialExtent=init;this.fullExtent=full;if(_44e){done=false;var gs=new _2a6(_44e);var _450=[{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 _451=new _29f();_451.geometries=_450;_451.geometryType="esriGeometryPoint";_451.inSpatialReference=isr;_451.outSpatialReference=_4;var self=this;var _cb=function(){self._projectHandler.call(self,arguments[0],arguments[1],_444);};gs.project(_451,_cb);}break;}}if(done){_11(this,"load",_444,[this,_443]);}};_36a.prototype._projectHandler=function(_454,_455,_456){if(_454){var _457=_454.geometries;this.initialExtent=new GLatLngBounds(_457[0][0].getLatLng(),_457[1][0].getLatLng());this.fullExtent=new GLatLngBounds(_457[2][0].getLatLng(),_457[3][0].getLatLng());}_11(this,"load",_456,[this,_455]);};_36a.prototype.exportMapImage=function(_458,_459){var _45a=_45(this._options),_45b;if(_458){for(_45b in _458){if(_458.hasOwnProperty(_45b)){_45a[_45b]=_458[_45b];}}}var map=this._map;var _45d=_45a.bounds||map&&map.getBounds();var size=map&&map.getSize();var _45f=_45a.width||size&&size.width;var _460=_45a.height||size&&size.height;var zoom=_45a.zoomLevel;if(!_20(_45d)){throw new Error("DynamicMapServiceLayer.exportMapImage(): 'parameters' must have a value for 'bounds' property");}if(_20(zoom)){_45d=this._getAdjustedExtents(_45d)[0];var xmin=_45d.xmin,ymin=_45d.ymin,xmax=_45d.xmax,ymax=_45d.ymax;_45f=this._getAdjustedWidth(xmin,xmax,zoom);_460=this._getHeight(ymin,ymax,zoom);}_1ec.handle(this.url,this._operation,this._getExportParameters(_45a,_45d,_45f,_460),null,_8,this,this._exportHandler,_459);};_36a.prototype._exportHandler=function(_466,_467,_468){var mi=null;if(_466){var ext=_466.extent;var sr=(ext)?ext.spatialReference:null;mi=_31f(_466,((sr&&sr.wkid===102113)?true:false));}_11(this,"exportcomplete",_468,[mi,_467]);};var _46c=function(){this.bounds=null;this.width=null;this.height=null;this.format="png";this.interpolation=null;this.compressionQuality=null;this.bandIds=null;this.imageSpatialReference=_5;};var _46d=function(url,_46f,_470,_471){this.url=url;this._options=(_46f)?_45(_46f):new _311();this._opacity=_20(_470)?_470:1;this._callback=_471;this._operation="exportImage";var _472=this._options.format;this._png24=_3===6&&_472&&_472.toLowerCase()==="png24";this._tag=this._png24?"div":"img";_1ec.handle(this.url,null,null,null,_8,this,this._responseHandler,_471);};var _473=_36a.prototype;if(_e){_46d.prototype=new GOverlay();}_46d.prototype.initialize=_473.initialize;_46d.prototype.remove=_473.remove;_46d.prototype.copy=function(){return new _46d(this.url,this._options,this._opacity,this._callback);};_46d.prototype.redraw=_473.redraw;_46d.prototype._redraw=_473._redraw;_46d.prototype._redrawHandler=_473._redrawHandler;_46d.prototype._cancelRequests=_473._cancelRequests;_46d.prototype._createImages=_473._createImages;_46d.prototype._imageLoaded=_473._imageLoaded;_46d.prototype._addImages=_473._addImages;_46d.prototype._markImages=_473._markImages;_46d.prototype._removeImages=_473._removeImages;_46d.prototype._getRequestParameters=_473._getRequestParameters;_46d.prototype._getExportParameters=function(_474,_475,_476,_477,_478){var bb=_475||_474.bounds;var _47a={bbox:bb,size:(_476||_474.width||400)+","+(_477||_474.height||400),imageSR:(_474.imageSpatialReference||_5),bboxSR:_478?_5:_4,format:_474.format,interpolation:_474.interpolation,compressionQuality:_474.compressionQuality,bandIds:_474.bandIds};if(bb&&bb instanceof GLatLngBounds){_47a.bbox._AG_=true;}return _47a;};_46d.prototype._getAdjustedExtents=_473._getAdjustedExtents;_46d.prototype._getAdjustedWidth=_473._getAdjustedWidth;_46d.prototype._getHeight=_473._getHeight;_46d.prototype._moveStartHandler=_473._moveStartHandler;_46d.prototype._moveHandler=_473._moveHandler;_46d.prototype._moveEndHandler=_473._moveEndHandler;_46d.prototype._setHandlers=_473._setHandlers;_46d.prototype._clearHandlers=_473._clearHandlers;_46d.prototype._setVisiblity=_473._setVisiblity;_46d.prototype.show=_473.show;_46d.prototype.hide=_473.hide;_46d.prototype.isHidden=_473.isHidden;_46d.prototype.supportsHide=_473.supportsHide;_46d.prototype.refresh=_473.refresh;_46d.prototype.setInterpolation=function(type){this._options.interpolation=type;this.refresh();};_46d.prototype.setCompressionQuality=function(_47c){this._options.compressionQuality=_47c;this.refresh();};_46d.prototype.setBandIds=function(_47d){this._options.bandIds=_47d;this.refresh();};_46d.prototype.setOpacity=_473.setOpacity;_46d.prototype._responseHandler=function(_47e,_47f,_480){var done=true;if(_47e){this.name=_47e.name;this.description=_47e.description;this.pixelSize=new GSize(_47e.pixelSizeX,_47e.pixelSizeY);this.pixelType=_47e.pixelType;this.minPixelSize=_47e.minPixelSize;this.maxPixelSize=_47e.maxPixelSize;this.copyright=_47e.copyrightText;this.serviceDataType=_47e.serviceDataType;var _482=_47e.bandCount;var _483=[];var min=_47e.minValues;var max=_47e.maxValues;var mean=_47e.meanValues;var stdv=_47e.stdvValues;for(var i=0;i<_482;i++){_483[i]={min:min[i],max:max[i],mean:mean[i],stddev:stdv[i]};}this.bands=_483;this.extent=_47e.extent;var ext=this.extent,sr=ext.spatialReference.wkid;done=true;switch(sr){case 4326:this.extent=_127(ext);break;case 102113:this.extent=_127(ext,true);break;default:var _48b=_10.geometryServiceUrl;if(_48b){done=false;var gs=new _2a6(_48b);var _48d=[{x:ext.xmin,y:ext.ymin},{x:ext.xmax,y:ext.ymax}];var _48e=new _29f();_48e.geometries=_48d;_48e.geometryType="esriGeometryPoint";_48e.inSpatialReference=sr;_48e.outSpatialReference=_4;var self=this;var _cb=function(){self._projectHandler.call(self,arguments[0],arguments[1],_480);};gs.project(_48e,_cb);}break;}}if(done){_11(this,"load",_480,[this,_47f]);}};_46d.prototype._projectHandler=function(_491,_492,_493){if(_491){var _494=_491.geometries;this.extent=new GLatLngBounds(_494[0][0].getLatLng(),_494[1][0].getLatLng());}_11(this,"load",_493,[this,_492]);};_46d.prototype.exportImage=function(_495,_496){var _497=_45(this._options),_498;if(_495){for(_498 in _495){if(_495.hasOwnProperty(_498)){_497[_498]=_495[_498];}}}var map=this._map;var _49a=_497.bounds||map&&map.getBounds();var size=map&&map.getSize();var _49c=_497.width||size&&size.width;var _49d=_497.height||size&&size.height;if(!_20(_49a)){throw new Error("DynamicMapServiceLayer.exportImage(): 'parameters' must have a value for 'bounds' property");}_1ec.handle(this.url,this._operation,this._getExportParameters(_497,_49a,_49c,_49d),null,_8,this,this._exportHandler,_496);};_46d.prototype._exportHandler=_473._exportHandler;var _49e=function(_49f){var _4a0=[],res;if(_49f instanceof _22d){_4a0.push(_49f);}else{if(_49f instanceof _de){res=_49f.features;for(var i=0,il=res.length;i<il;i++){_4a0.push(res[i]);}}}return _4a0;};var _4a4=function(_4a5){var _4a6=[],res;if(_4a5 instanceof _24b){_4a6.push(_24d(_4a5));}else{if(_4a5 instanceof _24c){res=_4a5.addressCandidates;for(var i=0,il=res.length;i<il;i++){_4a6.push(_24d(res[i]));}}}return _4a6;};var _4aa=function(_4ab){var _4ac=[],res;if(_4ab instanceof _271){_4ac.push(_4ab.feature);}else{if(_4ab instanceof _272){res=_4ab.identifyResults;for(var i=0,il=res.length;i<il;i++){_4ac.push(res[i].feature);}}}return _4ac;};var _4b0=function(_4b1){var _4b2=[],res;if(_4b1 instanceof _28b){_4b2.push(_4b1.feature);}else{if(_4b1 instanceof _28c){res=_4b1.findResults;for(var i=0,il=res.length;i<il;i++){_4b2.push(res[i].feature);}}}return _4b2;};var _4b6=function(_4b7){var _4b8=[],res,val,_4bb,i,il,j,jl;if(_4b7 instanceof _307){val=_4b7.value;if(val&&val instanceof _de){res=val.features;for(i=0,il=res.length;i<il;i++){_4b8.push(res[i]);}}}else{if(_4b7 instanceof _30e){_4bb=_4b7.results;for(i=0,il=_4bb.length;i<il;i++){val=_4bb[i].value;if(val&&val instanceof _de){res=val.features;for(j=0,jl=res.length;j<jl;j++){_4b8.push(res[j]);}}}}}return _4b8;};var _4c0=function(_4c1){var _4c2=[],res;res=_4c1.geometries;for(var i=0,il=res.length;i<il;i++){_4c2.push({geometry:res[i]});}return _4c2;};var _4c6=function(_4c7){var ovs=null;if(_4c7 instanceof _22d||_4c7 instanceof _de){ovs=_49e(_4c7);}else{if(_4c7 instanceof _24b||_4c7 instanceof _24c){ovs=_4a4(_4c7);}else{if(_4c7 instanceof _271||_4c7 instanceof _272){ovs=_4aa(_4c7);}else{if(_4c7 instanceof _28b||_4c7 instanceof _28c){ovs=_4b0(_4c7);}else{if(_4c7 instanceof _2a3||_4c7 instanceof _2a4||_4c7 instanceof _2a5){ovs=_4c0(_4c7);}else{if(_4c7 instanceof _307||_4c7 instanceof _30e){ovs=_4b6(_4c7);}}}}}}return ovs;};var _4c9=function(map){this.map=map;};_4c9.prototype.addToMap=function(_4cb,_4cc,_4cd){if(_f){throw new Error("MapExtension: Asynchronous call to synchronous method: addToMap. Use addToMapAsync instead");}var _4ce=[],ovs,i,il,fe,type="",meta;var map=this.map;var fes=_4c6(_4cb);if(fes){fe=fes[0];if(fe&&fe.geometry){type=_53(fe.geometry).gmapsType;}meta={flags:_1d2(_4cc,type),style:_151(_4cc,type),type:type};for(i=0,il=fes.length;i<il;i++){ovs=_1c0(fes[i],_4cc,_4cd,meta,map);_4ce.push(ovs);}}else{if(_4cb instanceof GGeoXml){map.addOverlay(_4cb);_4ce.push([_4cb]);}else{if(_4cb instanceof _388){var tov=new GTileLayerOverlay(_4cb);map.addOverlay(tov);_4ce.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 _4ce;};_4c9.prototype.addToMapAsync=function(_4d8,_4d9,_4da,_4db){if(!_4db){throw new Error("MapExtension.addToMapAsync(): 'callback' argument is required");}_4d9=_45(_4d9);_4da=_45(_4da);var _4dc=[],i,il,fe,type="",meta;var map=this.map;var args=[];var fes=_4c6(_4d8);if(fes){fe=fes[0];if(fe&&fe.geometry){type=_53(fe.geometry).gmapsType;}meta={flags:_1d2(_4d9,type),style:_151(_4d9,type),type:type};for(i=0,il=fes.length;i<il;i++){args.push(_81);args.push("_addCustomOverlays");args.push([fes[i],_4d9,_4da,meta,map]);}args.push(function(){var j,jl,_4dc=[];for(j=0,jl=arguments.length;j<jl;j++){_4dc.push(arguments[j]);}_4db(_4dc);});GAsync.apply(null,args);}else{if(_4d8 instanceof GGeoXml){map.addOverlay(_4d8);_4dc.push([_4d8]);_4db(_4dc);}else{if(_4d8 instanceof _388){var tov=new GTileLayerOverlay(_4d8);map.addOverlay(tov);_4dc.push([tov]);_4db(_4dc);}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");}}}};_4c9.prototype.removeFromMap=function(_4e8){if(!_4e8){return;}var map=this.map;var ovs,ov;for(var i=0,il=_4e8.length;i<il;i++){ovs=_4e8[i];for(var j=0,jl=ovs.length;j<jl;j++){ov=ovs[j];GEvent.clearListeners(ov,"click");map.removeOverlay(ov);}}};return{_RestRequest:_1ec,_MercatorProjection:_58,SpatialRelationship:_22b,Config:_10,QueryTask:_23e,Locator:_255,FindTask:_28d,Geometry:_2a6,Geoprocessor:_330,IdentifyTask:_273,Query:_22c,IdentifyParameters:_270,FindParameters:_28a,FeatureSet:_de,Feature:_22d,SRUnitType:_29e,ProjectParameters:_29f,BufferParameters:_2a0,RelationParameters:_2a1,RelationType:_2a2,GPDate:_309,LinearUnit:_30a,DataFile:_30b,RasterData:_30c,JobStatus:_310,TiledMapServiceLayer:_388,DynamicMapServiceLayer:_36a,ImageParameters:_311,ImageServiceLayer:_46d,ImageServiceParameters:_46c,MapExtension:_4c9};};return{gmaps:_2()};};var _4f0=function(ns,_4f2){var ns_t=typeof _4f2[ns];if(ns_t==="undefined"){_4f2[ns]={};return _4f2[ns];}else{if(ns_t==="object"){return _4f2[ns];}}throw new Error("Unable to establish namespace for the library. Namespace \""+ns+"\" of type \""+ns_t+"\" already exists.");};var _4f4=_4f0("esri",this);var _4f5=_4f0("arcgis",_4f4);_4f5.gmaps=_1().gmaps;})();
