(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;i0){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"+x+": "+_51[x]+"
");}}}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;i0){_f7.push(function(){for(var i=0,il=arguments.length;i0){args.push(function(){for(var i=0,il=prop.length;i0){args.push(function(){for(var i=0,il=_113.length;i_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;i0){_2d7.messages=_2d3(_2dc);}if(_2db){_2e4=_2db.features;if(_2e4&&_2e4.length){_2e5=_2d7.barriers=[];for(i=0,len=_2e4.length;i0){for(i=0,len=_2d8.length;i=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;ithis._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((txneX)||(tyswY)){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_416){_416=_414;}}this._minZoomLevel=(_415>this._minResolution)?_415:this._minResolution;this._maxZoomLevel=(_4160){_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;i89){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