⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 avinclude.js

📁 类mapbar地图处理 用的是MapBar给百度的JS
💻 JS
📖 第 1 页 / 共 5 页
字号:
    this.color=lS0YQ;
    this.K904=_Drjg
};
function AVMaplet(AUF5_,xh53v,yQ2g,rF24,n65D,$3n5,UdL,Dfk5V,hp9h)
{
    this.uO14=0;
    this.HM_=0;
    this.GB5e=0;
    this.TMJ=0;
    this.cq75=0;
    this.vE2r3=0;
    this.X3v=300;
    this.T5$=300;
    this.F50=i9h0.mQF3U;
    this.xh53v=xh53v;
    this.AUF5_=AUF5_;
    this.mJ18=yQ2g;
    this.left=$3n5;
    this.top=UdL;
    this.width=rF24;
    this.height=n65D;
    this.Dfk5V=Dfk5V;
    this.i001=new Array();
    this.p5TU="std";
    this.t$D3="png";
    this.$mR5=hp9h;
    this.wW1=true;
    this.u41=false;
    this.v2a2=true;
    this.Q1E=true;
    this.pt76L=null;
    this.lC8O6=true;
    this.xDx=false;
    this._t4=Math.ceil((this.width)/(this.X3v)/2);
    this.XKO=Math.ceil((this.height)/(this.T5$)/2);
    this.v8I=new Array();
    this.sCXJ=new Array();
    this.FK2=new Array();
    this.A3Y7r=null;
    this.i001=new Array();
    this.e3953=new Array();
    this.i4or=null;
    this.xW7_=null;
    this.Y7v6=null;
    this.d27=null;
    this.af5=null;
    this.G0E94=new M99("#FF0000",2);
    this.toString=function()
    {
        return "com.mapbar.avmaplet.AVMaplet"
    };
    this.resize=function(rF24,n65D)
    {
        this.width=rF24;
        this.height=n65D;
        this._t4=Math.ceil((this.width)/(this.X3v)/2);
        this.XKO=Math.ceil((this.height)/(this.T5$)/2);
        this.LhGY.style.width=rF24;
        this.LhGY.style.n65D=n65D;
        this.LhGY.style.clip='rect(0 '+this.width+' '+this.height+' 0)';
        this.K28.resize(rF24,n65D);
        this.h1V.resize(rF24,n65D);
        this.mB07.resize(rF24,n65D);
        if(this.u41)
        {
            this.u9$$().resize(n65D);
            this.u9$$().moveTo(this.width-16,0)
        }
        if(this.Q1E)this.xwk5.moveTo(0,this.height-24);
        if(this.v2a2)this.T551.moveTo(this.width-97-15,this.height-23);
        this.N0A.resize(rF24,n65D);
        this.bnx.resize(rF24,n65D);
        this.setZoomLevel(this.mJ18)
    };
    this.u9$$=function()
    {
        if(!this.u41)return null;
        if(this.u6R==null)
        {
            this.u6R=new X3R(this,-1,this.width-16,0,16,this.height,this.u41,this.LhGY)
        }
        return this.u6R
    };
    this.showMap=function()
    {
        document.writeln('<div id="mapbar" unselectable="on" ><div unselectable="on" id="layClip" style="position:absolute;overflow:hidden; width:'+this.width+'px; height:'+this.height+'px; left:'+this.left+'px; top:'+this.top+'px; clip: rect(0 '+this.width+' '+this.height+' 0);background-color:'+MapBackgroundColor+'; layer-background-color:'+MapBackgroundColor+';"></div></div>');
        this.map=Qkw0("mapbar");
        this.LhGY=Qkw0("layClip");
        this.K28=new VA8("MapContainer",0,0,this.width,this.height,true,2,'',this.LhGY);
        this.h1V=new VA8("LayerMap",0,0,this.width,this.height,true,2,'地图装载中...',this.K28);
        this.mB07=new VA8("LayerPoiMap",0,0,this.width,this.height,true,3,'',this.K28);
        this.u9$$();
        {
        }
        if(this.lC8O6)
        {
            this.O6$=new t3h7(this.$mR5,this.mJ18,0,0,70,120,true,3,this.LhGY,this)
        }
        {
            this.xwk5=new VA8("LayerScale",1,this.height-24,100,24,this.Q1E,3,'',this.LhGY)
        }
        {
            var rightMargin=(this.u41)?15:0;
            this.T551=new VA8("LayerLogo",this.width-97-rightMargin,this.height-23,97,23,this.v2a2,3,'',this.LhGY);
            this.T551.style.cursor='hand'
        }
        var content='<table bordercolor="red" border="2" width="100%" height="100%"><tr><td></td></tr></table>';
        this.x3JV=new VA8("LayerBorder",1,1,1,1,false,6,content,this.LhGY);
        this.N0A=new VA8("LayerMask",0,0,this.width,this.height,true,2,'',this.K28);
        this.N0A.style.backgroundImage="url("+strImgsvrUrl+"images/mask.gif)";
        this.bnx=new VA8("LayerDrawMap",0,0,this.width,this.height,true,4,'',this.K28);
        this.bnx.style.backgroundImage="url("+strImgsvrUrl+"images/mask.gif)";
        {
            this.map.onmousemove=o91B;
            this.map.onmousedown=k66l9;
            this.map.onmouseup=G69hC;
            this.map.onclick=L23;
            this.map.ondblclick=jlAW;
            this.map.onmouseout=F4b;
            this.map.ondrag=o91B;
            this.map.ondragstart=o91B;
            this.map.ondragend=o91B
        }
        this.f6I06();
        this.setZoomLevel(this.mJ18);
        this.setMode(this.F50)
    };
    this.f6I06=function()
    {
        this.x3JV.hide();
        this.x3JV.resize(1,1);
        this.x3JV.moveTo(-10,-10);
        if(document.all)
        {
            this.h1V.moveTo(0,0);
            this.h1V.show();
            this.mB07.moveTo(0,0);
            this.mB07.show();
            this.bnx.moveTo(0,0);
            this.bnx.show();
            this.N0A.moveTo(0,0);
            this.N0A.show()
        }
    };
    this.setStyle=function(_f$)
    {
        if(this.p5TU!=_f$)
        {
            this.p5TU=_f$;
            if("aerial"==this.p5TU)
            {
                this.t$D3="jpg"
            }
            else
            {
                this.t$D3="png"
            }
            this.h1V.graphics.clear();
            this.mB07.graphics.clear();
            this.bnx.graphics.clear();
            this.N0A.graphics.clear();
            this.refresh()
        }
    };
    this.getZoomLevel=function()
    {
        return this.mJ18
    };
    this.setZoomLevel=function(yQ2g)
    {
        if(yQ2g<0)
        {
            return
        }
        if(yQ2g>R$1)
        {
            return
        }
        if(this.mJ18!=yQ2g)
        {
            if(iToolTipStyle==0)hideToolTipMenu();
            hideBubble();
            this.h1V.graphics.clear();
            this.mB07.graphics.clear();
            this.bnx.graphics.clear();
            this.N0A.graphics.clear()
        }
        if(this.O6$!=null)
        {
            this.O6$.S85(yQ2g)
        }
        if(this.u41)this.u9$$().setZoomLevel(yQ2g);
        this.mJ18=yQ2g;
        this.v7CX=Ud0[this.mJ18];
        this.m308=e3I[this.mJ18];
        this.B14=Y8802[this.mJ18]+"/";
        {
            {
            }
        }
        {
            this.fh1=Math.floor((this.xh53v+this.v7CX/X7kNs)/this.v7CX);
            this.P6Bw1=Math.floor((this.AUF5_+this.m308/X7kNs)/this.m308);
            if(this.fh1<0)this.fh1+=1;
            this.SU4=this.width/2-Math.round(((this.xh53v*X7kNs)%(this.v7CX*X7kNs))*this.X3v/(this.v7CX*X7kNs));
            if(this.AUF5_>=0)
            {
                this.EH857=this.height/2-this.T5$+Math.round(((this.AUF5_*X7kNs)%(this.m308*X7kNs))*this.T5$/(this.m308*X7kNs))
            }
            else
            {
                this.EH857=this.height/2+Math.round(((this.AUF5_*X7kNs)%(this.m308*X7kNs))*this.T5$/(this.m308*X7kNs))
            }
        }
        this.refresh()
    };
    this.refresh=function()
    {
        this.__2$();
        this.m02()
    };
    this.__2$=function()
    {
        this.K28.moveTo(0,0);
        this.h1V.moveTo(0,0);
        this.mB07.moveTo(0,0);
        if(this.wW1==false||this.wW1=="false")
        {
            this.mB07.graphics.clear()
        }
        this.bnx.moveTo(0,0);
        this.bnx.graphics.clear();
        this.bnx.clear();
        this.N0A.moveTo(0,0);
        this.N0A.graphics.clear();
        this.h1V.clean();
        this.h1V.c77d.innerHTML='';
        this.mB07.clean();
        var Ilq88='';
        NY3NB();
        {
        }
        var eTh=0;
        var R6Fj2=this.p5TU;
        if(this.mJ18<=6&&this.p5TU=='std')
        {
        }
        //这里改动了一下,其他地方没有改动,Tangf
        R6Fj2='mymap';
        for(CbB2m=-this._t4-1;CbB2m<=this._t4;CbB2m++)
        {
            for(mgy=-this.XKO-1;mgy<=this.XKO;mgy++)
            {
                var INdL=strImgsvrUrl+"mapbank/"+R6Fj2+"/"+this.B14;
                var i5$=strImgsvrUrl+"mapbank/poi/"+this.B14;
                if(true||this.mJ18>=1)
                {
                    var iw0B=e7DU4[this.mJ18];
                    var rATt=parseInt(Math.floor((this.fh1+CbB2m)/iw0B));
                    var Q7666=parseInt(Math.floor((this.P6Bw1+mgy)/iw0B));
                    {
                        if(rATt<0)rATt+=1;
                        if(Q7666<0)Q7666+=1
                    }
                    var OLU=(this.fh1+CbB2m)-rATt*iw0B;
                    var E09=(this.P6Bw1+mgy)-Q7666*iw0B;
                    i5$+=rATt+"_"+Q7666+"/";
                    INdL+=rATt+"_"+Q7666+"/"
                }
                else
                {
                    var OLU=(this.fh1+CbB2m);
                    var E09=(this.P6Bw1+mgy)
                }
                i5$+=OLU+"_"+E09+".png";
                INdL+=OLU+"_"+E09+"."+this.t$D3;
                if(this.mJ18<3||this.wW1==false||this.wW1=="false")
                {
                    i5$=null
                }
                {
                }
                var C7Cv1=(CbB2m*this.X3v)+this.SU4;
                var C1x=(-(mgy*this.T5$)+this.EH857);
                if(this.p5TU=="std")
                {
                    C1x=C1x+uGE$[this.mJ18]
                }
                if(C7Cv1<-this.X3v||C7Cv1>this.width||C1x>this.height||C1x<-this.T5$)continue;
                var rqr8$=((this.mJ18).toString(16)+(this.fh1+CbB2m).toString(16)+'l'+(this.P6Bw1+mgy).toString(16)).toLowerCase();
                if(eTh==0)
                {
                    eTh=1
                }
                if(INdL&&INdL.indexOf("NaN")<0)
                {
                    {
                        Ilq88+='<img id='+rqr8$+' name='+rqr8$+' src="'+INdL+'" ntry="0" unselectable=on onerror="javascript:imageTileError(this);" style="position:absolute;top:'+C1x+';left:'+C7Cv1+';">'
                    }
                }
                else
                {
                }
                if(i5$&&i5$.indexOf("NaN")<0)
                {
                }
                INdL=null;
                i5$=null
            }
        }
        this.h1V.c77d.innerHTML=Ilq88;
        Ilq88=null;
        if(this.h1V.c77d.parentNode!=this.K28.c77d)
        {
            this.K28.c77d.appendChild(this.h1V.c77d)
        }
        if(this.sCXJ.length>0)
        {
            for(g20pq=0;g20pq<this.sCXJ.length;g20pq++)
            {
                if(F4E9)
                {
                    this.sCXJ[g20pq].paint(this.bnx.c77d)
                }
                else
                {
                    this.sCXJ[g20pq].dI$59(this.bnx.graphics)
                }
            }
        }
        if(this.d27!=null)
        {
            if(F4E9)
            {
                this.d27.paint(this.bnx.c77d);
                this.af5.paint(this.bnx.c77d)
            }
            else
            {
                this.d27.dI$59(this.bnx.graphics);
                this.af5.dI$59(this.bnx.graphics)
            }
        }
        if(this.v8I.length>0)
        {
            for(g20pq=0;g20pq<this.v8I.length;g20pq++)
            {
                this.v8I[g20pq]._pS8(this.mB07.c77d);
                this.v8I[g20pq].paint(this.bnx.c77d)
            }
        }
        if(this.FK2.length>0)
        {
            this.FK2[this.FK2.length-1].label(this.bnx.graphics)
        }
        else
        {
            if(iToolTipStyle==0)hideToolTipMenu()
        }
        if(this.bnx.c77d.parentNode!=this.K28.c77d)
        {
            this.K28.c77d.appendChild(this.bnx.c77d)
        }
        this.h1V.graphics.paint();
        this.mB07.graphics.paint();
        this.N0A.graphics.paint();
        this.bnx.graphics.paint();

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -