You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
1 line
16 KiB
1 line
16 KiB
/**/_jsload2 && _jsload2('marker', 'function kh(a,b){0<a.$f.length?a.$f[a.$f.length-1].k.finish=b:a.k.finish=b} x.extend(kb.prototype,{initialize:function(a){this.map=a;this.Pj();this.ca();this.ig&&this.ig.ra(this.map,this);x.lang.Da.call(this,this.ba);if(this.V)return this.V.ba=this.ba,this.Oa||x.K.U(this.V),this.V},ca:function(){function a(a,b){var f=a.srcElement||a.target,g=a.clientX||a.pageX,i=a.clientY||a.pageY;if(a&&b&&g&&i&&f){var f=x.K.ia(c.Ua),j=Hb();b.pixel=b.Wa=new R(g-f.left+j[1],i-f.top+j[0]);b.point=c.Bg(b.Wa);b.pointN=c.Rb(b.Wa)}return b}if(this.V){var b=this,c=this.map;x.M(this.V,"mouseover", function(c){b.tl||b.dispatchEvent(a(c,na(new N("onmouseover"),c)))});x.M(this.V,"mouseout",function(c){b.tl||b.dispatchEvent(a(c,na(new N("onmouseout"),c)))});b.z.jf&&(x.M(this.V,"touchstart",function(a){b.ca.lC=new R(a.changedTouches[0].clientX,a.changedTouches[0].clientY)}),x.M(this.V,"touchend",function(c){var e=db(),f=new R(c.changedTouches[0].clientX,c.changedTouches[0].clientY);10<Math.abs(f.x-b.ca.lC.x)||10<Math.abs(f.y-b.ca.lC.y)?b.ca.lC=p:(b.dispatchEvent(a(c,na(new N("onclick"),c))),e-b.OH< b.map.B.OC&&b.dispatchEvent(a(c,na(new N("ondblclick"),c))),b.OH=e)}),J()||x.M(this.V,"click",function(c){for(var e=c.srcElement||c.target;e;){if(e===b.V){(!(b instanceof W)||b instanceof W&&(!b.Ov||b.Ov&&(b.ia().ab(b.Ov)||b.po().ab(b.Ov))))&&b.dispatchEvent(a(c,na(new N("onclick"),c)));break}else if(b.map&&b.map.La&&e===b.map.La.zc)break;e=e.parentNode}}),x.M(this.V,"dblclick",function(c){b.dispatchEvent(a(c,na(new N("ondblclick"),c)));pa(c)}),(!x.da.Te||4>x.da.Te)&&x.M(this.V,"contextmenu",function(c){b.dispatchEvent(a(c, na(new N("onrightclick"),c)))}));x.M(this.V,"mousedown",function(c){if(b instanceof W)b.Ov=b.po();b.dispatchEvent(a(c,na(new N("onmousedown"),c)))});x.M(this.V,"mouseup",function(c){b.dispatchEvent(a(c,na(new N("onmouseup"),c)));x.da.Te>=4&&(c.button===2&&b.z.jf)&&b.dispatchEvent(a(c,na(new N("onrightclick"),c)))})}},U:function(){this.Oa!==q&&(this.Oa=q,jd.prototype.U.call(this),this.Bb&&(this.Bb.cb&&this.Bb.cb===this)&&this.Wc())},show:function(){this.Oa!==o&&(this.Oa=o,jd.prototype.show.call(this))}, AO:function(a){if(a)for(var b in a)typeof this.z[b]===typeof a[b]&&(this.z[b]=a[b])},uu:function(a){this.zIndex=a;this.bm()},bm:function(){var a;Kb(this.zIndex)?a=this.zIndex:(a=0,this.map&&this.ia()&&(a=this.ia()?this.ia().lat:0,a=jd.Sm(a)+(this.z.FK||0)));this.V&&(this.V.style.zIndex=a)},Qo:function(a){this.ig=a;this.map&&a.ra(this.map,this)},aq:function(){this.ig.remove();this.ig=p}});U(Zf,{show:Zf.show,hide:Zf.U,addContextMenu:Zf.Qo,removeContextMenu:Zf.aq});W.gv=jd.Sm(-90)+1E6;W.UG=W.gv+1E6;W.CS=function(a){if(W.xv[a])return W.xv[a];var b=W.xv[a]=["BMap_"+Math.round(1E4*Math.random()),"BMap_"+Math.round(1E4*Math.random())],c=Fd[a],d=W.jV;d||(d=W.jV=H("style",{type:"text/css"}),document.getElementsByTagName("head")[0].appendChild(d));d.textContent+=W.cI(c.Um,b[0])+W.cI(c.vu,b[1]);return W.xv[a]}; W.cI=function(a,b){var c=["@-webkit-keyframes "+b+" {\\\\n"];x.kc.Fb(a,function(a){c.push(100*a.$b,"% { ");c.push("-webkit-transform: translate(",a.translate[0],"px,",a.translate[1],"px); ");c.push("-webkit-animation-timing-function: ",a.gc,"; ");c.push("}\\\\n")});c.push("}\\\\n");return c.join("")}; W.IQ=function(a,b){if(!W.Oh&&(W.Oh=H("img",{src:I.pa+"drag_cross.png",width:13,height:9}),W.Oh.style.position="absolute",6==x.da.ma)){delete W.Oh;var c=(W.Oh=H("div")).style;c.position="absolute";c.width="13px";c.height="9px";c.filter=\'progid:DXImageTransform.Microsoft.AlphaImageLoader(sizingMethod=image,src="\'+I.pa+\'drag_cross.png")\'}c=W.Oh.style;c.left=a.width-6+"px";c.top=a.height-5+"px";b.appendChild(W.Oh)};W.vU=function(){W.Oh&&W.Oh.parentNode&&W.Oh.parentNode.removeChild(W.Oh)};W.xv=[]; W.uH=function(){this.style.WebkitAnimation=""}; x.extend(W.prototype,{initialize:function(a){this.Er();kb.prototype.initialize.call(this,a);this.Oa||x.K.U(this.Bc);this.point=$a(this.point,this.map);this.ta(this.point);this.Vb(this.z.yj);this.hz(this.z.Wk);this.ez(this.z.rotation);this.z.label&&this.rv&&this.z.label.addEventListener("remove",this.rv);this.zn(this.z.label);this.Dc(this.z.title);this.aB();return this.V},Er:function(){this.Ui||(this.Ui=o,this.Yc=this.Bc=this.Pd=this.V=p,this.Bl=q)},Pj:function(){var a=this.map.Rf();this.V=Db(a.mF, this.TT());this.Bc=Db(a.rN,this.LT());this.Bc.ba=this.ba},TT:function(){var a=[\'<span class="BMap_Marker BMap_noprint" unselectable="on" \'];a.push(this.z.title?\'title="\'+this.z.title+\'"\':\'"\');a.push(\' style="position:absolute;padding:0;margin:0;border:0;width:0;height:0;-moz-user-select:none;\');a.push(this.z.jf?"cursor:pointer;":"");a.push("background:url("+I.pa+"blank.gif);");a.push("width:"+this.z.yj.size.width+"px;");a.push("height:"+this.z.yj.size.height+"px;");a.push(\'"></span>\');return a.join("")}, LT:function(){var a=[\'<span class="BMap_Marker" unselectable="on" \'];a.push(\'style="position:absolute;padding:0;margin:0;border:0;\');a.push(\'width:0;height:0;-moz-user-select:none"></span>\');return a.join("")},YU:function(){var a=[\'<span unselectable="on" \'];a.push(\'style="position:absolute;padding:0;margin:0;border:0;\');a.push(\'width:0;height:0;-moz-user-select:none"></span>\');return a.join("")},draw:function(){if(this.V){var a=this.XS();this.V.style.left=a[0].x+"px";this.V.style.top=a[0].y+"px"; this.Bc&&(this.Bc.style.left=a[0].x+"px",this.Bc.style.top=a[0].y+"px");this.Pd&&(this.Pd.style.left=a[1].x+"px",this.Pd.style.top=a[1].y+"px");this.Bb!=p&&this.Bb.Va()&&this.Bb.ta();this.bm()}},XS:function(){var a=this.z.Aa||new M(0,0),b=this.z.yj.anchor||new M(0,0),c=this.map.We(this.ia()),b=[new R(c.x+a.width-b.width,c.y+a.height-b.height)];if(this.z.Wk){var d=this.z.Wk.anchor||new M(0,0);b[1]=new R(c.x+a.width-d.width,c.y+a.height-d.height)}return b},Ab:function(){this.map?(this.V=this.initialize(this.map), this.Tq&&(this.yn(this.Tq),delete this.Tq)):delete this.Tq},remove:function(){this.yn(p);this.Bc&&this.Bc.parentNode&&this.Bc.parentNode.removeChild(this.Bc);this.Pd&&this.Pd.parentNode&&this.Pd.parentNode.removeChild(this.Pd);this.Bb&&(this.Bb.cb&&this.Bb.cb===this)&&(this.Wc(),this.Bb=p);this.ac=this.Yc=this.Pd=this.Bc=p;if(this.z.label){var a=this.z.label;a.removeEventListener("remove",this.rv);x.lang.yx(a.ba);a.DO(p);a.V=p;this.z.label=p}kb.prototype.remove.call(this)},U:function(){kb.prototype.U.call(this); this.V&&x.K.U(this.V);this.Bc&&x.K.U(this.Bc);this.Pd&&x.K.U(this.Pd)},show:function(){kb.prototype.show.call(this);this.V&&x.K.show(this.V);this.Bc&&x.K.show(this.Bc);this.Pd&&x.K.show(this.Pd)},Vb:function(a){if(a instanceof nd||a instanceof od)if(this.z.yj=a,this.map&&this.V&&this.Bc){try{this.Yc&&(this.Bc.removeChild(this.Yc),this.Yc=p),this.V.style.width=a.size.width+"px",this.V.style.height=a.size.height+"px"}catch(b){}if(this.z.yj){var c=this.Yc=H(a instanceof nd?"div":"canvas"),d=c.style; d.position="absolute";d.padding=d.margin="0";d.width=a.size.width+"px";d.height=a.size.height+"px";d.overflow="hidden";a instanceof od?(c.width=a.size.width,c.height=a.size.height,a.Ab(c)):(c.innerHTML=lh(a),c.OL=q);this.Bc.appendChild(this.Yc)}this.draw()}},hz:function(a){if(a instanceof nd&&(this.z.Wk=a,this.map&&this.V&&this.Bc)){this.Pd||(this.Pd=Db(this.map.Rf().sN,this.YU()));try{this.ac&&(this.Pd.removeChild(this.ac),this.ac=p),this.Pd.style.width=a.size.width+"px",this.Pd.style.height=a.size.height+ "px"}catch(b){}if(this.z.Wk){var c=this.ac=H("div"),d=c.style;d.position="absolute";d.padding=d.margin="0";d.width=a.size.width+"px";d.height=a.size.height+"px";d.overflow="hidden";c.innerHTML=lh(a);c.OL=q;this.Pd.appendChild(this.ac)}this.draw()}},zn:function(a){if(a&&a instanceof ud){var b=this;L.load("marker",function(){b.RU(a)},o)}},RU:function(a){if(a instanceof ud){this.z.label=a;var b=this;this.z.label.Pi||(this.z.label.Pi=o,this.rv=function(){b.z.label=p},this.z.label.addEventListener("remove", this.rv));if(this.map){a.Ie(this.map);a.V?this.Bc.appendChild(a.V):(a.V=Db(this.V,a.va()),a.V.ba=a.ba);var c=a.V.style;c.left=a.z.Aa.width+"px";c.top=a.z.Aa.height+"px";a.DO(this)}}},aB:function(){function a(a,b){b.pixel=b.Wa=a.Wa;b.point=b.point=a.point;b.pointN=b.Cg=a.Cg;return b}function b(a){var b=a.clientX,c=a.clientY;a.changedTouches&&(b=a.changedTouches[0].clientX,c=a.changedTouches[0].clientY);return new R(b,c)}if(this.V&&!this.V.Pi){this.V.Pi=o;var c=this.map,d=this,e=0,f=0,g=0,i={x:0,y:0}; this.Zs=function(a){if(d.z.Gb&&2!=a.button){d.Bl=o;var i=c.Cc(d.point),m=b(a);e=m.x-i.x;f=m.y-i.y;g=db();d.map&&d.map.R&&(d.map.R.zv=d);x.M(d.map.platform,"mousemove",d.mj);x.M(d.map.platform,"mouseup",d.lj);x.M(d.map.platform,"touchmove",d.mj);x.M(d.map.platform,"touchend",d.lj);d.V&&d.V.setCapture&&d.V.setCapture();d.V.style.cursor=d.z.Id;"touchstart"==a.type&&oa(a)}};this.mj=function(g){if(d.Bl&&(g=b(g),i=g=new R(g.x-e,g.y-f),d.AA=g,d.z.rO&&15<g.x&&g.x<d.map.width-15&&30<g.y&&g.y<d.map.height- 15||!d.z.rO)){var l=d.map.Bg(g),m=d.map.Rb(g),m={Wa:g,point:l,Cg:m};d.Pl=d.Ql=0;if(20>=g.x||g.x>=d.map.width-20||50>=g.y||g.y>=d.map.height-10){if(20>=g.x?d.Pl=8:g.x>=d.map.width-20&&(d.Pl=-8),50>=g.y?d.Ql=8:g.y>=d.map.height-10&&(d.Ql=-8),!d.He)d.He=setInterval(function(){c.Ag(d.Pl,d.Ql,{noAnimation:o});var a=c.Bg(d.AA);d.ta(a)},30)}else d.He&&(clearInterval(d.He),d.He=p),d.ta(l);d.tl||(d.dispatchEvent(a(m,new N("ondragstart"))),d.tl=o,d.z.kO&&(d.yn(3),W.IQ(d.z.yj.anchor,d.Bc)));d.dispatchEvent(a(m, new N("ondragging")))}};this.lj=function(){d.V&&d.V.releaseCapture&&d.V.releaseCapture();d.Bl=q;d.map&&d.map.R&&(d.map.R.zv=p);x.cd(document,"mousemove",d.mj);x.cd(document,"mouseup",d.lj);x.cd(document,"touchmove",d.mj);x.cd(document,"touchend",d.lj);e=f=0;d.He&&(clearInterval(d.He),d.He=p);if(100<=db()-g&&(2<i.x||2<i.y))d.tl=q,d.dispatchEvent(a({Wa:d.map.Cc(d.po()),point:d.ia(),Cg:d.po()},new N("ondragend"))),d.z.kO&&(d.yn(4),W.vU()),i.x=i.y=0;d.bm();d.V&&(d.V.style.cursor=d.z.jf?"pointer":"")}; x.M(this.V,"mousedown",this.Zs);x.M(this.V,"touchstart",this.Zs)}},ta:function(a){var b=$a(a,this.map);if(a instanceof O||a instanceof K)this.point=this.z.point=this.map?new K(b.lng,b.lat):b,this.draw()},bm:function(){var a;this.Bl==o?a=W.UG:this.z.$E==o?a=W.gv+(this.pH||0):Kb(this.zIndex)?a=this.zIndex:(a=0,this.map&&this.ia()&&(a=jd.Sm(this.ia().lat)+this.z.FK));this.V&&(this.V.style.zIndex=a);this.Bc&&(this.Bc.style.zIndex=a)},Ei:function(a,b){this.z.$E=!!a;a&&(this.pH=b||0);this.bm()},Dc:function(a){this.z.title= a+"";this.V&&(this.V.title=this.z.title)},Ye:function(a){a instanceof M&&(this.z.Aa=a,this.ta(this.ia()))},yn:function(a){var b=this;L.load("markeranimation",function(){b.PU(a)},o)},PU:function(a){if(this.Yc){this.pR(a!=p);var b=Fd[a];b&&(b=b?b.options.wP:q,!J()||b?this.mS(a):this.lS(a))}},pR:function(a){this.GH(this.Yc);this.GH(this.ac);if(a){if(this.Qj&&(this.Qj.stop(),this.Qj=p),this.Yc.style.top=this.Yc.style.left="0px",this.ac)this.ac.style.top=this.ac.style.left="0px"}else if(this.Qj){var b= this;kh(this.Qj,function(){b.Qj=p})}},lS:function(a){var b=Fd[a],a=W.CS(a);this.EJ(this.Yc,a[0],b);this.EJ(this.ac,a[1],b)},GH:function(a){a&&(a.style.WebkitAnimation="",x.cd(a,"webkitAnimationEnd",W.uH))},EJ:function(a,b,c){a&&(x.M(a,"webkitAnimationEnd",W.uH),a.style.WebkitAnimation=b+" "+c.options.duration+"ms"+(c.options.loop==yb?" infinite":""))},mS:function(a){var b=this.Yc.style,c=q,d;this.ac&&(c=o,d=this.ac.style);var e=Fd[a],f=this,g=e.Um.length,i=e.options.duration,j=f.Qj=new wb({duration:0, ep:yb}),l=e.Um,m=e.vu;b.top=l[0].translate[1]+"px";c&&(d.left=m[0].translate[0]+"px",d.top=m[0].translate[1]+"px");for(var n=1;n<g;n++)(function(){function a(){}var b=[l[n].translate[0]-l[n-1].translate[0],l[n].translate[1]-l[n-1].translate[1]],d=[l[n-1].translate[0],l[n-1].translate[1]];if(c)var y=[m[n].translate[0]-m[n-1].translate[0],m[n].translate[1]-m[n-1].translate[1]],D=[m[n-1].translate[0],m[n-1].translate[1]];var C=xb[l[n-1].gc];n==g-1&&(a=e.options.loop!=yb?function(){f.Qj=p}:function(){f.Qj.start()}); j.add(new wb({duration:(e.Um[n].$b-l[n-1].$b)*i,Hc:40,ep:yb,hc:C,va:function(a){if(f.Yc)f.Yc.style.top=d[1]+Math.round(a*b[1])+"px";if(c&&f.ac){f.ac.style.left=D[0]+Math.round(a*y[0])+"px";f.ac.style.top=D[1]+Math.round(a*y[1])+"px"}},finish:a}))})();j.start()},ez:function(a){if(a&&(this.z.rotation=a,this.map&&this.V&&this.Bc))try{if(this.Yc){var b=this.Yc.style;b.webkitTransform="rotate("+this.z.rotation+"deg)";b.CZ="rotate("+this.z.rotation+"deg)";b.transform="rotate("+this.z.rotation+"deg)";var c= Math.cos(this.z.rotation/180*Math.PI),d=-Math.sin(this.z.rotation/180*Math.PI),e=Math.sin(this.z.rotation/180*Math.PI),f=Math.cos(this.z.rotation/180*Math.PI);b.filter="progid:DXImageTransform.Microsoft.Matrix(sizingMethod=\'auto expand\',M11="+c+",M12= "+d+",M21= "+e+",M22="+f+")";b.EZ="progid:DXImageTransform.Microsoft.Matrix(sizingMethod=\'auto expand\',M11="+c+",M12= "+d+",M21= "+e+",M22="+f+")";b.V5="bottom 50%";b.DZ="bottom 50%";b.I0="bottom 50%"}this.ac&&(b=this.ac.style,b.webkitTransform="rotate("+ this.z.rotation+"deg)",b.CZ="rotate("+this.z.rotation+"deg)",b.transform="rotate("+this.z.rotation+"deg)",c=Math.cos(this.z.rotation/180*Math.PI),d=-Math.sin(this.z.rotation/180*Math.PI),e=Math.sin(this.z.rotation/180*Math.PI),f=Math.cos(this.z.rotation/180*Math.PI),b.filter="progid:DXImageTransform.Microsoft.Matrix(sizingMethod=\'auto expand\',M11="+c+",M12= "+d+",M21= "+e+",M22="+f+")",b.EZ="progid:DXImageTransform.Microsoft.Matrix(sizingMethod=\'auto expand\',M11="+c+",M12= "+d+",M21= "+e+",M22="+ f+")",b.G1="bottom 50%",b.DZ="bottom 50%",b.I0="bottom 50%")}catch(g){}}});U($f,{setIcon:$f.Vb,setPosition:$f.ta,setOffset:$f.Ye,setLabel:$f.zn,setTitle:$f.Dc,setTop:$f.Ei,setAnimation:$f.yn,setShadow:$f.hz,show:$f.show,hide:$f.U,remove:$f.remove,setRotation:$f.ez,getRotation:$f.jM});function lh(a){var b="",b="",c=a.imageUrl,d=a.imageOffset,e=a.imageSize;6==x.da.ma&&0<c.toLowerCase().indexOf(".png")?(b=["<div"],a.printImageUrl&&b.push(\' class="BMap_noprint"\'),b.push(\' style="width: 1px; height: 1px;\'),b.push("; left:"+d.width+"px"),b.push("; top:"+d.height+"px"),b.push("; filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(sizingMethod=image,src=\'"+c+"\')"),b.push(\'; position:absolute;"></div>\'),a.printImageUrl&&(b.push(\'<img class="BMap_noscreen" style="display: block; border:none;margin-left:\'+ d.width+"px;"),b.push("margin-top:"+d.height+\'px;" src="\'+a.printImageUrl+\'" />\'))):(b=[\'<img src="\',c,\'" style="display: block; border:none;margin-left:\'+d.width+"px","; margin-top:"+d.height+"px","; "],e&&b.push("; width:"+e.width+"px; height:"+e.height+"px;"),b.push(\'" />\'));return b=b.join("")};x.extend(ud.prototype,{Pj:function(){var a=this.z,b=this.content,c=H("label",{"class":"BMapLabel",unselectable:"on"});a.title&&(c.title=a.title);var d=c.style;d.position="absolute";d.MozUserSelect="none";0==a.width||"auto"==a.width?d.display="inline":(d.width=a.width+"px",d.display="block",d.overflow="hidden");"true"==a.jf?d.cursor="pointer":x.da.ma||(d.cursor="inherit");c.innerHTML=b;this.map.Rf().eF.appendChild(c);this.V=c;this.bd(a.tq);return c},ta:function(a){if((a instanceof O||a instanceof K)&& !this.Ux())this.point=this.z.position=new K(a.lng,a.lat),this.draw()},draw:function(){if(this.V&&this.ia()&&!this.Ux()){var a=this.z.Aa||new M(0,0),b=this.map.We(this.ia());this.V.style.left=b.x+a.width+"px";this.V.style.top=b.y+a.height+"px";this.bm()}},Ab:function(){this.map&&!this.Sv&&(this.V=this.initialize(this.map),this.draw())},ad:function(a){this.content=a;this.V&&(this.V.innerHTML=a)},aG:function(a){0<=a&&1>=a&&(this.z.opacity=a);if(this.V){var b=this.V.style;b.opacity=a;b.filter="alpha(opacity="+ 100*a+")"}},Ye:function(a){a instanceof M&&(this.z.Aa=new M(a.width,a.height),this.Ux()&&this.V?(this.V.style.left=a.width+"px",this.V.style.top=a.height+"px"):this.draw())},bd:function(a){a=a||{};this.z.tq=x.extend(this.z.tq,a);if(this.V)for(var b in a)try{this.V.style[b]=a[b]}catch(c){}},Dc:function(a){this.z.title=a+"";this.V&&(this.V.title=this.z.title)}});U(ag,{setStyle:ag.bd,setContent:ag.ad,setPosition:ag.ta,setOffset:ag.Ye,setTitle:ag.Dc}); '); |