
(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;if(_3===6){var _1b=document.createElement("div");_1b.style.display="none";_1a=function(_1c){_1b.appendChild(_1c);_1b.innerHTML="";};}else{_1a=function(_1d){_1d.parentNode.removeChild(_1d);};}var _1e=function(_1f){if(_1f){if(_1f instanceof Array||(typeof _1f.length==="number"&&!_1f.propertyIsEnumerable("length")&&typeof _1f.splice==="function")){return true;}}return false;};var _20=function(_21){return(typeof _21==="function"||_21 instanceof Function);};var _22=function(_23){if(typeof _23==="undefined"){return false;}return(_23===null||typeof _23==="object"||_1e(_23)||_20(_23));};var _24=function(_25){if(_25===undefined||_25===null||_25===""){return false;}else{return true;}};var _26=function(_27){return(typeof _27==="string"||_27 instanceof String);};var _28=function(arr,_2a){if(arr&&arr.length){for(var i=0,il=arr.length;i<il;i++){if(arr[i]===_2a){return i;}}}return-1;};var _2d=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 _38=it.split("=");var _39=dec(_38.shift());var val=dec(_38.join("="));if(_24(q[_39])){q[_39]=[q[_39]];}if(_1e(q[_39])){q[_39].push(val);}else{q[_39]=val;}}}}return ret;};var _3b=function(url,_3d){var tok=_3d.token;if(_24(tok)){url+=("?token="+encodeURIComponent(tok));}return url;};var _3f=function(_40){var _41=0;var _42=_40.length;var p1,p2;for(var i=0;i<_42;i++){p1=_40[i];p2=_40[(i+1)%_42];_41+=((p1[0]*p2[1])-(p2[0]*p1[1]));}if((_41/2)>0){return _40.reverse();}return _40;};var _46=function(obj){if(obj){for(var x in obj){if(obj.hasOwnProperty(x)){return true;}}}return false;};var _49=function(obj){var _4b;if(!obj){return obj;}if(_1e(obj)){_4b=[];for(var i=0,il=obj.length;i<il;i++){_4b.push(_49(obj[i]));}return _4b;}else{if(_20(obj)){return obj;}else{if(_22(obj)){_4b=new obj.constructor();for(var x in obj){if(!(x in _4b)||_4b[x]!==obj[x]){_4b[x]=_49(obj[x]);}}return _4b;}}}return obj;};var _4f=function(_50,_51){var _52="";if(_50===_6){for(var x in _51){if(_51.hasOwnProperty(x)){_52+=("<b>"+x+": </b>"+_51[x]+"<br/>");}}}else{_52=_50.replace(/\{([^\s\:\}]+)\}/g,function(_54,key){var _56=_51[key];if(_56===undefined||_56===null){_56=_54;}return _56;});}return _52;};var _57=function(_58){var _59={gmapsType:null,esriType:null};var gm=null,es=null;if(_58 instanceof GLatLng){gm="GLatLng";es="esriGeometryPoint";}else{if(_58 instanceof GMarker){gm="GMarker";es="esriGeometryPoint";}else{if(_58 instanceof GLatLngBounds){gm="GLatLngBounds";es="esriGeometryEnvelope";}else{if(_58 instanceof GPolyline){gm="GPolyline";es="esriGeometryPolyline";}else{if(_58 instanceof GPolygon){gm="GPolygon";es="esriGeometryPolygon";}else{if(_1e(_58)){_59=_57(_58[0]);if(_59.gmapsType){_59.gmapsType+="[]";if(_59.esriType==="esriGeometryPoint"){_59.esriType="esriGeometryMultipoint";}}return _59;}}}}}}_59.gmapsType=gm;_59.esriType=es;return _59;};var _5c=(function(){var _5d=6378137;var _PI=Math.PI;var _5f=57.29577951308232;var _60=0.017453292519943;var _61=function(rad){return rad*_5f;};var _63=function(deg){return deg*_60;};return{xToLng:function(x){var _66=x/_5d;var _67=_61(_66);var _68=Math.floor((_67+180)/360);var lng=_67-(_68*360);return lng;},yToLat:function(y){var _6b=(_PI/2)-(2*Math.atan(Math.exp(-1*y/_5d)));var _6c=_61(_6b);return _6c;},lngToX:function(lng){return _63(lng)*_5d;},latToY:function(lat){var _6f=_63(lat);var y=_5d/2*Math.log((1+Math.sin(_6f))/(1-Math.sin(_6f)));return y;}};}());var _71=function(_72){return"{"+"x:"+_72.lng()+",y:"+_72.lat()+",spatialReference:{wkid:"+_4+"}"+"}";};var _73=function(_74){var loc;var _76=[];for(var i=0,_78=_74.length;i<_78;i++){loc=_74[i];_76.push("["+loc.lng()+","+loc.lat()+"]");}return"{points:["+_76.join(",")+"],spatialReference:{wkid:"+_4+"}}";};var _79=function(_7a){return _71(_7a.getLatLng());};var _7b=function(_7c){var loc,_7e=[];for(var i=0,_80=_7c.length;i<_80;i++){loc=_7c[i].getLatLng();_7e.push("["+loc.lng()+","+loc.lat()+"]");}return"{points:["+_7e.join(",")+"],spatialReference:{wkid:"+_4+"}}";};var _81=function(_82){var sw=_82.getSouthWest();var ne=_82.getNorthEast();return"{"+"xmin:"+sw.lng()+",ymin:"+sw.lat()+",xmax:"+ne.lng()+",ymax:"+ne.lat()+",spatialReference:{wkid:"+_4+"}"+"}";};var _85={};var _86,_87;if(_f){_85.getLatLngsAsync=function(_88,_89){var in1=[];for(var i=0,il=_88.length;i<il;i++){in1.push(_88[i]);in1.push("getPoint");}in1.push(function(){var _8d=[];for(var j=0,jl=arguments.length;j<jl;j++){_8d.push(arguments[j]);}_89(_8d);});GAsync.apply(null,in1);};_85._markerToJsonTextAsync=function(_90,_91){_85.getLatLngsAsync([_90],function(_92){_91(_71(_92[0]));});};_85._markersToJsonTextAsync=function(_93,_94){_85.getLatLngsAsync(_93,function(_95){var loc,_97=[];for(var i=0,_99=_95.length;i<_99;i++){loc=_95[i];_97.push("["+loc.lng()+","+loc.lat()+"]");}_94("{points:["+_97.join(",")+"],spatialReference:{wkid:"+_4+"}}");});};_85._getVerticesAsync=function(_9a,_9b){var in1=[];for(var i=0,il=_9a.length;i<il;i++){in1.push(_9a[i]);in1.push("getVertexCount");}in1.push(function(){var in2=[],_a0=[],_a1,j,k,jl;for(j=0,jl=arguments.length;j<jl;j++){_a1=arguments[j];_a0.push(_a1);for(k=0;k<_a1;k++){in2.push(_9a[j]);in2.push("getVertex");in2.push([k]);}}in2.push(function(){var _a5=[],_a6=null;var _a7=0,cnt,x,y,xl;for(x=0,xl=_a0.length;x<xl;x++){cnt=_a0[x];_a6=[];for(y=_a7;y<_a7+cnt;y++){_a6.push(arguments[y]);}_a5.push(_a6);_a7+=cnt;}_9b(_a5);});GAsync.apply(null,in2);});GAsync.apply(null,in1);};_85._polylinesToJsonTextAsync=function(_ac,_ad){_85._getVerticesAsync(_ac,function(_ae){var _af,vtx,_b1,_b2=[];for(var i=0,il=_ae.length;i<il;i++){_b1=_ae[i];_af=[];for(var j=0,jl=_b1.length;j<jl;j++){vtx=_b1[j];_af.push("["+vtx.lng()+","+vtx.lat()+"]");}_b2.push("["+_af.join(",")+"]");}_ad("{paths:["+_b2.join(",")+"],spatialReference:{wkid:"+_4+"}}");});};_85._polygonsToJsonTextAsync=function(_b7,_b8){_85._getVerticesAsync(_b7,function(_b9){var _ba,vtx,_bc,_bd=[];for(var i=0,il=_b9.length;i<il;i++){_bc=_b9[i];_ba=[];for(var j=0,jl=_bc.length;j<jl;j++){vtx=_bc[j];_ba.push("["+vtx.lng()+","+vtx.lat()+"]");}_bd.push("["+_ba.join(",")+"]");}_b8("{rings:["+_bd.join(",")+"],spatialReference:{wkid:"+_4+"}}");});};}else{_86=function(_c2){var vtx;var _c4,_c5;var _c6=[];for(var i=0,_c8=_c2.length;i<_c8;i++){_c5=_c2[i];_c4=[];for(var j=0,_ca=_c5.getVertexCount();j<_ca;j++){vtx=_c5.getVertex(j);_c4.push("["+vtx.lng()+","+vtx.lat()+"]");}_c6.push("["+_c4.join(",")+"]");}return"{paths:["+_c6.join(",")+"],spatialReference:{wkid:"+_4+"}}";};_87=function(_cb){var vtx;var _cd,_ce;var _cf=[];for(var i=0,_d1=_cb.length;i<_d1;i++){_ce=_cb[i];_cd=[];for(var j=0,_d3=_ce.getVertexCount();j<_d3;j++){vtx=_ce.getVertex(j);_cd.push("["+vtx.lng()+","+vtx.lat()+"]");}_cf.push("["+_cd.join(",")+"]");}return"{rings:["+_cf.join(",")+"],spatialReference:{wkid:"+_4+"}}";};}var _d4=function(_d5,_d6,_d7){var _d8="";switch(_d6){case"GLatLng":_d8=_71(_d5);break;case"GLatLng[]":_d8=_73(_d5);break;case"GMarker":if(_d7){_85._markerToJsonTextAsync(_d5,_d7);return;}else{_d8=_79(_d5);}break;case"GMarker[]":if(_d7){_85._markersToJsonTextAsync(_d5,_d7);return;}else{_d8=_7b(_d5);}break;case"GLatLngBounds":_d8=_81(_d5);break;case"GPolyline":if(_d7){_85._polylinesToJsonTextAsync([_d5],_d7);return;}else{_d8=_86([_d5]);}break;case"GPolyline[]":if(_d7){_85._polylinesToJsonTextAsync(_d5,_d7);return;}else{_d8=_86(_d5);}break;case"GPolygon":if(_d7){_85._polygonsToJsonTextAsync([_d5],_d7);return;}else{_d8=_87([_d5]);}break;case"GPolygon[]":if(_d7){_85._polygonsToJsonTextAsync(_d5,_d7);return;}else{_d8=_87(_d5);}break;default:throw new Error("_geometryToJsonText(): unsupported geometry type - supported types are GLatLng, GLatLng[], GMarker, GMarker[], GLatLngBounds, GPolyline, GPolyline[], GPolygon, GPolygon[]");}if(_d7){_d7(_d8);}else{return _d8;}};var _d9;var _da=function(arr){var _dc=[];var val,enc=encodeURIComponent;if(arr._AG_){var _df=arr._PT_?arr[0]:arr;return _d4(_df,_57(_df).gmapsType);}for(var x=0,xl=arr.length;x<xl;x++){val=arr[x];if(_24(val)&&typeof val!=="function"){if(_1e(val)){val._AG_=arr._AAG_;_dc.push(_da(val));}else{if(typeof val==="object"){val._AG_=arr._AAG_;_dc.push(_d9(val));}else{_dc.push(enc(_26(val)?("\""+val+"\""):val));}}}}return"["+_dc.join(",")+"]";};var _e2;_d9=function(obj){var _e4=[];var val,enc=encodeURIComponent;if(obj._AG_){return _d4(obj,_57(obj).gmapsType);}else{if(obj instanceof _e2){var _e7=obj.features,_e8=obj.geometryType||"",_e9,_ea,len,b;if(_1e(_e7)){for(b=0;b<_e7.length;b++){_e9=_e7[b];_ea=_e9.geometry;len=_ea.length;if(_e9&&_ea){_ea._AG_=true;if(_e8!=="esriGeometryMultipoint"&&_e8==="esriGeometryPoint"||len===1){_ea._PT_=true;}}}}}}for(var x in obj){if(obj.hasOwnProperty(x)){val=obj[x];if(_24(val)&&typeof val!=="function"){if(_1e(val)){_e4.push(x+":"+_da(val));}else{if(typeof val==="object"){_e4.push(x+":"+_d9(val));}else{_e4.push(x+":"+enc(_26(val)?("\""+val+"\""):val));}}}}}return"{"+_e4.join(",")+"}";};var _ee=function(_ef){var _f0=[];var val,enc=encodeURIComponent;for(var x in _ef){if(_ef.hasOwnProperty(x)){val=_ef[x];if(_24(val)&&typeof val!=="function"){if(_1e(val)){if(_24(val[0])&&typeof val[0]!=="function"&&typeof val[0]==="object"){_f0.push(x+"="+_da(val));}else{_f0.push(x+"="+enc(val.join(",")));}}else{if(typeof val==="object"){_f0.push(x+"="+_d9(val));}else{_f0.push(x+"="+enc(val));}}}}}return _f0.join("&");};if(_f){_85._arrayToJsonTextAsync=function(arr,_f5){var _f6=[];var _f7=[];var val,enc=encodeURIComponent;if(arr._AG_){var _fa=arr._PT_?arr[0]:arr;_d4(_fa,_57(_fa).gmapsType,_f5);return;}for(var x=0,xl=arr.length;x<xl;x++){val=arr[x];if(_24(val)&&typeof val!=="function"){if(_1e(val)){val._AG_=arr._AAG_;_f7.push(_85);_f7.push("_arrayToJsonText");_f7.push([val]);}else{if(typeof val==="object"){val._AG_=arr._AAG_;_f7.push(_85);_f7.push("_objectToJsonText");_f7.push([val]);}else{_f6.push(enc(_26(val)?("\""+val+"\""):val));}}}}if(_f7.length>0){_f7.push(function(){for(var i=0,il=arguments.length;i<il;i++){_f6.push(arguments[i]);}_f5("["+_f6.join(",")+"]");});GAsync.apply(null,_f7);}else{_f5("["+_f6.join(",")+"]");}};_85._objectToJsonTextAsync=function(obj,_100){var _101=[];var args=[],prop=[];var val,enc=encodeURIComponent;if(obj._AG_){_d4(obj,_57(obj).gmapsType,_100);return;}else{if(obj instanceof _e2){var _106=obj.features,type=obj.geometryType||"",_108,geom,len,b;if(_1e(_106)){for(b=0;b<_106.length;b++){_108=_106[b];geom=_108.geometry;len=geom.length;if(_108&&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(_24(val)&&typeof val!=="function"){if(_1e(val)){args.push(_85);args.push("_arrayToJsonText");args.push([val]);prop.push(x);}else{if(typeof val==="object"){args.push(_85);args.push("_objectToJsonText");args.push([val]);prop.push(x);}else{_101.push(x+":"+enc(_26(val)?("\""+val+"\""):val));}}}}}if(args.length>0){args.push(function(){for(var i=0,il=prop.length;i<il;i++){_101.push(prop[i]+":"+arguments[i]);}_100("{"+_101.join(",")+"}");});GAsync.apply(null,args);}else{_100("{"+_101.join(",")+"}");}};_85._parametersToJsonTextAsync=function(_10f,_110){var _111=[];var args=[],_113=[];var val,enc=encodeURIComponent;for(var x in _10f){if(_10f.hasOwnProperty(x)){val=_10f[x];if(_24(val)&&typeof val!=="function"){if(_1e(val)){if(_24(val[0])&&typeof val[0]!=="function"&&typeof val[0]==="object"){args.push(_85);args.push("_arrayToJsonText");args.push([val]);_113.push(x);}else{_111.push(x+"="+enc(val.join(",")));}}else{if(typeof val==="object"){args.push(_85);args.push("_objectToJsonText");args.push([val]);_113.push(x);}else{_111.push(x+"="+enc(val));}}}}}if(args.length>0){args.push(function(){for(var i=0,il=_113.length;i<il;i++){_111.push(_113[i]+"="+arguments[i]);}_110(_111.join("&"));});GAsync.apply(null,args);}else{_110(_111.join("&"));}};}var _119=function(json){return new GMarker(new GLatLng(json.y,json.x));};var _11b=function(json){return[new GMarker(new GLatLng(json.y,json.x))];};var _11d=function(json){var _11f=json.points;var pt;var _121=[];for(var i=0,npts=_11f.length;i<npts;i++){pt=_11f[i];_121[i]=new GMarker(new GLatLng(pt[1],pt[0]));}return _121;};var _124=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 _12b=function(json,_12d){var xmin=json.xmin,ymin=json.ymin;var xmax=json.xmax,ymax=json.ymax;var _132=_5c.xToLng;var _133=_5c.yToLat;if(_12d){xmin=_132(xmin);ymin=_133(ymin);xmax=_132(xmax);ymax=_133(ymax);}var sw=new GLatLng(ymin,xmin);var ne=new GLatLng(ymax,xmax);var _136=new GLatLngBounds(sw,ne);return _136;};var _137=function(json){var _139=json.paths;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 GPolyline(_13b,_10.polylineStrokeColor,_10.polylineStrokeWeight,_10.polylineStrokeOpacity);}return _13c;};var _142=function(_143){var _144=0,_145=0,_146=[],x,y,i,len,_14b=_143.replace(/(\+)|(\-)/g," $&").split(" "),_14c=parseInt(_14b[1],32);for(i=2,len=_14b.length;i<len;i+=2){_144=(x=parseInt(_14b[i],32)+_144);_145=(y=parseInt(_14b[i+1],32)+_145);_146.push([x/_14c,y/_14c]);}return _146;};var _14d=function(json){var _14f=json.rings;var _150,_151,_152,pt;_152=[];for(var i=0,nseg=_14f.length;i<nseg;i++){_150=_14f[i];_151=[];for(var j=0,npts=_150.length;j<npts;j++){pt=_150[j];_151[j]=new GLatLng(pt[1],pt[0]);}_152[i]=new GPolygon(_151,_10.polygonStrokeColor,_10.polygonStrokeWeight,_10.polygonStrokeOpacity,_10.polygonFillColor,_10.polygonFillOpacity);}return _152;};var _158=function(_159,html,_15b,_15c,map){if(_15c&&html){if(_159.openInfoWindow){if(_1e(html)){GEvent.addListener(_159,"click",function(){_159.openInfoWindowTabsHtml(html,_15b);});}else{GEvent.addListener(_159,"click",function(){_159.openInfoWindowHtml(html,_15b);});}}else{if(_1e(html)){GEvent.addListener(_159,"click",function(_15e){map.openInfoWindowTabsHtml(_15e,html,_15b);});}else{GEvent.addListener(_159,"click",function(_15f){map.openInfoWindowHtml(_15f,html,_15b);});}}}map.addOverlay(_159);};var _160=function(_161,type){var line=(type==="GPolyline[]")?true:false;var _164={stc:(_161&&_161.strokeColor!==undefined)?_161.strokeColor:(line)?_10.polylineStrokeColor:_10.polygonStrokeColor,stw:(_161&&_161.strokeWeight!==undefined)?_161.strokeWeight:(line)?_10.polylineStrokeWeight:_10.polygonStrokeWeight,sto:(_161&&_161.strokeOpacity!==undefined)?_161.strokeOpacity:(line)?_10.polylineStrokeOpacity:_10.polygonStrokeOpacity,fic:(_161&&_161.fillColor!==undefined)?_161.fillColor:_10.polygonFillColor,fio:(_161&&_161.fillOpacity!==undefined)?_161.fillOpacity:_10.polygonFillOpacity};return _164;};var _165,_166,_167;if(_f){_85._createAddMarkersAsync=function(_168,_169,_16a,_16b,map,_16d){var args=[];for(var i=0,il=_168.length;i<il;i++){args.push(_168[i]);args.push("getPoint");}args.push(function(){var _171=[],mark,opts,_174=_16b.attr,iw=_16b.meta.flags.clickable,html=_16b.html;for(var j=0,jl=arguments.length;j<jl;j++){opts=_49(_169.markerOptions);if(opts&&opts.title){opts.title=_4f(opts.title,_174);}mark=new GMarker(arguments[j],opts);_158(mark,html,_16a,iw,map);_171.push(mark);}_16d(_171);});GAsync.apply(null,args);};_85._createAddPolylinesAsync=function(_179,_17a,_17b,_17c,map,_17e){_85._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 GPolyline(_17f[i],_184.stc,_184.stw,_184.sto,opts);_158(poly,html,_17b,iw,map);_180.push(poly);}_17e(_180);});};_85._createAddPolygonsAsync=function(_188,_189,_18a,_18b,map,_18d){_85._getVerticesAsync(_188,function(_18e){var _18f=[],poly,i,il,_193=_18b.meta.style,iw=_18b.meta.flags.clickable,html=_18b.html;var opts=_189.polylineOptions;for(i=0,il=_18e.length;i<il;i++){poly=new GPolygon(_18e[i],_193.stc,_193.stw,_193.sto,_193.fic,_193.fio,opts);_158(poly,html,_18a,iw,map);_18f.push(poly);}_18d(_18f);});};}else{_165=function(_197,_198,_199,_19a,map){var _19c=[],mark,opts,i,il,_1a1=_19a.attr,iw=_19a.meta.flags.clickable,html=_19a.html;for(i=0,il=_197.length;i<il;i++){opts=_49(_198.markerOptions);if(opts&&opts.title){opts.title=_4f(opts.title,_1a1);}mark=new GMarker(_197[i].getLatLng(),opts);_158(mark,html,_199,iw,map);_19c.push(mark);}return _19c;};_166=function(_1a4,_1a5,_1a6,_1a7,map){var _1a9=[],_1aa,poly,opts,_1ad,i,il,j,jl,_1b2=_1a7.meta.style,iw=_1a7.meta.flags.clickable,html=_1a7.html;opts=_1a5.polylineOptions;for(i=0,il=_1a4.length;i<il;i++){_1aa=_1a4[i];_1ad=[];for(j=0,jl=_1aa.getVertexCount();j<jl;j++){_1ad.push(_1aa.getVertex(j));}poly=new GPolyline(_1ad,_1b2.stc,_1b2.stw,_1b2.sto,opts);_158(poly,html,_1a6,iw,map);_1a9.push(poly);}return _1a9;};_167=function(_1b5,_1b6,_1b7,_1b8,map){var _1ba=[],_1bb,poly,opts,_1be,i,il,j,jl,_1c3=_1b8.meta.style,iw=_1b8.meta.flags.clickable,html=_1b8.html;opts=_1b6.polygonOptions;for(i=0,il=_1b5.length;i<il;i++){_1bb=_1b5[i];_1be=[];for(j=0,jl=_1bb.getVertexCount();j<jl;j++){_1be.push(_1bb.getVertex(j));}poly=new GPolygon(_1be,_1c3.stc,_1c3.stw,_1c3.sto,_1c3.fic,_1c3.fio,opts);_158(poly,html,_1b7,iw,map);_1ba.push(poly);}return _1ba;};}var _1c6=function(_1c7,_1c8){if(_1e(_1c7)){var tab,_1ca,_1cb;var tabs=[];for(var i=0,ilen=_1c7.length;i<ilen;i++){tab=_1c7[i];_1ca=_4f(tab.label,_1c8);_1cb=_4f(tab.content,_1c8);tabs[i]=new GInfoWindowTab(_1ca,_1cb);}return tabs;}else{return _4f(_1c7,_1c8);}};var _1cf=function(_1d0,_1d1,_1d2,meta,map,_1d5){var geom=_1d0.geometry;var attr=_1d0.attributes;var type=meta.type;var _1d9=meta.flags;var iwc,_1db;if(_1d2){iwc=_1d2.content;_1db=_1d2.contentTabs;}var _1dc={attr:attr,html:_1c6((iwc||_1db||_6),attr),meta:meta};var ovs,_1de=false;switch(type){case"GMarker[]":if(_1d9.marker){if(_1d5){_85._createAddMarkersAsync(geom,_1d1,_1d2,_1dc,map,_1d5);return;}else{ovs=_165(geom,_1d1,_1d2,_1dc,map);}}else{ovs=geom;_1de=true;}break;case"GPolyline[]":if(_1d9.newpolyline){if(_1d5){_85._createAddPolylinesAsync(geom,_1d1,_1d2,_1dc,map,_1d5);return;}else{ovs=_166(geom,_1d1,_1d2,_1dc,map);}}else{_1de=true;ovs=geom;}break;case"GPolygon[]":if(_1d9.newpolygon){if(_1d5){_85._createAddPolygonsAsync(geom,_1d1,_1d2,_1dc,map,_1d5);return;}else{ovs=_167(geom,_1d1,_1d2,_1dc,map);}}else{_1de=true;ovs=geom;}break;}if(_1de){for(var i=0,il=ovs.length;i<il;i++){_158(ovs[i],_1dc.html,_1d2,_1d9.clickable,map);}}if(_1d5){_1d5(ovs);}else{return ovs;}};_85._addCustomOverlaysAsync=_1cf;var _1e1=function(_1e2,type){var _1e4,_1e5,_1e6,_1e7,_1e8;_1e4=_1e5=_1e6=_1e7=_1e8=false;var _1e9=true;if(_1e2){var fco=_1e2.fillColor;var fop=_1e2.fillOpacity;var sco=_1e2.strokeColor;var swt=_1e2.strokeWeight;var sop=_1e2.strokeOpacity;var mop=_1e2.markerOptions;var plop=_1e2.polylineOptions;var pgop=_1e2.polygonOptions;_1e4=(fco||fop)?true:false;_1e5=(sco||swt||sop)?true:false;_1e6=(mop&&_46(mop))?true:false;_1e7=(plop&&_46(plop))?true:false;_1e8=(pgop&&_46(pgop))?true:false;if(_1e6&&_24(mop.clickable)){_1e9=mop.clickable;}if(_1e7&&_24(plop.clickable)){_1e9=plop.clickable;}if(_1e8&&_24(pgop.clickable)){_1e9=pgop.clickable;}}var _1f2={fill:_1e4,stroke:_1e5,marker:_1e6,polyline:_1e7,polygon:_1e8,clickable:(_f&&(type==="GPolyline[]"||type==="GPolygon[]"))?false:_1e9,newpolyline:_1e5||_1e7,newpolygon:_1e5||_1e4||_1e8};return _1f2;};var _1f3=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 _2d(purl);};var _1f5=function(url){if(_10.alwaysUseProxy){var uo=_1f3();var _url=_2d(url);var p1=_ee(uo.query);var p2=_ee(_url.query);p1=p1&&("?"+p1);p2=p2&&(((p1&&"&")||("?"))+p2);url=uo.path+"?"+_url.path+p1+p2;}return url;};var _1fb=(function(){var _1fc=[];var _1fd="ArcGISJsonScript_";var _1fe="ArcGISJson_";var _1ff="ArcGISKmz_";var _200=2000;var _201=function(id){delete _1fc[id];};var _203=function(url,_205){this.url=url;this.handler=_205;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);};_203.prototype.send=function(_209){this._xhr.setRequestHeader("Content-Type","application/x-www-form-urlencoded");this._xhr.send(_209);};_203.prototype._callback=function(){var req=this._xhr;if(req.readyState===4){this.handler(_17(req.responseText));}};_203.prototype.cancel=function(){this._xhr.abort();};var _20b=function(id,url,_20e,_20f){this.id=_1fe+id;this.url=url;this.handler=_20e;this._id=id;this.cbParamName=_20f||"callback";};_20b.prototype.send=function(_210){var plen=_210.length+this.url.length;if(plen>_200||_10.alwaysUseProxy){var _212=window.location.protocol+"//"+window.location.host+"/";var url=this.url.replace(/^\s\s*/,"").replace(/\s\s*$/,"")+"/";var p1="";if(url.indexOf(_212)||_10.alwaysUseProxy){var uo=_1f3();p1=_ee(uo.query);url=uo.path+"?"+this.url;}else{url=this.url;}p1=p1&&((_210&&"&")+p1);var self=this;this._xhr=new _203(url,function(){self._callback.call(self,arguments[0]);});this._xhr.send(_210+p1+"&f=json");}else{var el=document.createElement("script");el.id=(this.scriptId=_1fd+this._id);el.type="text/javascript";el.src=this.url+"?"+_210+"&f=json"+"&"+this.cbParamName+"=esri.arcgis.gmaps._RestRequest._requestQueue."+this.id+"._callback";document.getElementsByTagName("head").item(0).appendChild(el);}};_20b.prototype._callback=function(_218){this._cleanup();if(this.cancelled){return;}var err=_218.error||null;if(err){_218=null;}this.handler.call(null,_218,err);};_20b.prototype._cleanup=function(){if(this.scriptId){var el=document.getElementById(this.scriptId);el.parentNode.removeChild(el);}_201(this.id);};_20b.prototype.cancel=function(){if(!this.cancelled){this.cancelled=true;var xhr=this._xhr;if(xhr){xhr.cancel();this._cleanup();}}};var _21c=function(id,url,_21f){this.id=_1ff+id;this.url=url;this.handler=_21f;};_21c.prototype.send=function(_220){var self=this;var _222=null;var _cb=function(){self._callback.call(self,_222);};_222=new GGeoXml(this.url+"?"+_220+"&f=kmz",_cb);if(_f){_cb();}};_21c.prototype._callback=function(_224){this._cleanup();if(this.cancelled){return;}if(_e){if(!_224.hasLoaded()){throw new Error("GGeoXml object could not finish loading the KML file");}else{if(!_224.loadedCorrectly()){throw new Error("GGeoXml object could not load the KML file correctly");}}}this.handler.call(null,_224,null);};_21c.prototype._cleanup=function(){_201(this.id);};_21c.prototype.cancel=function(){if(!this.cancelled){this.cancelled=true;}};return{_requestQueue:_1fc,create:function(url,_226,_227,_228){var nid=Math.random().toString(10).substring(2);var jh=null;switch(_227){case _8:jh=new _20b(nid,url,_226,_228);_1fc[_1fe+nid]=jh;break;case _7:jh=new _21c(nid,url,_226);_1fc[_1ff+nid]=jh;break;default:throw new Error("_RestRequest.create(): The requested REST response format '"+_227+"' is not supported. Supported formats are: json, kmz");}return jh;},handle:function(url,op,_22d,_22e,_22f,_230,_231,_232,_233){if(!_22e){_22e="";}if(!op){op="";}var uo=_2d(url);url=uo.path+"/"+op;var p3=_ee(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(_232);_231.apply(_230,args);};var req=_1fb.create(url,_h,_22f,_233);if(req){var _cb=function(text){var par=text+_22e+p3;par=(par.indexOf("&")===0)?((par.length!==1)?par.substring(1):""):par;req.send(par);};if(_e){_cb(_ee(_22d));}else{_85._parametersToJsonTextAsync(_22d,_cb);}}return req;},cancel:function(_23e){_23e.cancel();},JSONRequest:function(url,_240,_241,_242){_242=_242||{};return _1fb.handle(url,null,_241,null,_8,null,_240,null,_242.callbackParamName);}};}());var _243={INTERSECTS:"esriSpatialRelIntersects",CONTAINS:"esriSpatialRelContains",CROSSES:"esriSpatialRelCrosses",ENVELOPE_INTERSECTS:"esriSpatialRelEnvelopeIntersects",INDEX_INTERSECTS:"esriSpatialRelIndexIntersects",OVERLAPS:"esriSpatialRelOverlaps",TOUCHES:"esriSpatialRelTouches",WITHIN:"esriSpatialRelWithin"};var _244=function(){this.queryGeometry=null;this.outFields=null;this.returnGeometry=true;this.spatialRelationship=_243.INTERSECTS;this.text=null;this.where=null;};var _245=function(){this.attributes=null;this.geometry=null;};_e2=function(){this.displayFieldName=null;this.features=null;this.geometryType=null;this.spatialReference={"wkid":_4};this.fieldAliases=null;};var _246=function(json,type){var conv,geom,_24b;switch(type){case"esriGeometryPoint":conv=_11b;break;case"esriGeometryMultipoint":conv=_11d;break;case"esriGeometryEnvelope":conv=_124;break;case"esriGeometryPolyline":conv=_137;break;case"esriGeometryPolygon":conv=_14d;break;}_24b=new _245();_24b.attributes=json.attributes;geom=json.geometry;_24b.geometry=(geom&&conv)?conv(geom):null;return _24b;};var _24c=function(json){var fset=new _e2();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 _251=(fset.features=[]);var _252=json.features;var _253;if(_252){for(var i=0,flen=_252.length;i<flen;i++){_253=_252[i];_251.push(_246(_253,type));}}return fset;};var _256=function(url){this.url=url;};_256.prototype.execute=function(_258,_259,_25a){if(!_258){throw new Error("QueryTask.execute(): 'parameters' argument is required");}var geom=_258.queryGeometry;var txt=_258.text;var _25d=_258.where;if(!(_24(geom)||_24(txt)||_24(_25d))){throw new Error("QueryTask.execute(): 'Query' must have value for atleast one of 'queryGeometry', 'text', 'where' properties");}var _25e={geometryType:_57(geom).esriType,geometry:geom,inSR:_4,outSR:_4,spatialRel:_258.spatialRelationship,returnGeometry:_258.returnGeometry,text:txt,where:_25d,outFields:_258.outFields};if(geom){_25e.geometry._AG_=true;}_1fb.handle(this.url,"query",_25e,null,((_259)?_7:_8),this,this._responseHandler,_25a);};_256.prototype._responseHandler=function(_25f,_260,_261){var _262=null;if(_25f){if(_25f instanceof GGeoXml){_262=_25f;}else{_262=_24c(_25f);}}_11(this,"executecomplete",_261,[_262,_260]);};var _263=function(){this.address=null;this.location=null;this.score=null;this.attributes=null;};var _264=function(){this.addressCandidates=null;};var _265=function(_266){var _267=new _245();_267.geometry=[_266.location];var _268=(_267.attributes={});var _269=_266.address;if(typeof(_269)==="string"){_268.address=_269;}else{for(var x in _269){if(_269.hasOwnProperty(x)){_268[x]=_269[x];}}}var _26b=_266.attributes;if(_26b){for(var y in _26b){if(_26b.hasOwnProperty(y)){_268[y]=_26b[y];}}}_268.score=_266.score;return _267;};var _26d=function(url){this.url=url;};_26d.prototype.addressToLocations=function(_26f,_270,_271,_272){if(!_26f){throw new Error("Locator.addressToLocations(): 'address' argument is required");}_26f.outFields=_270;_1fb.handle(this.url,"findAddressCandidates",_26f,null,((_271)?_7:_8),this,this._geocodeHandler,_272);};_26d.prototype.locationToAddress=function(_273,_274,_275,_276){if(!_273){throw new Error("Locator.locationToAddress(): 'latlng' argument is required");}if(!_274){throw new Error("Locator.locationToAddress(): 'distance' argument is required");}var _277={location:_273.lng()+","+_273.lat(),distance:_274};_1fb.handle(this.url,"reverseGeocode",_277,null,((_275)?_7:_8),this,this._reverseGeocodeHandler,_276);};_26d.prototype._geocodeHandler=function(_278,_279,_27a){var _27b=null;if(_278){if(_278 instanceof GGeoXml){_27b=_278;}else{var _27c=new _264();var _27d=(_27c.addressCandidates=[]);var _27e=_278.candidates;var _27f,ac;for(var i=0,il=_27e.length;i<il;i++){_27f=_27e[i];ac=new _263();ac.address=_27f.address;ac.location=_119(_27f.location);ac.score=_27f.score;ac.attributes=_27f.attributes;_27d.push(ac);}_27b=_27c;}}_11(this,"addresstolocationscomplete",_27a,[_27b,_279]);};_26d.prototype._reverseGeocodeHandler=function(_283,_284,_285){var _286=null;if(_283){if(_283 instanceof GGeoXml){_286=_283;}else{var _287=new _263();_287.address=_283.address;_287.location=_119(_283.location);_287.score=100;_286=_287;}}_11(this,"locationtoaddresscomplete",_285,[_286,_284]);};var _288=function(){this.geometry=null;this.tolerance=2;this.layerIds=null;this.layerOption="top";this.returnGeometry=true;this.dpi=96;this.bounds=null;this.width=null;this.height=null;};var _289=function(){this.layerId=null;this.layerName=null;this.displayFieldName=null;this.feature=null;};var _28a=function(){this.identifyResults=null;};var _28b=function(url){this.url=url;};_28b.prototype.execute=function(_28d,_28e){if(!_28d){throw new Error("IdentifyTask.execute(): 'parameters' argument is required");}var geom=_28d.geometry;var tol=_28d.tolerance;var ext=_28d.bounds;var w=_28d.width;var h=_28d.height;var dpi=_28d.dpi;if(!(_24(geom)&&_24(tol)&&_24(ext)&&_24(w)&&_24(h)&&_24(dpi))){throw new Error("IdentifyTask.execute(): 'IdentifyParameters' must have value for the following properties: 'geometry', 'tolerance', 'bounds', 'width', 'height' and 'dpi'");}var _295=_28d.layerOption;var lids=_28d.layerIds;if(lids){_295+=(":"+lids.join(","));}var _297={geometry:geom,geometryType:_57(geom).esriType,sr:_4,layers:_295,tolerance:tol,mapExtent:ext,imageDisplay:w+","+h+","+dpi,returnGeometry:_28d.returnGeometry};_297.geometry._AG_=true;_297.mapExtent._AG_=true;_1fb.handle(this.url,"identify",_297,null,_8,this,this._responseHandler,_28e);};_28b.prototype._responseHandler=function(_298,_299,_29a){var _29b=null;if(_298){var _29c=_298.results;_29b=new _28a();var _29d=(_29b.identifyResults=[]);var _29e,_29f;for(var i=0,il=_29c.length;i<il;i++){_29e=_29c[i];_29f=new _289();_29f.layerId=_29e.layerId;_29f.layerName=_29e.layerName;_29f.displayFieldName=_29e.displayFieldName;_29f.feature=_246({attributes:_29e.attributes,geometry:_29e.geometry},_29e.geometryType);_29d.push(_29f);}}_11(this,"executecomplete",_29a,[_29b,_299]);};var _2a2=function(){this.searchText=null;this.contains=true;this.searchFields=null;this.layerIds=null;this.returnGeometry=true;};var _2a3=function(){this.layerId=null;this.layerName=null;this.displayFieldName=null;this.foundFieldName=null;this.feature=null;};var _2a4=function(){this.findResults=null;};var _2a5=function(url){this.url=url;};_2a5.prototype.execute=function(_2a7,_2a8){if(!_2a7){throw new Error("FindTask.execute(): 'parameters' argument is required");}var txt=_2a7.searchText;var lyrs=_2a7.layerIds;if(!(_24(txt)&&_24(lyrs))){throw new Error("FindTask.execute(): 'FindParameters' must have value for the following properties: 'searchText' and 'layerIds'");}var _2ab={searchText:txt,contains:_2a7.contains,searchFields:_2a7.searchFields,sr:_4,layers:lyrs,returnGeometry:_2a7.returnGeometry};_1fb.handle(this.url,"find",_2ab,null,_8,this,this._responseHandler,_2a8);};_2a5.prototype._responseHandler=function(_2ac,_2ad,_2ae){var _2af=null;if(_2ac){var _2b0=_2ac.results;_2af=new _2a4();var _2b1=(_2af.findResults=[]);var _2b2,fres;for(var i=0,il=_2b0.length;i<il;i++){_2b2=_2b0[i];fres=new _2a3();fres.layerId=_2b2.layerId;fres.layerName=_2b2.layerName;fres.displayFieldName=_2b2.displayFieldName;fres.foundFieldName=_2b2.foundFieldName;fres.feature=_246({attributes:_2b2.attributes,geometry:_2b2.geometry},_2b2.geometryType);_2b1.push(fres);}}_11(this,"executecomplete",_2ae,[_2af,_2ad]);};var _2b6=function(){this.name=null;this.where=null;this.geometry=null;this.spatialRelationship=null;};var _2b7={NONE:"esriNAOutputLineNone",STRAIGHT:"esriNAOutputLineStraight",TRUE_SHAPE:"esriNAOutputLineTrueShape",TRUE_SHAPE_WITH_MEASURE:"esriNAOutputLineTrueShapeWithMeasure"};var _2b8={ALLOW_BACKTRACK:"esriNFSBAllowBacktrack",AT_DEAD_ENDS_ONLY:"esriNFSBAtDeadEndsOnly",NO_BACKTRACK:"esriNFSBNoBacktrack"};var _2b9={CENTIMETERS:"esriCentimeters",DECIMAL_DEGREES:"esriDecimalDegrees",DECIMETERS:"esriDecimeters",FEET:"esriFeet",INCHES:"esriInches",KILOMETERS:"esriKilometers",METERS:"esriMeters",MILES:"esriMiles",MILLIMETERS:"esriMillimeters",NAUTICAL_MILES:"esriNauticalMiles",POINTS:"esriPoints",UNKNOWN:"esriUnknownUnits",YARDS:"esriYards"};var _2ba={"esriCentimeters":"esriNAUCentimeters","esriDecimalDegrees":"esriNAUDecimalDegrees","esriDecimeters":"esriNAUDecimeters","esriFeet":"esriNAUFeet","esriInches":"esriNAUInches","esriKilometers":"esriNAUKilometers","esriMeters":"esriNAUMeters","esriMiles":"esriNAUMiles","esriMillimeters":"esriNAUMillimeters","esriNauticalMiles":"esriNAUNauticalMiles","esriPoints":"esriNAUPoints","esriUnknownUnits":"esriNAUUnknown","esriYards":"esriNAUYards"};var _2bb=function(){this.accumulateAttributes=null;this.barriers=null;this.directionsLanguage=null;this.directionsLengthUnits=null;this.directionsTimeAttribute=null;this.doNotLocateOnRestrictedElements=false;this.findBestSequence=null;this.ignoreInvalidLocations=null;this.impedanceAttribute=null;this.outputLines=null;this.outputGeometryPrecision=null;this.outputGeometryPrecisionUnits=null;this.preserveFirstStop=null;this.preserveLastStop=null;this.restrictionAttributes=null;this.restrictUTurns=null;this.returnBarriers=false;this.returnDirections=false;this.returnRoutes=true;this.returnStops=false;this.startTime=null;this.stops=null;this.useHierarchy=null;this.useTimeWindows=null;};var _2bc=function(){this.bounds=null;this.mergedGeometry=null;this.routeId=null;this.routeName=null;this.totalLength=null;this.totalTime=null;this.totalDriveTime=null;this.features=null;this.geometryType="esriGeometryPolyline";this.spatialReference={"wkid":_4};};_2bc.prototype=new _e2();var _2bd=function(){this.directions=null;this.route=null;this.routeName=null;this.stops=null;};var _2be=function(){this.results=null;this.barriers=null;this.messages=null;};var _2bf=function(url){this.url=url;};_2bf.prototype._getNetworkLocations=function(arg,type){var ret={};var geom,name;if(arg instanceof _e2){ret=arg;delete ret.geometryType;delete ret.displayFieldName;delete ret.fieldAliases;delete ret.spatialReference;ret.type="features";var _2c6=(ret.features=arg.features);if(type==="stops"&&_2c6){var _2c7=true,_2c8=true,attr;for(var i=0,len=_2c6.length;i<len;i++){attr=_2c6[i].attributes;if(attr&&attr.RouteName){_2c8=false;}else{_2c7=false;}}if(!_2c7&&!_2c8){throw new Error("RouteTask.solve(): some of the '"+type+"' don't have a valid route name");}}}else{if(arg instanceof _2b6){geom=arg.geometry;name=arg.name;if(!_24(name)){throw new Error("RouteTask.solve(): '"+type+"' referencing a data layer in the map service should have a valid 'name'");}ret.type="layer";ret.layerName=name;ret.where=arg.where;ret.geometry=geom;ret.geometryType=_57(geom).esriType;ret.spatialRel=arg.spatialRelationship;if(geom){geom._AG_=true;}}else{throw new Error("RouteTask.solve(): '"+type+"' must be specified as a feature set or as a data layer");}}return ret;};_2bf.prototype.solve=function(_2cc,_2cd){if(!_2cc){throw new Error("RouteTask.solve(): 'parameters' argument is required");}var _2ce=_2cc.stops,_2cf;if(!_2ce){throw new Error("RouteTask.solve(): 'stops' not specified in the route parameters");}_2cf=this._getNetworkLocations(_2ce,"stops");_2cf.doNotLocateOnRestrictedElements=_2cc.doNotLocateOnRestrictedElements;var _2d0=_2cc.barriers,_2d1;if(_2d0){_2d1=this._getNetworkLocations(_2d0,"barriers");}var _2d2={stops:_2cf,barriers:_2d1,returnDirections:_2cc.returnDirections,returnRoutes:_2cc.returnRoutes,returnStops:_2cc.returnStops,returnBarriers:_2cc.returnBarriers,outSR:_4,ignoreInvalidLocations:_2cc.ignoreInvalidLocations,outputLines:_2cc.outputLines,findBestSequence:_2cc.findBestSequence,preserveFirstStop:_2cc.preserveFirstStop,preserveLastStop:_2cc.preserveLastStop,useTimeWindows:_2cc.useTimeWindows,startTime:_2cc.startTime?_2cc.startTime.getTime():null,accumulateAttributeNames:_2cc.accumulateAttributes,impedanceAttributeName:_2cc.impedanceAttribute,restrictionAttributeNames:_2cc.restrictionAttributes,restrictUTurns:_2cc.restrictUTurns,useHierarchy:_2cc.useHierarchy,directionsLanguage:_2cc.directionsLanguage,outputGeometryPrecision:_2cc.outputGeometryPrecision,outputGeometryPrecisionUnits:_2cc.outputGeometryPrecisionUnits,directionsLengthUnits:_2cc.directionsLengthUnits?_2ba[_2cc.directionsLengthUnits]:null,directionsTimeAttributeName:_2cc.directionsTimeAttribute};_1fb.handle(this.url,"solve",_2d2,null,_8,this,this._responseHandler,_2cd);};var _2d3;_2bf.prototype._responseHandler=function(_2d4,_2d5,_2d6){var _2d7=null;if(_2d4){var _2d8=_2d4.directions,_2d9=_2d4.routes,_2da=_2d4.stops,_2db=_2d4.barriers,_2dc=_2d4.messages;var i,j,k,len,flen,plen,tmp,_2e4,_2e5,feat;_2d7=new _2be();_2d7.results=[];if(_2dc&&_2dc.length>0){_2d7.messages=_2d3(_2dc);}if(_2db){_2e4=_2db.features;if(_2e4&&_2e4.length){_2e5=_2d7.barriers=[];for(i=0,len=_2e4.length;i<len;i++){_2e5[i]=_246(_2e4[i],"esriGeometryPoint");}}}var _2e7,_2e8={},map,_2ea,_2eb=true,dirs,summ,_2ee,_2ef,pts,pt,_2f2,_2f3;if(_2da){_2e4=_2da.features;if(_2e4&&_2e4.length){for(i=0,len=_2e4.length;i<len;i++){feat=_246(_2e4[i],"esriGeometryPoint");_2ea=feat.attributes.RouteName;map=(_2e8[_2ea]=_2e8[_2ea]||{});map.stops=map.stops||[];map.stops[feat.attributes.Sequence-1]=feat;if(_2eb&&_24(_2ea)){_2eb=false;}}}}if(_2d9){_2e4=_2d9.features;if(_2e4&&_2e4.length){for(i=0,len=_2e4.length;i<len;i++){feat=_246(_2e4[i],"esriGeometryPolyline");_2ea=feat.attributes.Name;map=(_2e8[_2ea]=_2e8[_2ea]||{});map.route=feat;map.routeName=_2ea;}}}if(_2d8&&_2d8.length>0){for(i=0,len=_2d8.length;i<len;i++){tmp=_2d8[i];summ=tmp.summary;_2e5=tmp.features;dirs=new _2bc();dirs.routeId=tmp.routeId;_2ea=(dirs.routeName=tmp.routeName);if(summ){dirs.totalLength=summ.totalLength;dirs.totalTime=summ.totalTime;dirs.totalDriveTime=summ.totalDriveTime;dirs.bounds=_12b(summ.envelope);}_2e4=(dirs.features=[]);_2ef=[];for(j=0,flen=_2e5.length;j<flen;j++){feat=_2e5[j];pts=_142(feat.compressedGeometry);feat.geometry={paths:[pts]};feat=_246(feat,"esriGeometryPolyline");_2e4.push(feat);_2ef=_2ef.concat(pts);}_2f2=[0,0];_2f3=[];for(k=0,plen=_2ef.length;k<plen;k++){pt=_2ef[k];if(pt[0]!==_2f2[0]||pt[1]!==_2f2[1]){_2f3.push(new GLatLng(pt[1],pt[0]));_2f2=pt;}}dirs.mergedGeometry=new GPolyline(_2f3,_10.polylineStrokeColor,_10.polylineStrokeWeight,_10.polylineStrokeOpacity);map=(_2e8[_2ea]=_2e8[_2ea]||{});map.directions=dirs;map.routeName=_2ea;}}if(_2eb&&_2e8["null"]){_2ee=_2e8["null"].stops;delete _2e8["null"];}for(_2ea in _2e8){if(_2e8.hasOwnProperty(_2ea)){map=_2e8[_2ea];_2e7=new _2bd();_2e7.directions=map.directions;_2e7.routeName=map.routeName;_2e7.route=map.route;if(_2eb){_2e7.stops=_2ee;}else{_2e7.stops=map.stops;}_2d7.results.push(_2e7);}}if(_2d7.results.length===0&&_2ee){_2e7=new _2bd();_2e7.stops=_2ee;_2d7.results.push(_2e7);}}_11(this,"solvecomplete",_2d6,[_2d7,_2d5]);};var _2f4={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 _2f5=function(){this.geometries=null;this.inSpatialReference=null;this.outSpatialReference=null;this.geometryType=null;};var _2f6=function(){this.geometries=null;this.distances=null;this.unit=_2f4.METER;this.unionResults=false;this.bufferSpatialReference=null;};var _2f7=function(){this.geometries1=null;this.geometries2=null;this.relation=null;this.comparisonString=null;};var _2f8={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 _2f9=function(){this.geometries=null;};var _2fa=function(){this.geometries=null;};var _2fb=function(){this.geometries=null;};var _2fc=function(url){this.url=url;};_2fc.ANGULAR_UNITS=[9101,9102,9103,9104,9105,9106,9109,9112,9113,9114];_2fc.prototype.project=function(_2fe,_2ff){if(!_2fe){throw new Error("Geometry.project(): 'parameters' argument is required");}var geom=_2fe.geometries;var _301=_57(geom[0]).esriType;var type=_2fe.geometryType||_301;var insr=_2fe.inSpatialReference;var _304=_2fe.outSpatialReference;if(!(_24(geom)&&_24(insr)&&_24(_304)&&_24(type))){throw new Error("Geometry.project(): 'parameters' must have value for the following properties: 'geometries', 'inSpatialReference', 'outSpatialReference' and 'geometryType'");}var _305={geometries:{geometryType:type,geometries:geom},inSR:insr,outSR:_304};if(_301){_305.geometries.geometries._AAG_=true;}_1fb.handle(this.url,"project",_305,null,_8,this,this._projectHandler,[_304,type,_2ff]);};_2fc.prototype._projectHandler=function(_306,_307,_308){var _309=_308[0];var type=_308[1];var _30b=_308[2];var _30c=null;if(_306){var _30d=_306.geometries;_30c=new _2f9();if(_309===_4){var _30e=(_30c.geometries=[]);for(var i=0,il=_30d.length;i<il;i++){_30e.push(_246({geometry:_30d[i]},type).geometry);}}else{_30c.geometries=_30d;}}_11(this,"projectcomplete",_30b,[_30c,_307]);};_2fc.prototype.simplify=function(_311,_312){if(!_311){throw new Error("Geometry.simplify(): 'geometries' argument is required");}var _313=_57(_311[0]).esriType;var _314={geometries:{geometryType:_313,geometries:_311},sr:_4};_314.geometries.geometries._AAG_=true;_1fb.handle(this.url,"simplify",_314,null,_8,this,this._simplifyHandler,[_313,_312]);};_2fc.prototype._simplifyHandler=function(_315,_316,_317){var type=_317[0];var _319=_317[1];var _31a=null;if(_315){var _31b=_315.geometries;_31a=new _2fa();var _31c=(_31a.geometries=[]);for(var i=0,il=_31b.length;i<il;i++){_31c.push(_246({geometry:_31b[i]},type).geometry);}}_11(this,"simplifycomplete",_319,[_31a,_316]);};_2fc.prototype.buffer=function(_31f,_320){if(!_31f){throw new Error("Geometry.buffer(): 'parameters' argument is required");}var geom=_31f.geometries;var dt=_31f.distances;if(!(_24(geom)&&_24(dt))){throw new Error("Geometry.buffer(): 'parameters' must have value for the following properties: 'geometries', 'distances'");}var unit=_31f.unit;var _324={geometries:{geometryType:_57(geom[0]).esriType,geometries:geom},inSR:_4,bufferSR:_31f.bufferSpatialReference||((_28(_2fc.ANGULAR_UNITS,unit)!==-1)?_4:_5),outSR:_4,distances:dt,unit:unit,unionResults:_31f.unionResults};_324.geometries.geometries._AAG_=true;_1fb.handle(this.url,"buffer",_324,null,_8,this,this._bufferHandler,_320);};_2fc.prototype._bufferHandler=function(_325,_326,_327){var _328=null;if(_325){var _329=_325.geometries;_328=new _2fb();var _32a=(_328.geometries=[]);for(var i=0,il=_329.length;i<il;i++){_32a.push(_14d(_329[i]));}}_11(this,"buffercomplete",_327,[_328,_326]);};_2fc.prototype.getAreasAndLengths=function(_32d,_32e){if(!_32d){throw new Error("Geometry.getAreasAndLengths(): 'polygons' argument is required");}var inSR,_330=_32d[0];if(_330&&_330.spatialReference){inSR=_330.spatialReference.wkid;}else{inSR=_4;}var self=this;if(inSR!==_5){var _332=new _2f5();_332.geometries=_32d;_332.inSpatialReference=inSR;_332.outSpatialReference=_5;_332.geometryType="esriGeometryPolygon";this.project(_332,function(_333,_334){if(_334){throw new Error("Error "+_334.code+": "+_334.message+"("+_334.details.join(",")+")");}self._areasAndLengths(_333.geometries,_32e);});}else{this._areasAndLengths(_32d,_32e);}};_2fc.prototype._areasAndLengths=function(_335,_336){var _337={polygons:_335,sr:_5};_1fb.handle(this.url,"areasAndLengths",_337,null,_8,this,this._alHandler,_336);};_2fc.prototype._alHandler=function(_338,_339,_33a){_11(this,"areasandlengthscomplete",_33a,[_338,_339]);};_2fc.prototype.getLengths=function(_33b,_33c){if(!_33b){throw new Error("Geometry.getLengths(): 'polylines' argument is required");}var inSR,_33e=_33b[0];if(_33e&&_33e.spatialReference){inSR=_33e.spatialReference.wkid;}else{inSR=_4;}var self=this;if(inSR!==_5){var _340=new _2f5();_340.geometries=_33b;_340.inSpatialReference=inSR;_340.outSpatialReference=_5;_340.geometryType="esriGeometryPolyline";this.project(_340,function(_341,_342){if(_342){throw new Error("Error "+_342.code+": "+_342.message+"("+_342.details.join(",")+")");}self._lengths(_341.geometries,_33c);});}else{this._lengths(_33b,_33c);}};_2fc.prototype._lengths=function(_343,_344){var _345={polylines:_343,sr:_5};_1fb.handle(this.url,"lengths",_345,null,_8,this,this._lHandler,_344);};_2fc.prototype._lHandler=function(_346,_347,_348){_11(this,"lengthscomplete",_348,[_346,_347]);};_2fc.prototype.getLabelPoints=function(_349,_34a){if(!_349){throw new Error("Geometry.getLabelPoints(): 'polygons' argument is required");}var _34b={polygons:_349,sr:_4};_34b.polygons._AAG_=true;_1fb.handle(this.url,"labelPoints",_34b,null,_8,this,this._lpHandler,_34a);};_2fc.prototype._lpHandler=function(_34c,_34d,_34e){var _34f=null;if(_34c){var _350=_34c.labelPoints,_351=[],i;if(_350){for(i=0;i<_350.length;i++){_351[i]=_119(_350[i]);}}_34f={labelPoints:_351};}_11(this,"labelpointscomplete",_34e,[_34f,_34d]);};_2fc.prototype.relation=function(_353,_354){if(!_353){throw new Error("Geometry.relation(): 'parameters' argument is required");}var g1=_353.geometries1,g2=_353.geometries2,_357=_353.relation,_358=_353.comparisonString;if(!(_24(g1)&&_24(g2)&&_24(_357))){throw new Error("Geometry.relation(): 'parameters' must have value for the following properties: 'geometries1', 'geometries2', 'relation'");}if(_357===_2f8.RELATION&&!_24(_358)){throw new Error("Geometry.relation(): 'parameters' must have a valid 'comparisonString' property when 'relation' is RelationType.RELATION");}var _359={geometries1:{geometryType:_57(g1[0]).esriType,geometries:g1},geometries2:{geometryType:_57(g2[0]).esriType,geometries:g2},relation:_357,relationParam:_358,sr:_4};_359.geometries1.geometries._AAG_=_359.geometries2.geometries._AAG_=true;_1fb.handle(this.url,"relation",_359,null,_8,this,this._relHandler,_354);};_2fc.prototype._relHandler=function(_35a,_35b,_35c){_11(this,"relationcomplete",_35c,[_35a,_35b]);};var _35d=function(){this.paramName=null;this.dataType=null;this.value=null;};var _35e=function(){this.type=null;this.description=null;};var _35f=function(){this.date=null;this.format=null;};var _360=function(){this.distance=null;this.units=null;};var _361=function(){this.url=null;};var _362=function(){this.url=null;this.format=null;};var _363=function(){this.href=null;this.width=null;this.height=null;this.bounds=null;this.scale=null;};var _364=function(){this.results=null;this.messages=null;};var _365=function(){this.jobId=null;this.jobStatus=null;this.messages=null;};var _366={CANCELLED:"esriJobCancelled",CANCELLING:"esriJobCancelling",DELETED:"esriJobDeleted",DELETING:"esriJobDeleting",EXECUTING:"esriJobExecuting",FAILED:"esriJobFailed",NEW:"esriJobNew",SUBMITTED:"esriJobSubmitted",SUCCEEDED:"esriJobSucceeded",TIMED_OUT:"esriJobTimedOut",WAITING:"esriJobWaiting"};var _367=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 _368=function(_369,_36a,_36b,_36c,_36d){var _36e=_369.layerOption;var lids=_369.layerIds;if(lids){_36e+=(":"+lids.join(","));}else{_36e="";}var bb=_36a||_369.bounds;var _371=_369.layerDefinitions,defs=[];for(var id in _371){if(_371.hasOwnProperty(id)&&id&&_371[id]){defs.push(id+":"+_371[id]);}}var _374={bbox:bb,size:(_36b||_369.width||400)+","+(_36c||_369.height||400),dpi:_369.dpi,imageSR:(_369.imageSpatialReference||_5),bboxSR:_36d?_5:_4,format:_369.format,transparent:_369.transparent,layers:_36e,layerDefs:defs.join(";")};if(bb&&bb instanceof GLatLngBounds){_374.bbox._AG_=true;}return _374;};var _375=function(json,_377){var mimg=new _363();mimg.href=json.href;mimg.width=json.width;mimg.height=json.height;mimg.scale=json.scale;var _379=json.extent;if(_379){mimg.bounds=_12b(_379,_377);}return mimg;};_2d3=function(json){var out=[];var msg,_37d;if(json&&json.length){for(var i=0,il=json.length;i<il;i++){msg=json[i];_37d=new _35e();_37d.type=msg.type;_37d.description=msg.description;out.push(_37d);}}return out;};var _380=function(type,json){if(_28(["GPBoolean","GPDouble","GPLong","GPString"],type)!==-1){return json;}var out=null;var mimg;switch(type){case"GPDate":out=new _35f();out.date=json;out.format="dow mon dd hh:mm:ss zzz yyyy";break;case"GPLinearUnit":out=new _360();out.distance=json.distance;out.units=json.units;break;case"GPDataFile":out=new _361();out.url=json.url;break;case"GPRasterData":case"GPRasterDataLayer":mimg=json.mapImage;if(mimg){out=_375(mimg);}else{out=new _362();out.url=json.url;out.format=json.format;}break;case"GPRecordSet":case"GPFeatureRecordSetLayer":mimg=json.mapImage;if(mimg){out=_375(mimg);}else{out=_24c(json);}break;default:out=json;break;}return out;};var _385=function(url,_387){this.url=url;this._delay=(_387)?(_387.statusUpdateInterval||1000):1000;this._outSR=(_387)?(_387.outSpatialReference||_4):_4;this._processSR=_387&&_387.processSpatialReference;this._timers=[];};_385.prototype.execute=function(_388,_389,_38a){if(!_388){throw new Error("Geoprocessor.execute(): 'parameters' argument is required");}_388["env:outSR"]=this._outSR;_388["env:processSR"]=this._processSR;_1fb.handle(this.url,"execute",_388,null,((_389)?_7:_8),this,this._executeHandler,_38a);};_385.prototype._executeHandler=function(_38b,_38c,_38d){var _38e=null;if(_38b){if(_38b instanceof GGeoXml){_38e=_38b;}else{var _38f=_38b.results;var _390=new _364();var _391=(_390.results=[]);var res,pval,_394;for(var i=0,il=_38f.length;i<il;i++){res=_38f[i];pval=new _35d();pval.paramName=res.paramName;_394=(pval.dataType=res.dataType);pval.value=_380(_394,res.value);_391.push(pval);}_390.messages=_2d3(_38b.messages);_38e=_390;}}_11(this,"executecomplete",_38d,[_38e,_38c]);};_385.prototype.submitJob=function(_397,_398,_399){if(!_397){throw new Error("Geoprocessor.submitJob(): 'parameters' argument is required");}_397["env:outSR"]=this._outSR;_397["env:processSR"]=this._processSR;_1fb.handle(this.url,"submitJob",_397,null,_8,this,this._jobHandler,[_399,_398,true]);};_385.prototype._jobHandler=function(_39a,_39b,_39c){var cb=_39c[0];var scb=_39c[1];var _39f=_39c[2];if(_39b){_11(this,"jobstatusupdate",null,[null,_39b]);if(_39f){_11(this,"jobcomplete",null,[null,_39b]);}_11(null,null,scb,[null,_39b]);if(_39f){_11(null,null,cb,[null,_39b]);}return;}var ji=new _365();var id=(ji.jobId=_39a.jobId);var _3a2=(ji.jobStatus=_39a.jobStatus);ji.messages=_2d3(_39a.messages);_11(this,"jobstatusupdate",null,[ji]);var done=false;if(_39f){this.cancelJobStatusUpdates(id);switch(_3a2){case _366.SUBMITTED:case _366.EXECUTING:case _366.WAITING:case _366.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]);}};_385.prototype.checkJobStatus=function(_3a5,_3a6){if(!_3a5){throw new Error("Geoprocessor.checkJobStatus(): 'jobId' argument is required");}var _3a7;if(arguments.length===3){_3a7=[_3a6,arguments[2],true];}else{_3a7=[null,_3a6,false];}_1fb.handle(this.url,"jobs/"+_3a5,{returnMessages:true},null,_8,this,this._jobHandler,_3a7);};_385.prototype.cancelJobStatusUpdates=function(_3a8){clearTimeout(this._timers[_3a8]);delete this._timers[_3a8];};_385.prototype.getResultData=function(_3a9,_3aa,_3ab,_3ac){if(!(_3a9&&_3aa)){throw new Error("Geoprocessor.getResultData(): 'jobId' and 'resultParameterName' arguments are required");}_1fb.handle(this.url,"jobs/"+_3a9+"/results/"+_3aa,{returnType:"data",outSR:_4},null,((_3ab)?_7:_8),this,this._resultDataHandler,_3ac);};_385.prototype._resultDataHandler=function(_3ad,_3ae,_3af){var _3b0=null;if(_3ad){if(_3ad instanceof GGeoXml){_3b0=_3ad;}else{var out=new _35d();out.paramName=_3ad.paramName;var _3b2=(out.dataType=_3ad.dataType);out.value=_380(_3b2,_3ad.value);_3b0=out;}}_11(this,"getresultdatacomplete",_3af,[_3b0,_3ae]);};_385.prototype.getResultImage=function(_3b3,_3b4,_3b5,_3b6){if(!(_3b3&&_3b4)){throw new Error("Geoprocessor.getResultImage(): 'jobId' and 'resultParameterName' arguments are required");}var _3b7=_368(_3b5||new _367());_1fb.handle(this.url,"jobs/"+_3b3+"/results/"+_3b4,_3b7,null,_8,this,this._resultImageHandler,_3b6);};_385.prototype._resultImageHandler=function(_3b8,_3b9,_3ba){var mi=null;if(_3b8){var _3bc=_3b8.href?_3b8:_3b8.value.mapImage;var ext=_3bc.extent;var sr=(ext)?ext.spatialReference:null;mi=_375(_3bc,((sr&&sr.wkid===102113)?true:false));}_11(this,"getresultimagecomplete",_3ba,[mi,_3b9]);};var _3bf;_385.prototype.getResultImageLayer=function(_3c0,_3c1,_3c2){if(!(_3c0&&_3c1)){throw new Error("Geoprocessor.getResultLayer(): 'jobId' and 'resultParameterName' arguments are required");}var uo=_2d(this.url);var url=uo.path+"/jobs/"+_3c0+"/results/"+_3c1;url=_3b(url,uo.query);return new _3bf(url,_3c2,1,null,true);};var _3c5=function(){this.id=null;this.name=null;this.parentLayerId=null;this.subLayerIds=null;this.defaultVisibility=null;};var _3c6=function(res,xmin,xmax,_3ca){if(!res){var _3cb=_5c.lngToX;var x1=_3cb(xmin);var x2=_3cb(xmax);res=(x2-x1)/_3ca;}var _3ce,_3cf,_3d0,glev,gres,_3d3,_3d4;_3ce=_3cf=-1;for(var i=0;i<=_c;i++){glev=i;gres=_d[i];if(res>=gres){_3cf=glev;_3ce=_3cf-1;break;}}if(_3cf===-1){_3d0=_c;}else{if(_3ce===-1){_3d0=_b;}else{_3d3=_d[_3ce]-res;_3d4=res-_d[_3cf];if(_3d3<=_3d4){_3d0=_3ce;}else{_3d0=_3cf;}}}return _3d0;};var _3d6=function(json){var _3d8=[];var lyr,_3da;for(var i=0,il=json.length;i<il;i++){lyr=json[i];_3da=new _3c5();_3da.id=lyr.id;_3da.name=lyr.name;_3da.parentLayerId=lyr.parentLayerId;_3da.subLayerIds=lyr.subLayerIds;_3da.defaultVisibility=lyr.defaultVisibility;_3d8.push(_3da);}return _3d8;};var _3dd=function(url,_3df,_3e0){this.url=url;this.fullExtent=null;this.initialExtent=null;this.layerInfos=null;this.description=null;this.copyright=null;var _3e1,opac,_3e3,_3e4;_3e1=opac=_3e3=_3e4=null;if(_3df){_3e1=_3df.copyrights;opac=_3df.opacity;_3e3=_3df.minResolution;_3e4=_3df.maxResolution;}this._options=_49(_3df);this._copyrights=_3e1;this._opacity=(opac!==null)?opac:1;this._minZoomLevel=(this._minResolution=(_3e3!==null)?_3e3:_b);this._maxZoomLevel=(this._maxResolution=(_3e4!==null)?_3e4:_c);this._format=null;this._fileExtension=null;this._tileZoomLevels=null;_1fb.handle(url,null,null,null,_8,this,this._responseHandler,_3e0);};if(_e){_3dd.prototype=new GTileLayer();}_3dd._BLANK_TILE="http://serverapi.arcgisonline.com/jsapi/gmaps/transparent.png";_3dd.prototype.getTileUrl=function(tile,zoom){var _3e7=_3dd._BLANK_TILE;if(zoom<this._minZoomLevel||zoom>this._maxZoomLevel){return _3e7;}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 _3e7;}var uo=_2d(this.url);var url=uo.path+"/tile/"+this._tileZoomLevels[zoom]+"/"+ty+"/"+tx+"."+this._fileExtension;url=_3b(url,uo.query);url=_1f5(url);return url;};_3dd.prototype.isPng=function(){return(this._fileExtension==="png")?true:false;};_3dd.prototype.getOpacity=function(){return this._opacity;};_3dd.prototype.getCopyright=function(_3f1,zoom){var _3f3=this._copyrights;return(_3f3)?_3f3.getCopyrightNotice(_3f1,zoom):(this.copyright||"");};_3dd.prototype._responseHandler=function(_3f4,_3f5,_3f6){if(_3f4){var sr=_3f4.spatialReference;var _3f8=_3f4.tileInfo;if(!_3f8){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=_3f8.rows||null;var cols=_3f8.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=_3f8.lods;if(!lods){throw new Error("The map service, "+this.url+", does not have zoom level information");}var full=_3f4.fullExtent;this.description=_3f4.description;this.copyright=_3f4.copyrightText;this.fullExtent=_12b(full,true);this.initialExtent=_12b(_3f4.initialExtent,true);this.layerInfos=_3d6(_3f4.layers);this._format=_3f8.format;this._fileExtension={PNG:"png",PNG8:"png",PNG24:"png",PNG32:"png",JPG:"jpg",JPEG:"jpg",GIF:"gif"}[this._format];this._setZoomLevels(lods);var _3fe=(this._tileRange=[]);var ori=_3f8.origin;for(var i=_b;i<=_c;i++){_3fe[i]=this._getTileCoordinates(ori,full,i);}if(_f){var uo=_2d(this.url);var url=uo.path+"/tile/{Z}/{Y}/{X}."+this._fileExtension;url=_3b(url,uo.query);url=_1f5(url);this._options.tileUrlTemplate=url;GTileLayer.call(this,null,this._minResolution,this._maxResolution,this._options);}}_11(this,"load",_3f6,[this,_3f5]);};_3dd.prototype._getTileCoordinates=function(_403,_404,zoom){var abs=Math.abs;var _407=Math.floor;var res=_d[zoom];var _409=res*_a;var _40a=res*_9;var _40b=abs(_404.xmin-_403.x);var _40c=abs(_404.ymin-_403.y);var _40d=abs(_404.xmax-_403.x);var _40e=abs(_404.ymax-_403.y);return{swX:_407(_40b/_409),swY:_407(_40c/_40a),neX:_407(_40d/_409),neY:_407(_40e/_40a)};};_3dd.prototype._setZoomLevels=function(lods){var tzl=(this._tileZoomLevels=[]);var lod,lev,res,_414;var _415=_c;var _416=_b;for(var i=0,il=lods.length;i<il;i++){lod=lods[i];lev=lod.level;res=lod.resolution;_414=_3c6(res);tzl[_414]=lev;if(_414<_415){_415=_414;}if(_414>_416){_416=_414;}}this._minZoomLevel=(_415>this._minResolution)?_415:this._minResolution;this._maxZoomLevel=(_416<this._maxResolution)?_416:this._maxResolution;};_3bf=function(url,_41a,_41b,_41c){this.url=url;this.fullExtent=null;this.initialExtent=null;this.layerInfos=null;this.description=null;this.copyright=null;this._options=(_41a)?_49(_41a):new _367();this._opacity=_24(_41b)?_41b:1;this._callback=_41c;this._operation="export";this._setImageTag();var gp=arguments[4];if(gp){this._GP_=true;this._operation="";return this;}else{_1fb.handle(this.url,null,null,null,_8,this,this._responseHandler,_41c);}};if(_e){_3bf.prototype=new GOverlay();}_3bf.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;if(!_24(this._visible)||this._visible){this.show();}};_3bf.prototype.remove=function(){var div=this._div;this._cancelRequests();this.hide();this._markImages();this._removeImages();if(div){_1a(div);}this._images=this._div=this._map=null;};_3bf.prototype.copy=function(){return new _3bf(this.url,this._options,this._opacity);};_3bf.prototype.redraw=function(_421){};_3bf.prototype._redraw=function(_422){if(this._pending){this._cancelRequests();}this._requests=[];this._pending=1;var _423=this._map.getBounds();var _424=_423.isFullLng();var _425=this._getAdjustedExtents(_423);var _426=this._getRequestParameters(_425),i,len=_426.length;this._pending=len;this._markImages();if(_422){this._removeImages();}for(i=0;i<len;i++){this._requests[i]=_1fb.handle(this.url,this._operation,_426[i],null,_8,this,this._redrawHandler,[_424,len]);}};_3bf.prototype._redrawHandler=function(_429,_42a,_42b){if(_42a){throw new Error("Error "+_42a.code+": "+_42a.message+"("+_42a.details.join(",")+")");}if(this._moving){this._cancelRequests();return;}var _42c=_42b[0],_42d=_42b[1];if(this._png24){if(this._pending===_42d){this._removeImages();}this._pending--;}var _42e=_429.href?_429:_429.value.mapImage;var uo=_2d(this.url);var url=_42e.href;url=_3b(url,uo.query);url=_1f5(url);var _431=_12b(_42e.extent,true);var div=this._div;var map=this._map;var left=map.fromLatLngToDivPixel(_431.getSouthWest()).x;var top=map.fromLatLngToDivPixel(_431.getNorthEast()).y;var _436=map.getSize().width;var _437=[[left,top]];if(_42c){var _438=parseInt(div.parentNode.parentNode.style.left,10);var _439=Math.floor(Math.pow(2,map.getZoom())*_a);var pos=left-_439,_43b=pos+_438,_43c;while(_43b>0){_437.push([pos,top]);_43b-=_439;pos-=_439;}_437.push([pos,top]);pos=left+_439;_43c=pos+_438;while(_43c<=_436){_437.push([pos,top]);_43c+=_439;pos+=_439;}if(!this._png24){this._pending=_437.length;}}this._createImages(url,_437,_42e.width+"px",_42e.height+"px");this.setOpacity(this._opacity);if(this._png24){div.style.display="";if(this._pending===0){_11(this,"update",null,[]);}}};_3bf.prototype._cancelRequests=function(){var req=this._requests;if(!req){return;}var i,len=req.length;for(i=0;i<len;i++){_1fb.cancel(req[i]);}this._requests=this._pending=null;var j,_441=this._images;if(_441){len=_441.length;for(j=0;j<len;j++){GEvent.clearListeners(_441[j],"load");}}this._images=this._markedImages;this._markedImages=null;};_3bf.prototype._createImages=function(url,_443,_444,_445){var i,len=_443.length,div=this._div,img,_44a=this._images||[],ist;for(i=0;i<len;i++){img=document.createElement(this._tag);ist=img.style;ist.position="absolute";ist.MozUserSelect="none";ist.left=_443[i][0]+"px";ist.top=_443[i][1]+"px";if(this._png24){ist.width=_444;ist.height=_445;var img2=document.createElement("div");var ist2=img2.style;ist2.filter="alpha(opacity=0)";ist2.width=_444;ist2.height=_445;img.appendChild(img2);div.appendChild(img);}else{GEvent.addDomListener(img,"load",GEvent.callbackArgs(this,this._imageLoaded,img));}img.src=url;_44a.push(img);}this._images=_44a;};_3bf.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();}};_3bf.prototype._addImages=function(){var i,_450=this._images,len,div=this._div;if(!_450){return;}len=_450.length;for(i=0;i<len;i++){div.appendChild(_450[i]);}};_3bf.prototype._markImages=function(){this._markedImages=this._images;this._images=null;};_3bf.prototype._removeImages=function(){var _453=this._markedImages;if(!_453){return;}var i,len=_453.length,img;for(i=0;i<len;i++){img=_453[i];_1a(img);}this._markedImages=null;};_3bf.prototype._getRequestParameters=function(_457){var _458,i,len=_457.length,map=this._map,abs=Math.abs,xmin,ymin,xmax,ymax,c1,c2,_463,_464,merc=_5c,_466=[];for(i=0;i<len;i++){_458=_457[i];xmin=_458.xmin;ymin=_458.ymin;xmax=_458.xmax;ymax=_458.ymax;c1=map.fromLatLngToDivPixel(new GLatLng(ymin,xmin));c2=map.fromLatLngToDivPixel(new GLatLng(ymax,xmax));_463=abs(c1.x-c2.x);_464=abs(c1.y-c2.y);_463=this._getAdjustedWidth(xmin,xmax,map.getZoom(),_463);_458.xmin=merc.lngToX(_458.xmin);_458.ymin=merc.latToY(_458.ymin);_458.xmax=merc.lngToX(_458.xmax);_458.ymax=merc.latToY(_458.ymax);_466.push(this._getExportParameters(this._options,_458,_463,_464,true));}return _466;};_3bf.prototype._getExportParameters=_368;_3bf.prototype._getAdjustedExtents=function(_467){var sw=_467.getSouthWest();var ne=_467.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 _46e=[{xmin:xmin,ymin:ymin,xmax:xmax,ymax:ymax}];if(xmin>xmax){_46e[1]=_49(_46e[0]);_46e[1].xmin=-180;_46e[0].xmax=180;}return _46e;};_3bf.prototype._getAdjustedWidth=function(xmin,xmax,zoom,_472){var _473=Math.floor;if(!_472){var _474=_5c.lngToX;var x1=_474(xmin);var x2=_474(xmax);_472=_473((x2-x1)/_d[zoom]);}if(xmin===-180&&xmax===180){_472=_473(Math.pow(2,zoom)*_a);}return _472;};_3bf.prototype._getHeight=function(ymin,ymax,zoom){var _47a=_5c.latToY;var y1=_47a(ymin);var y2=_47a(ymax);var _47d=Math.floor((y2-y1)/_d[zoom]);return _47d;};_3bf.prototype._moveStartHandler=function(){this._movestart=true;this._div.style.display="";};_3bf.prototype._moveHandler=function(){if(!this._movestart){this._div.style.display="none";}else{this._div.style.display="";this._moving=true;}};_3bf.prototype._moveEndHandler=function(){var _47e=!this._movestart;this._movestart=false;this._moving=false;this._redraw(_47e);};_3bf.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);}};_3bf.prototype._clearHandlers=function(){var _481=this._handle_movestart;var move=this._handle_move;var end=this._handle_moveend;var _484=GEvent.removeListener;if(_481){_484(_481);}if(move){_484(move);}if(end){_484(end);}this._handle_movestart=this._handle_move=this._handle_moveend=null;};_3bf.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();}}};_3bf.prototype.show=function(){this._setVisiblity(true);this._visible=true;};_3bf.prototype.hide=function(){this._setVisiblity(false);this._visible=false;};_3bf.prototype.isHidden=function(){return!this._visible;};_3bf.prototype.supportsHide=function(){return true;};_3bf.prototype.refresh=function(){if(this._visible&&this._map){this._redraw();}};_3bf.prototype.setVisibleLayers=function(_487){var opts=this._options;opts.layerIds=_487;opts.layerOption="show";this.refresh();};_3bf.prototype.getVisibleLayers=function(){var _489=this._options.layerIds,_48a=this._defaultVisibleLayers,_48b=null;if(_489){_48b=_489.slice(0);}else{if(_48a){_48b=_48a.slice(0);}}return _48b;};_3bf.prototype.setDefaultVisibleLayers=function(){this._options.layerIds=null;this.refresh();};_3bf.prototype.setLayerDefinitions=function(_48c){this._options.layerDefinitions=_48c;this.refresh();};_3bf.prototype.getLayerDefinitions=function(){var _48d=this._options.layerDefinitions,_48e=null,id;if(_48d){_48e=[];for(id in _48d){if(_48d.hasOwnProperty(id)){_48e[id]=_48d[id];}}}return _48e;};_3bf.prototype.clearLayerDefinitions=function(){this._options.layerDefinitions=null;this.refresh();};_3bf.prototype._setImageTag=function(){var _490=this._options.format;this._png24=_3===6&&_490&&_490.toLowerCase()==="png24"&&this._options.transparent;this._tag=this._png24?"div":"img";};_3bf.prototype.setImageFormat=function(_491){this._options.format=_491;this._setImageTag();this.refresh();};_3bf.prototype.setOpacity=function(_492){var op=(this._opacity=_492);var _494=this._images;if(!_494){return;}if(op<0){op=0;}if(op>1){op=1;}var _495,_496,ist=document.createElement("img").style;if("filter"in ist){var _op=Math.floor(op*100);_495="filter";_496="alpha(opacity:"+_op+")";}if("KHTMLOpacity"in ist){_495="KHTMLOpacity";_496=op;}if("MozOpacity"in ist){_495="MozOpacity";_496=op;}if("opacity"in ist){_495="opacity";_496=op;}var i,len=_494.length;for(i=0;i<len;i++){_494[i].style[_495]=this._png24?"progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+_494[i].src+"'), "+_496:_496;}};_3bf.prototype._responseHandler=function(_49b,_49c,_49d){var done=true;if(_49b){this.description=_49b.description;this.copyright=_49b.copyrightText;this.layerInfos=_3d6(_49b.layers);var i,_4a0=[],_4a1=this.layerInfos,len=_4a1.length,_4a3;for(i=0;i<len;i++){_4a3=_4a1[i];if(_4a3.defaultVisibility){_4a0.push(_4a3.id);}}this._defaultVisibleLayers=_4a0;var init=_49b.initialExtent;var full=_49b.fullExtent;var isr=init.spatialReference.wkid;done=true;switch(isr){case 4326:this.initialExtent=_12b(init);this.fullExtent=_12b(full);break;case 102113:this.initialExtent=_12b(init,true);this.fullExtent=_12b(full,true);break;default:var _4a7=_10.geometryServiceUrl;this.initialExtent=init;this.fullExtent=full;if(_4a7){done=false;var gs=new _2fc(_4a7);var _4a9=[{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 _4aa=new _2f5();_4aa.geometries=_4a9;_4aa.geometryType="esriGeometryPoint";_4aa.inSpatialReference=isr;_4aa.outSpatialReference=_4;var self=this;var _cb=function(){self._projectHandler.call(self,arguments[0],arguments[1],_49d);};gs.project(_4aa,_cb);}break;}}if(done){_11(this,"load",_49d,[this,_49c]);}};_3bf.prototype._projectHandler=function(_4ad,_4ae,_4af){if(_4ad){var _4b0=_4ad.geometries;this.initialExtent=new GLatLngBounds(_4b0[0][0].getLatLng(),_4b0[1][0].getLatLng());this.fullExtent=new GLatLngBounds(_4b0[2][0].getLatLng(),_4b0[3][0].getLatLng());}_11(this,"load",_4af,[this,_4ae]);};_3bf.prototype.exportMapImage=function(_4b1,_4b2){var _4b3=_49(this._options),_4b4;if(_4b1){for(_4b4 in _4b1){if(_4b1.hasOwnProperty(_4b4)){_4b3[_4b4]=_4b1[_4b4];}}}var map=this._map;var _4b6=_4b3.bounds||map&&map.getBounds();var size=map&&map.getSize();var _4b8=_4b3.width||size&&size.width;var _4b9=_4b3.height||size&&size.height;var zoom=_4b3.zoomLevel;if(!_24(_4b6)){throw new Error("DynamicMapServiceLayer.exportMapImage(): 'parameters' must have a value for 'bounds' property");}if(_24(zoom)){_4b6=this._getAdjustedExtents(_4b6)[0];var xmin=_4b6.xmin,ymin=_4b6.ymin,xmax=_4b6.xmax,ymax=_4b6.ymax;_4b8=this._getAdjustedWidth(xmin,xmax,zoom);_4b9=this._getHeight(ymin,ymax,zoom);}_1fb.handle(this.url,this._operation,this._getExportParameters(_4b3,_4b6,_4b8,_4b9),null,_8,this,this._exportHandler,_4b2);};_3bf.prototype._exportHandler=function(_4bf,_4c0,_4c1){var mi=null;if(_4bf){var ext=_4bf.extent;var sr=(ext)?ext.spatialReference:null;mi=_375(_4bf,((sr&&sr.wkid===102113)?true:false));}_11(this,"exportcomplete",_4c1,[mi,_4c0]);};var _4c5=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 _4c6=function(url,_4c8,_4c9,_4ca){this.url=url;this._options=(_4c8)?_49(_4c8):new _367();this._opacity=_24(_4c9)?_4c9:1;this._callback=_4ca;this._operation="exportImage";this._setImageTag();_1fb.handle(this.url,null,null,null,_8,this,this._responseHandler,_4ca);};var _4cb=_3bf.prototype;if(_e){_4c6.prototype=new GOverlay();}_4c6.prototype.initialize=_4cb.initialize;_4c6.prototype.remove=_4cb.remove;_4c6.prototype.copy=function(){return new _4c6(this.url,this._options,this._opacity);};_4c6.prototype.redraw=_4cb.redraw;_4c6.prototype._redraw=_4cb._redraw;_4c6.prototype._redrawHandler=_4cb._redrawHandler;_4c6.prototype._cancelRequests=_4cb._cancelRequests;_4c6.prototype._createImages=_4cb._createImages;_4c6.prototype._imageLoaded=_4cb._imageLoaded;_4c6.prototype._addImages=_4cb._addImages;_4c6.prototype._markImages=_4cb._markImages;_4c6.prototype._removeImages=_4cb._removeImages;_4c6.prototype._getRequestParameters=_4cb._getRequestParameters;_4c6.prototype._getExportParameters=function(_4cc,_4cd,_4ce,_4cf,_4d0){var bb=_4cd||_4cc.bounds;var _4d2={bbox:bb,size:(_4ce||_4cc.width||400)+","+(_4cf||_4cc.height||400),imageSR:(_4cc.imageSpatialReference||_5),bboxSR:_4d0?_5:_4,format:_4cc.format,interpolation:_4cc.interpolation,compressionQuality:_4cc.compressionQuality,bandIds:_4cc.bandIds};if(bb&&bb instanceof GLatLngBounds){_4d2.bbox._AG_=true;}return _4d2;};_4c6.prototype._getAdjustedExtents=_4cb._getAdjustedExtents;_4c6.prototype._getAdjustedWidth=_4cb._getAdjustedWidth;_4c6.prototype._getHeight=_4cb._getHeight;_4c6.prototype._moveStartHandler=_4cb._moveStartHandler;_4c6.prototype._moveHandler=_4cb._moveHandler;_4c6.prototype._moveEndHandler=_4cb._moveEndHandler;_4c6.prototype._setHandlers=_4cb._setHandlers;_4c6.prototype._clearHandlers=_4cb._clearHandlers;_4c6.prototype._setVisiblity=_4cb._setVisiblity;_4c6.prototype.show=_4cb.show;_4c6.prototype.hide=_4cb.hide;_4c6.prototype.isHidden=_4cb.isHidden;_4c6.prototype.supportsHide=_4cb.supportsHide;_4c6.prototype.refresh=_4cb.refresh;_4c6.prototype.setInterpolation=function(type){this._options.interpolation=type;this.refresh();};_4c6.prototype.setCompressionQuality=function(_4d4){this._options.compressionQuality=_4d4;this.refresh();};_4c6.prototype.setBandIds=function(_4d5){this._options.bandIds=_4d5;this.refresh();};_4c6.prototype._setImageTag=function(){var _4d6=this._options.format;this._png24=_3===6&&_4d6&&_4d6.toLowerCase()==="png24";this._tag=this._png24?"div":"img";};_4c6.prototype.setImageFormat=_4cb.setImageFormat;_4c6.prototype.setOpacity=_4cb.setOpacity;_4c6.prototype._responseHandler=function(_4d7,_4d8,_4d9){var done=true;if(_4d7){this.name=_4d7.name;this.description=_4d7.description;this.pixelSize=new GSize(_4d7.pixelSizeX,_4d7.pixelSizeY);this.pixelType=_4d7.pixelType;this.minPixelSize=_4d7.minPixelSize;this.maxPixelSize=_4d7.maxPixelSize;this.copyright=_4d7.copyrightText;this.serviceDataType=_4d7.serviceDataType;var _4db=_4d7.bandCount;var _4dc=[];var min=_4d7.minValues;var max=_4d7.maxValues;var mean=_4d7.meanValues;var stdv=_4d7.stdvValues;for(var i=0;i<_4db;i++){_4dc[i]={min:min[i],max:max[i],mean:mean[i],stddev:stdv[i]};}this.bands=_4dc;this.extent=_4d7.extent;var ext=this.extent,sr=ext.spatialReference.wkid;done=true;switch(sr){case 4326:this.extent=_12b(ext);break;case 102113:this.extent=_12b(ext,true);break;default:var _4e4=_10.geometryServiceUrl;if(_4e4){done=false;var gs=new _2fc(_4e4);var _4e6=[{x:ext.xmin,y:ext.ymin},{x:ext.xmax,y:ext.ymax}];var _4e7=new _2f5();_4e7.geometries=_4e6;_4e7.geometryType="esriGeometryPoint";_4e7.inSpatialReference=sr;_4e7.outSpatialReference=_4;var self=this;var _cb=function(){self._projectHandler.call(self,arguments[0],arguments[1],_4d9);};gs.project(_4e7,_cb);}break;}}if(done){_11(this,"load",_4d9,[this,_4d8]);}};_4c6.prototype._projectHandler=function(_4ea,_4eb,_4ec){if(_4ea){var _4ed=_4ea.geometries;this.extent=new GLatLngBounds(_4ed[0][0].getLatLng(),_4ed[1][0].getLatLng());}_11(this,"load",_4ec,[this,_4eb]);};_4c6.prototype.exportImage=function(_4ee,_4ef){var _4f0=_49(this._options),_4f1;if(_4ee){for(_4f1 in _4ee){if(_4ee.hasOwnProperty(_4f1)){_4f0[_4f1]=_4ee[_4f1];}}}var map=this._map;var _4f3=_4f0.bounds||map&&map.getBounds();var size=map&&map.getSize();var _4f5=_4f0.width||size&&size.width;var _4f6=_4f0.height||size&&size.height;if(!_24(_4f3)){throw new Error("DynamicMapServiceLayer.exportImage(): 'parameters' must have a value for 'bounds' property");}_1fb.handle(this.url,this._operation,this._getExportParameters(_4f0,_4f3,_4f5,_4f6),null,_8,this,this._exportHandler,_4ef);};_4c6.prototype._exportHandler=_4cb._exportHandler;var _4f7=function(_4f8){var _4f9=[],res;if(_4f8 instanceof _245){_4f9.push(_4f8);}else{if(_4f8 instanceof _e2){res=_4f8.features;for(var i=0,il=res.length;i<il;i++){_4f9.push(res[i]);}}}return _4f9;};var _4fd=function(_4fe){var _4ff=[],res;if(_4fe instanceof _263){_4ff.push(_265(_4fe));}else{if(_4fe instanceof _264){res=_4fe.addressCandidates;for(var i=0,il=res.length;i<il;i++){_4ff.push(_265(res[i]));}}}return _4ff;};var _503=function(_504){var _505=[],res;if(_504 instanceof _289){_505.push(_504.feature);}else{if(_504 instanceof _28a){res=_504.identifyResults;for(var i=0,il=res.length;i<il;i++){_505.push(res[i].feature);}}}return _505;};var _509=function(_50a){var _50b=[],res;if(_50a instanceof _2a3){_50b.push(_50a.feature);}else{if(_50a instanceof _2a4){res=_50a.findResults;for(var i=0,il=res.length;i<il;i++){_50b.push(res[i].feature);}}}return _50b;};var _50f=function(_510){var _511=[],res,val,_514,i,il,j,jl;if(_510 instanceof _35d){val=_510.value;if(val&&val instanceof _e2){res=val.features;for(i=0,il=res.length;i<il;i++){_511.push(res[i]);}}}else{if(_510 instanceof _364){_514=_510.results;for(i=0,il=_514.length;i<il;i++){val=_514[i].value;if(val&&val instanceof _e2){res=val.features;for(j=0,jl=res.length;j<jl;j++){_511.push(res[j]);}}}}}return _511;};var _519=function(_51a){var _51b=[],res;res=_51a.geometries;for(var i=0,il=res.length;i<il;i++){_51b.push({geometry:res[i]});}return _51b;};var _51f=function(_520){var ovs=null;if(_520 instanceof _245||_520 instanceof _e2){ovs=_4f7(_520);}else{if(_520 instanceof _263||_520 instanceof _264){ovs=_4fd(_520);}else{if(_520 instanceof _289||_520 instanceof _28a){ovs=_503(_520);}else{if(_520 instanceof _2a3||_520 instanceof _2a4){ovs=_509(_520);}else{if(_520 instanceof _2f9||_520 instanceof _2fa||_520 instanceof _2fb){ovs=_519(_520);}else{if(_520 instanceof _35d||_520 instanceof _364){ovs=_50f(_520);}}}}}}return ovs;};var _522=function(map){this.map=map;};_522.prototype.addToMap=function(_524,_525,_526){if(_f){throw new Error("MapExtension: Asynchronous call to synchronous method: addToMap. Use addToMapAsync instead");}var _527=[],ovs,i,il,fe,type="",meta;var map=this.map;var fes=_51f(_524);if(fes){fe=fes[0];if(fe&&fe.geometry){type=_57(fe.geometry).gmapsType;}meta={flags:_1e1(_525,type),style:_160(_525,type),type:type};for(i=0,il=fes.length;i<il;i++){ovs=_1cf(fes[i],_525,_526,meta,map);_527.push(ovs);}}else{if(_524 instanceof GGeoXml){map.addOverlay(_524);_527.push([_524]);}else{if(_524 instanceof _3dd){var tov=new GTileLayerOverlay(_524);map.addOverlay(tov);_527.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 _527;};_522.prototype.addToMapAsync=function(_531,_532,_533,_534){if(!_534){throw new Error("MapExtension.addToMapAsync(): 'callback' argument is required");}_532=_49(_532);_533=_49(_533);var _535=[],i,il,fe,type="",meta;var map=this.map;var args=[];var fes=_51f(_531);if(fes){fe=fes[0];if(fe&&fe.geometry){type=_57(fe.geometry).gmapsType;}meta={flags:_1e1(_532,type),style:_160(_532,type),type:type};for(i=0,il=fes.length;i<il;i++){args.push(_85);args.push("_addCustomOverlays");args.push([fes[i],_532,_533,meta,map]);}args.push(function(){var j,jl,_535=[];for(j=0,jl=arguments.length;j<jl;j++){_535.push(arguments[j]);}_534(_535);});GAsync.apply(null,args);}else{if(_531 instanceof GGeoXml){map.addOverlay(_531);_535.push([_531]);_534(_535);}else{if(_531 instanceof _3dd){var tov=new GTileLayerOverlay(_531);map.addOverlay(tov);_535.push([tov]);_534(_535);}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");}}}};_522.prototype.removeFromMap=function(_541){if(!_541){return;}var map=this.map;var ovs,ov;for(var i=0,il=_541.length;i<il;i++){ovs=_541[i];for(var j=0,jl=ovs.length;j<jl;j++){ov=ovs[j];GEvent.clearListeners(ov,"click");map.removeOverlay(ov);}}};return{_RestRequest:_1fb,JSONRequest:_1fb.JSONRequest,_MercatorProjection:_5c,SpatialRelationship:_243,Config:_10,QueryTask:_256,Locator:_26d,FindTask:_2a5,Geometry:_2fc,Geoprocessor:_385,IdentifyTask:_28b,RouteTask:_2bf,Query:_244,IdentifyParameters:_288,FindParameters:_2a2,FeatureSet:_e2,Feature:_245,SRUnitType:_2f4,ProjectParameters:_2f5,BufferParameters:_2f6,RelationParameters:_2f7,RelationType:_2f8,GPDate:_35f,LinearUnit:_360,DataFile:_361,RasterData:_362,JobStatus:_366,DataLayer:_2b6,NAOutputLine:_2b7,NAUTurn:_2b8,Units:_2b9,RouteParameters:_2bb,DirectionsFeatureSet:_2bc,TiledMapServiceLayer:_3dd,DynamicMapServiceLayer:_3bf,ImageParameters:_367,ImageServiceLayer:_4c6,ImageServiceParameters:_4c5,MapExtension:_522};};return{gmaps:_2()};};var _549=function(ns,_54b){var ns_t=typeof _54b[ns];if(ns_t==="undefined"){_54b[ns]={};return _54b[ns];}else{if(ns_t==="object"){return _54b[ns];}}throw new Error("Unable to establish namespace for the library. Namespace \""+ns+"\" of type \""+ns_t+"\" already exists.");};var _54d=_549("esri",this);var _54e=_549("arcgis",_54d);_54e.gmaps=_1().gmaps;}());
