function _$0(){}_$0.InheritClass=function(A,$){var _=function(){};_.prototype=$.prototype;A.prototype=new _();};_$0.GetCallBack=function(_,$){return function(){return $.apply(_,arguments);};};function _$1($){this.parseHandle=$;}_$1.prototype.load=function($){if(!this.jsFile){this.jsFile=document.createElement("script");this.jsFile.type="text/javascript";this.jsFile.defer=true;document.body.insertBefore(this.jsFile,document.body.firstChild);GEvent.bindDom(this.jsFile,"readystatechange",this,this.onReadyStateChange);GEvent.bindDom(this.jsFile,"load",this,this.onLoad);}this.jsFile.src=$;this.running=true;};_$1.prototype.onLoad=function($){if(window._OLR){GEvent.trigger(this,"loaded",_$1.parseObject(window._OLR));if(this.parseHandle){this.parseHandle.call(null,window._OLR);}}else{GEvent.trigger(this,"error");}window._OLR=null;if(!document.all&&this.jsFile&&this.jsFile.parentNode==document.body){this.jsFile.removeAttribute("src");document.body.removeChild(this.jsFile);delete this.jsFile;}this.running=false;};_$1.parseObject=function($){return $;};_$1.prototype.onReadyStateChange=function($){if(!this.jsFile||this.jsFile.readyState!="loaded"){return;}this.onLoad();};_$1.getChild=function($,_){for(var A=0;A<$.childNodes.length;A++){if($.childNodes[A].name==_){return $.childNodes[A];}}};function K_51dituProjection(){this.imgSize=200;this.imgNtuSize=256;}K_51dituProjection.prototype=new GProjection();K_51dituProjection.LatlngToNtu=function($){return[$[0],$[1]];};K_51dituProjection.NtuToLatlng=function($){return[$[0],$[1]];};K_51dituProjection.get51dituZoom=function($){return 17-$;};K_51dituProjection.prototype.fromLatLngToPixel=function($,B){var A=Math.pow(2,K_51dituProjection.get51dituZoom(B))*this.imgNtuSize/this.imgSize,_=K_51dituProjection.LatlngToNtu([$.lng()*100000,$.lat()*100000]);return new GPoint(_[0]/A,-_[1]/A);};K_51dituProjection.prototype.fromPixelToLatLng=function($,B,_){var A=Math.pow(2,K_51dituProjection.get51dituZoom(B))*this.imgNtuSize/this.imgSize,C=K_51dituProjection.NtuToLatlng([$.x*A,-$.y*A]);return new GLatLng(C[1]/parseFloat(100000),C[0]/parseFloat(100000),_);};K_51dituProjection.prototype.tileCheckRange=function(_,$,A){return true;};K_51dituProjection.prototype.getWrapWidth=function($){return Math.pow(2,$+8);};function K_51dituSpec(){GTileLayer.call(this,new GCopyrightCollection("acxs.com"),3,17);this.imgURL=["http://cache2.51ditu.com/"];}_$0.InheritClass(K_51dituSpec,GTileLayer);K_51dituSpec.prototype.getTileUrl=function(F,B){var J=K_51dituProjection.get51dituZoom(B),G=parseInt(Math.ceil((12-J)/4)),K=0,I=0,$=0,H="";for(var D=0;D<G;D++){var C=1<<(4*(G-D)),_=parseInt((F.x-K*$)/C),A=parseInt((-F.y-1-I*$)/C);H+=((_>9)?_:"0"+_)+""+((A>9)?A:"0"+A)+"/";K=_;I=A;$=C;}var E=(((F.x)&((1<<20)-1))+(((-F.y-1)&((1<<20)-1))*Math.pow(2,20))+(((J)&((1<<8)-1))*Math.pow(2,40)));return this.imgURL[(F.x+F.y)%this.imgURL.length]+J+"/"+H+E+".png";};K_51dituSpec.prototype.isPng=function(){return true;};window.K_51ditu_MAP=new GMapType([new K_51dituSpec()],new K_51dituProjection(),"\u53c2\u8003\u56fe",{tileSize:200,shortName:51});function K_RTdituProjection(){this.scalefactors=new Array(30,15,10,4,2,1,0.4,0.2,0.1,0.04,0.02,0.01,0.004,0.002,0.001,0.0004);this.tilewidth=256;this.tileheight=256;}K_RTdituProjection.getRTdituZoom=function($){return $-4<1?1:$-4;};K_RTdituProjection.prototype=new GProjection();K_RTdituProjection.prototype.fromLatLngToPixel=function($,A){if($.lng()==0||$.lat()==0){return new GPoint(0,0);}var _=($.lng())/this.scalefactors[K_RTdituProjection.getRTdituZoom(A)],B=($.lat())/this.scalefactors[K_RTdituProjection.getRTdituZoom(A)];if(B<0){B=0;}return new GPoint(_*this.tilewidth,-B*this.tileheight);};K_RTdituProjection.prototype.fromPixelToLatLng=function($,B,A){if($.x==0||$.y==0){return new GLatLng(0,0,A);}var _=Math.round(($.x/this.tilewidth*this.scalefactors[K_RTdituProjection.getRTdituZoom(B)])*100000)/100000,C=Math.round(($.y/this.tileheight*this.scalefactors[K_RTdituProjection.getRTdituZoom(B)])*100000)/100000;if(C>0){C=0;}return new GLatLng(-C,_,A);};K_RTdituProjection.prototype.tileCheckRange=function(_,$,A){return true;};K_RTdituProjection.prototype.getWrapWidth=function($){return(G_NORMAL_MAP.getProjection()).getWrapWidth($);};function K_RTdituSpec(){GTileLayer.call(this,new GCopyrightCollection("acxs.com"),3,17);this.directorys=new Array("0","1","2","3","4","5","6","7","8","9","10","11","12","13","14","15");this.gridfactors=new Array(10,10,10,10,10,10,10,10,10,10,40,40,40,40,40,40);this.imgURL=["http://211.147.248.42//rt/mapdb//typical/"];this.dbtype=".png";this.tilewidth=256;this.tileheight=256;this.scalefactors=new Array(30,15,10,4,2,1,0.4,0.2,0.1,0.04,0.02,0.01,0.004,0.002,0.001,0.0004);}_$0.InheritClass(K_RTdituSpec,GTileLayer);K_RTdituSpec.prototype.getTileUrl=function($,C){if(C<4){return"images/blank.png";}else{if(C==4||C==5){if($.x>9||$.x<4||$.y>-1||$.y<-4){return"images/blank.png";}}else{if(C==6){if($.x>13||$.x<7||$.y>-2||$.y<-6){return"images/blank.png";}}else{if(C==7){if($.x>34||$.x<17||$.y>-3||$.y<-15){return"images/blank.png";}}else{if(C==8){if($.x>69||$.x<35||$.y>-8||$.y<-28){return"images/blank.png";}}else{if(C==9){if($.x>135||$.x<72||$.y>-18||$.y<-54){return"images/blank.png";}}else{if(C==10){if($.x>339||$.x<182||$.y>-44||$.y<-135){return"images/blank.png";}}else{if(C==11){if($.x>678||$.x<366||$.y>-89||$.y<-270){return"images/blank.png";}}else{if(C==12){if($.x>1353||$.x<734||$.y>-181||$.y<-538){return"images/blank.png";}}else{if(C==13){if($.x>3379||$.x<1836||$.y>-452||$.y<-1341){return"images/blank.png";}}else{if(C==14){if($.x>6757||$.x<3674||$.y>-906||$.y<-2680){return"images/blank.png";}}else{if(C==15){if($.x>13510||$.x<7348||$.y>-1814||$.y<-5359){return"images/blank.png";}}else{if(C==16){if($.x>33775||$.x<18374||$.y>-4538||$.y<-13392){return"images/blank.png";}}else{if(C==17){if($.x>67550||$.x<19692||$.y>-4538||$.y<-26785){return"images/blank.png";}}else{window.alert(C+","+$.x+","+$.y);}}}}}}}}}}}}}}var _=this.gridfactors[K_RTdituProjection.getRTdituZoom(C)],B=this.directorys[K_RTdituProjection.getRTdituZoom(C)],A=$.x,H=-$.y;H-=1;var F=Math.floor((A)/_),I=A-F*_,G=Math.floor((H)/(_));if(G<0){G+=1;}var E=(H-G*_),D=this.imgURL+"/"+B+"/";D+=F+"/"+G+"/"+I+"_"+E+this.dbtype;return D;};K_RTdituSpec.prototype.isPng=function(){return true;};K_RTdituSpec.prototype.minResolution=function(){return 4;};K_RTdituSpec.prototype.maxResolution=function(){return 17;};window.K_RTditu_MAP=new GMapType([new K_RTdituSpec()],new K_RTdituProjection(),"\u884c\u653f\u56fe",{tileSize:256,shortName:51});
