scommon_mddzoo.js 12 KB

12345678
  1. /* 百度地图API V2 模块
  2. * 此模块必须配套使用baidumap_offline_v2_20160822.js对
  3. * 获取模块的方法:
  4. * http://api0.map.bdimg.com/getmodules?v=2.0&mod=模块1,模块2
  5. * 模块名称就是文件名
  6. * www.xiaoguo123.com 整理
  7. */
  8. _jsload2&&_jsload2('scommon', 'var Og=new L(23,25),Pg=new L(9,25),Qg=new L(9,0);U.NU=function(a,b,c,d){var e=Rg(b);if(e&&!(0>c||9<c)){b=p;e=new T(e);if(G()){var f=function(){return new nc(F.pa+"markers_hd.png",new L(22,31),{anchor:new L(11,31),imageOffset:new L(0,-32*c),imageSize:new L(85,477),infoWindowAnchor:new L(11,0)})},b=f(),f=f();f.Mt(new L(-28,-32*c));e.eE=b;e.SL=f}else b=new nc(F.pa+"markers.png",Og,{anchor:Pg,imageOffset:new L(0,-25*c),infoWindowAnchor:Qg});e.Tb(b);a.Ia(e);d&&e.Dc(d);return e}}; U.kw=function(a,b,c){if(b=Rg(b)){var b=new T(b),d=p;G()?(d=new nc(F.pa+"markers_hd.png",new L(21,31),{anchor:Pg,imageOffset:new L(-29,-320),imageSize:new L(85,477),infoWindowAnchor:Qg}),b.eE=d):d=new nc(F.pa+"markers.png",Og,{anchor:Pg,imageOffset:new L(0,-250),infoWindowAnchor:Qg});b.Tb(d);a.Ia(b);c&&b.Dc(c);return b}}; U.MU=function(a,b,c){if(b=Rg(b)){var b=new T(b),d=p;if(G()){var e=function(){return new nc(F.pa+"markers_hd.png",new L(21,31),{anchor:Pg,imageOffset:new L(0,-383),imageSize:new L(85,477),infoWindowAnchor:Qg})},d=e(),e=e();e.Mt(new L(-29,-352));b.eE=d;b.SL=e}else d=new nc(F.pa+"markers.png",Og,{anchor:Pg,imageOffset:new L(0,-300),infoWindowAnchor:Qg});b.Tb(d);a.Ia(b);c&&b.Dc(c);return b}}; function Rg(a){var b=[],b=p;if(a instanceof H)b=a;else{if("string"==typeof a){b=x.trim(a).split(",");if(2>b.length)return;b[0]=parseFloat(x.trim(b[0]));b[1]=parseFloat(x.trim(b[1]))}else if(b=a.slice(0),2>b.length)return;b=new H(b[0],b[1])}return b} U.SV=function(a){var b=a.title,c=a.Wr,d=a.y_,e=a.cW,a=a.UE||0;if(!b)return p;var f=b;1==a?f+="-\\u516c\\u4ea4\\u8f66\\u7ad9":3==a&&(f+="-\\u5730\\u94c1\\u7ad9");var g=13;e&&(g=10);f.replace(/[\\u0100-\\uffff]/g,"##").length>2*g+1&&(f=f.substring(0,g)+"&#8230");b="<p style=\'width:210px;font:bold 14px/16px "+F.fontFamily+";margin:0;color:#cc5522;white-space:nowrap;overflow:hidden\' title=\'"+b+"\'>"+f;e&&(b+="<a target=\'_blank\' href=\'"+e+"\' style=\'margin-left:5px;font-size:12px;color:#3d6dcc;font-weight:normal;text-decoration:none;\'>\\u8be6\\u60c5\\u00bb</a>"); b+="</p>";e=[];e.push("<div style=\'font:12px "+F.fontFamily+";margin-top:10px\'>");if(c){f="\\u5730\\u5740\\uff1a";if(1==a||3==a)f="\\u8f66\\u6b21\\uff1a";e.push(\'<table cellspacing="0" style="overflow:hidden;table-layout:fixed;width:100%;font:12px \'+F.fontFamily+\'" >\');e.push(\'<tr><td style="vertical-align:top;width:38px;white-space:nowrap;word-break:keep-all">\'+f+\'&nbsp;</td><td style="line-height:16px">\');e.push(c+"&nbsp;</td></tr>");d&&e.push(\'<tr><td style="vertical-align:top;">\\u7535\\u8bdd\\uff1a</td><td>\'+ d+"</td></tr>");e.push("</table>")}else d&&(e.push(\'<table cellspacing="0" style="table-layout:fixed;width:100%;font:12px \'+F.fontFamily+\'">\'),e.push(\'<tr><td style="vertical-align:top;width:36px;white-space:nowrap;word-break:keep-all">\\u7535\\u8bdd\\uff1a</td><td>\'+d+"</td></tr></table>"));e.push("</div>");return new qc(e.join(""),{title:b,height:0,width:230,margin:[10,10,20,10]})}; U.vo=function(a,b,c,d){if(b=Rg(b))return d=new T(b,{icon:G()?new nc(F.pa+"dest_mkr.png",new L(29,34),{anchor:new L(14,32),imageSize:new L(94,41),imageOffset:new L(-29*d,0),infoWindowAnchor:new L(14,0)}):new nc(F.pa+"dest_markers.png",new L(42,34),{anchor:new L(14,32),imageOffset:new L(0,-34*d),infoWindowAnchor:new L(14,0)}),baseZIndex:35E5,draggingCursor:"pointer"}),a.Ia(d),c&&d.Dc(c),d};U.wo=function(a,b){return U.Ql(a,b,Zc)}; U.zP=[{stroke:6,color:"#0030ff",opacity:0.45,style:"solid"},{stroke:5,color:"#00bd00",opacity:0.95,style:"solid"},{stroke:5,color:"#ffac00",opacity:0.95,style:"solid"},{stroke:5,color:"#f41c0d",opacity:0.95,style:"solid"}]; U.yP=[{stroke:6,color:"#0030ff",opacity:0.45,style:"solid"},{stroke:6,color:"#0030ff",opacity:0.45,style:"solid"},{stroke:4,color:"#30a208",opacity:0.55,style:"dashed"},{stroke:5,color:"#0030ff",opacity:0.45,style:"solid"},{stroke:4,color:"#ff0103",opacity:0.65,style:"dashed"},{stroke:5,color:"#ff0103",opacity:0.65,style:"solid"}]; U.HJ=function(a,b,c){var d=U.zP;"undefined"==typeof c&&(c=0);if(d[c])return d=d[c],b=new Ac(b,{strokeWeight:d.stroke,strokeColor:d.color,strokeOpacity:d.opacity,strokeStyle:d.style,clickable:q}),a.Ia(b),b.c1=c,b}; U.Ql=function(a,b,c){var d=U.yP;"undefined"==typeof c&&(c=0);if(d[c]){var e=d[c],d=new Ac(b,{strokeWeight:e.stroke,strokeColor:e.color,strokeOpacity:e.opacity,strokeStyle:e.style,clickable:q});a.Ia(d);d.X0=c;c==Zc&&(b=new Ac(b,{strokeWeight:e.stroke-2,strokeColor:"#fff",strokeOpacity:0.3,clickable:q}),d.ZA=b,a.Ia(b));return d}}; U.Kw=function(a){var b=a.content,c=a.Nw,d=a.total,e=a.Yx,f=a.n3,a=a.TX,g=["<div style=\'font:12px "+F.fontFamily+"\'>"];b&&g.push("<div style=\'margin:10px 1em 24px 0\'>"+b+"</div>");a||g.push(U.KW(d,c));g.push("</div>");b=new qc(g.join(""),{title:"",height:0,width:220,margin:[10,10,20,10]});if(a)return b;b.addEventListener("open",function(){var a=G()?"touchend":"click";x.Ec("trans_prev")&&x.M(x.Ec("trans_prev"),a,function(){e&&"function"==typeof e&&e(c-1,f)});x.Ec("trans_next")&&x.M(x.Ec("trans_next"), a,function(){e&&"function"==typeof e&&e(c+1,f)})});return b}; U.KW=function(a,b){var c=[];c.push(\'<table id="trans_nav" width="99%" cols="2" style="background:#eaf2ff;font:12px \'+F.fontFamily+\'"><tbody><tr>\');c.push(\'<td nowrap="nowrap" width="50%" align="left">\');0==b?c.push(\'<span unselectable="on" style="color:#9c9d99;-moz-user-select:none" >\\u4e0a\\u4e00\\u6b65</span>\'):c.push(\'<a id="trans_prev" style="color:#7777cc;-moz-user-select:none" href="javascript:void(0)">\\u4e0a\\u4e00\\u6b65</a>\');c.push("</td>");c.push(\'<td nowrap="nowrap" width="50%" align="right">\'); b==a+1?c.push(\'<span unselectable="on" style="color:#9c9d99;-moz-user-select:none" >\\u4e0b\\u4e00\\u6b65</span>\'):c.push(\'<a style="color:#7777cc" id="trans_next" href="javascript:void(0)">\\u4e0b\\u4e00\\u6b65</a>\');c.push("</td></tr></tbody></table>");return c.join("")}; U.JJ=function(a,b,c,d){if(b=Rg(b)){c=c||0;if(G())c=new nc(F.pa+"dest_mkr.png",new L(20,20),{imageSize:new L(94,41),imageOffset:new L(-59,-21*c),infoWindowAnchor:new L(10,0)});else{var e=-55;1==c&&(e=-76);c=new nc(F.pa+"trans_icons.png",new L(21,21),{imageOffset:new L(0,e),infoWindowAnchor:new L(10,0)})}c=new T(b,{icon:c});a.Ia(c);d&&c.Dc(d);return c}};U.Qs=function(a){return a&&a.La&&a.La.og?a.La.og.childNodes[0]:p}; U.QU=function(a,b,c){b=new T(b,{icon:new nc(Gd.sU,new L(11,11))});c&&b.Dc(c);a.Ia(b);return b};U.EJ=function(a,b){var c=new T(b,{icon:new nc(F.pa+"drag.png",new L(11,11)),draggingCursor:"pointer"});a.Ia(c);c.St(10);return c};U.KJ=function(a,b,c){b=new T(b,{icon:new nc(F.pa+"way-points.png",new L(36,40),{imageOffset:new L(-11+-36*c,-35)}),draggingCursor:"pointer",offset:new L(5,-20)});a.Ia(b);b.St(10);return b}; U.sK=function(){var a=new rc("\\u62d6\\u52a8\\u4ee5\\u66f4\\u6539\\u8def\\u7ebf",{offset:new L(30,-10)});a.Kd({border:"solid 1px gray",padding:"2px",whiteSpace:"nowrap",background:"#fff"});return a};U.WW=function(a,b){if(a&&b)return Math.round(Math.sqrt(Math.pow(a.x-b.x,2)+Math.pow(a.y-b.y,2)))}; U.OU=function(a,b,c,d){var e={type:"RouteAddrMarker"},a=Rg(a),e=e||{};e.type=e.type||"normal";if(a&&!("undefined"==typeof b||0>b||9<b&&"child"!==e.type||39<b&&"child"===e.type)){var f;f=F.pa+"markers_new.png";var g=0;"RouteAddrMarker"==e.type&&(g=-F.ZF);g=new nc(f,F.aG,{offset:F.ZO,imageOffset:new L(-F.$F*b,g),infoWindowOffset:F.XF});f=b+1;b=new T(a,{icon:g,zIndexFixed:o,baseZIndex:25E5-100*b});b.A1={type:e.type};d.Ia(b);b.Z0=f;c&&b.Dc(c);return b}};V.Tc=1;V.Yp=2;V.Bn=3;V.vu=4;V.wu=5;V.uu=6;V.tu=7;V.fG=8;V.eG=9;V.Nh=function(a,b){return a?z.qp+"?s="+encodeURIComponent("inf&uid="+a+"&c="+b)+"&i=0&sr=1":""};V.$R=function(a){return!a?-1:"string"==typeof a?2:a instanceof H?1:a instanceof Ka?0:"number"==typeof a?3:-1}; x.extend(V.prototype,{Lg:function(a,b){var c=V.$R(a.src);if(-1!=c){var d=this;if(3==c)b&&b(a.src);else if(2==c)a.wC==c&&a.xC==a.src&&a.em?b&&b(a.em):(a.wC=c,a.xC=a.src,$c.ab(function(a){a&&(a.result&&2==a.result.type)&&(d.zd.em=a.content.code,b&&b(d.zd.em))},{qt:"cur",wd:a.src}));else{var e,f=18;0==c?a.src.Jx()?(e=a.src.Ja(),f=a.src.fa()):a.src.addEventListener("load",function(){d.Lg(a,b)}):e=a.src;c==a.wC&&a.xC.mb(e)&&a.em?b&&b(a.em):(0==c&&(e=R.xb(e)),1==c&&(e=R.xb(e)),a.wC=c,a.xC=new H(e.lng,e.lat), $c.ab(function(a){if(a&&a.result&&a.result.type==4){d.zd.em=a.content?a.content.uid:1;b&&b(d.zd.em)}},{qt:"cen",b:e.lng+","+e.lat+";"+e.lng+","+e.lat,l:f}))}}},rb:function(a){"number"==typeof a?this.Bd=a:delete this.Bd},Ra:function(a,b,c){var d;d="undefined"===typeof b?4:b.tr&&b.tr.length?1:"[object Object]"===Object.prototype.toString.call(b.Nv)&&"[object Object]"===Object.prototype.toString.call(b.$u)?3:2;switch(a){case V.Tc:(a=this.k.ay)&&a(b,d);break;case V.Yp:(a=this.k.cN)&&a(b,c);break;case V.vu:(a= this.k.NE)&&a(b,c);break;case V.Bn:(a=this.k.bN)&&a(b,c);break;case V.wu:(a=this.k.eN)&&a(b,c);break;case V.uu:(a=this.k.aN)&&a(b,c);break;case V.tu:(a=this.k.$M)&&a(b,c);break;case V.fG:(a=this.k.YM)&&a(b,c);break;case V.eG:(a=this.k.XM)&&a(b,c)}}});var Sg=0,Tg=1,Ug=2;P.unique=function(a){for(var b=[],c={},d=0,e=a.length;d<e;d++)c[a[d]]||(c[a[d]]=o,b.push(a[d]));return b};P.bx=function(a,b){if(b)var c=Math.min(b.width/1100,b.height/660),a=Math.round(a+Math.log(c)/Math.log(2));1>a&&(a=1);18<a&&(a=18);return a}; P.tb=function(a,b){if("string"==typeof a&&a){var c=a.split("|"),d,e,f;if(1==c.length)d=Vg(a);else if(d=Vg(c[2]),e=Vg(c[0]),f=Vg(c[1]),!b)return d;c={type:d.OW};if(b)switch(c.type){case Ug:e=new H(d.Fd[0][0],d.Fd[0][1]);e=R.Eb(e);c.point=e;c.ia=[e];break;case Tg:c.ia=[];d=d.Fd[0];for(var g=0,i=d.length-1;g<i;g+=2){var k=new H(d[g],d[g+1]),k=R.Eb(k);c.ia.push(k)}e=new H(e.Fd[0][0],e.Fd[0][1]);f=new H(f.Fd[0][0],f.Fd[0][1]);e=R.Eb(e);f=R.Eb(f);c.gb=new fb(e,f)}return c}}; P.lN=function(a){var b;b?0.25>b?b=0:0.25<b&&1>b?b=1:32<b&&(b=32):b=0;var c=a.split("|");if(1==c.length){var d=Vg(c[0]);return{type:d.type,bound:"",ia:d.Fd.join(",")}}if(1<c.length){for(var e=a.split(";.="),a=[],f=[],g=0,i=e.length,c=0;c<i;c++){g=e[c];1<i&&(0==c&&(g+=";"),0<c&&c<i-1&&(g=".="+g+";"),c==i-1&&(g=".="+g));var g=g.split("|"),d=Vg(g[0]),k=Vg(g[1]);a.push(d.Fd.join(","));a.push(k.Fd.join(","));d=Vg(g[2]);g=d.type;d=d.Fd.join(",");d=P.bZ(d);0<b&&(d=P.cZ(d,b));f.push(d)}1>=i&&(f=f.join(";")); if(2==i){b=(f[0]+";"+f[1]).split(";");e=[];for(c=0;c<b.length;c++)f=new H(b[c].split(",")[0],b[c].split(",")[1]),f=R.Eb(f),e.push(f);f=e}return{type:g,bound:a.join(";"),ia:f}}};P.vL=function(a){var b=[],b=p;if("Point"==a.toString())b=a;else{if("string"==typeof a){b=ha.trim(a).split(",");if(2>b.length)return;b[0]=parseFloat(ha.trim(b[0]));b[1]=parseFloat(ha.trim(b[1]))}else if(b=a.slice(0),2>b.length)return;b=new z.Yf(b[0],b[1])}return b};P.dZ=function(a){a=a.split(",");a=new H(a[0],a[1]);return R.Eb(a)}; P.vg={country:4,province:11,city:12,j1:13};var Wg=["=",".","-","*"],Xg=8388608; function Vg(a){var b;b=a.charAt(0);var c=-1;b==Wg[1]?c=Ug:b==Wg[2]?c=Tg:b==Wg[3]&&(c=Sg);b=c;for(var c=a.substr(1),d=0,e=c.length,f=[],a=[],g=[];d<e;)if(c.charAt(d)==Wg[0]){if(13>e-d)return 0;a:{for(var g=c.substr(d,13),i=f,k=0,l=0,m=0,n=0;6>n;n++){m=Yg(g.substr(1+n,1));if(0>m){g=-1-n;break a}k+=m<<6*n;m=Yg(g.substr(7+n,1));if(0>m){g=-7-n;break a}l+=m<<6*n}i.push(k);i.push(l);g=0}if(0>g)return 0;d+=13}else if(";"==c.charAt(d))a.push(f.slice(0)),f.length=0,++d;else{if(8>e-d)return 0;g=Zg(c.substr(d, 8),f);if(0>g)return 0;d+=8}c=0;for(d=a.length;c<d;c++){e=0;for(f=a[c].length;e<f;e++)a[c][e]/=100}return{OW:b,Fd:a}}function Zg(a,b){var c=b.length;if(2>c)return-1;for(var d=0,e=0,f=0,g=0;4>g;g++){f=Yg(a.substr(g,1));if(0>f)return-1-g;d+=f<<6*g;f=Yg(a.substr(4+g,1));if(0>f)return-5-g;e+=f<<6*g}d>Xg&&(d=Xg-d);e>Xg&&(e=Xg-e);b.push(b[c-2]+d);b.push(b[c-1]+e);return 0}function Yg(a){var b=a.charCodeAt(0);return"A"<=a&&"Z">=a?b-65:"a"<=a&&"z">=a?26+b-97:"0"<=a&&"9">=a?52+b-48:"+"==a?62:"/"==a?63:-1}; ');