window.BMAP_AUTHENTIC_KEY="";(function(){var k=k||{version:"20080809",emptyFn:function(){}};(function(){k._log=[];var ar=0;var at={};k.BaseClass=function(au){at[(this.hashCode=(au||k.BaseClass.guid()))]=this};k.BaseClass.guid=function(){return"mz_"+(ar++).toString(36)};k.BaseClass.create=function(){var au=new k.BaseClass();au.decontrol();return au};var e=k.instance=k.I=function(au){return at[au]};k.BaseClass.prototype.dispose=function(){if(this.hashCode){delete at[this.hashCode]}for(var au in this){if(typeof this[au]!="function"){delete this[au]}}};k.BaseClass.prototype.getHashCode=function(){if(!this.hashCode){at[(this.hashCode=k.BaseClass.guid())]=this}return this.hashCode};k.BaseClass.prototype.decontrol=function(){delete at[this.hashCode]};k.BaseClass.prototype.toString=function(){return"[object "+(this._className||"Object")+"]"};k.BaseClass.prototype._wlog=function(av,aw){var au=k._log;if(au.length>100){au.reverse().length=50;au.reverse()}au[au.length]="["+av+"]["+(this._className||"Object")+" "+this.hashCode+"] "+aw}})();Function.prototype.inherits=function(at,ar){var e,au,aw=this.prototype,av=function(){};av.prototype=at.prototype;au=this.prototype=new av();if(typeof(ar)=="string"){au._className=ar}for(e in aw){au[e]=aw[e]}this.prototype.constructor=aw.constructor;aw=av=null;return au};k.BaseEvent=function(e,ar){this.type=e;this.returnValue=true;this.target=ar||null;this.currentTarget=this.srcElement=null;this.cancelBubble=false;this.domEvent=null};k.BaseClass.prototype.addEventListener=function(au,at,ar){if(typeof at!="function"){return this._wlog("error","addEventListener:"+at+" is not a function")}if(!this._listeners){this._listeners={}}var e=this._listeners,av;if(typeof ar=="string"&&ar){if(/[^\w\-]/.test(ar)){this._wlog("warning","nonstandard key:"+ar)}else{at.hashCode=ar;av=ar}}if(au.indexOf("on")!=0){au="on"+au}if(typeof e[au]!="object"){e[au]={}}av=av||k.BaseClass.guid();at.hashCode=av;if(e[au][av]){this._wlog("warning","repeat key:"+av)}e[au][av]=at};k.BaseClass.prototype.removeEventListener=function(at,ar){if(typeof ar=="function"){ar=ar.hashCode}else{if(typeof ar!="string"){return}}if(!this._listeners){this._listeners={}}if(at.indexOf("on")!=0){at="on"+at}var e=this._listeners;if(!e[at]){return}if(e[at][ar]){delete e[at][ar]}};k.BaseClass.prototype.dispatchEvent=function(at){if(!this._listeners){this._listeners={}}var ar,e=this._listeners,au=at.type;at.target=at.srcElement=at.target||at.srcElement||this;at.currentTarget=this;if(typeof this[au]=="function"){this[au](at)}if(typeof e[au]=="object"){for(ar in e[au]){if(typeof e[au][ar]=="function"){e[au][ar].call(this,at)}}}return at.returnValue};k.BaseEvent.prototype.inherit=function(at){var ar=this;this.domEvent=at=window.event||at;ar.clientX=at.clientX||at.pageX;ar.clientY=at.clientY||at.pageY;ar.offsetX=at.offsetX||at.layerX;ar.offsetY=at.offsetY||at.layerY;ar.screenX=at.screenX;ar.screenY=at.screenY;ar.ctrlKey=at.ctrlKey||at.metaKey;ar.shiftKey=at.shiftKey;ar.altKey=at.altKey;return ar};k.Browser=(function(){var at=navigator.userAgent;var ax=0,e=0,aw=0,av=0;var au=0,ay=0,ar=0;if(typeof(window.opera)=="object"&&/Opera(\s|\/)(\d+(\.\d+)?)/.test(at)){e=parseFloat(RegExp.$2)}else{if(/MSIE (\d+(\.\d+)?)/.test(at)){ax=parseFloat(RegExp.$1)}else{if(/Firefox(\s|\/)(\d+(\.\d+)?)/.test(at)){av=parseFloat(RegExp.$2)}else{if(navigator.vendor=="Netscape"&&/Netscape(\s|\/)(\d+(\.\d+)?)/.test(at)){ar=parseFloat(RegExp.$2)}else{if(at.indexOf("Safari")>-1&&/Version\/(\d+(\.\d+)?)/.test(at)){aw=parseFloat(RegExp.$1)}}}}}if(at.indexOf("Gecko")>-1&&at.indexOf("KHTML")==-1&&/rv\:(\d+(\.\d+)?)/.test(at)){ay=parseFloat(RegExp.$1)}return{ie:ax,firefox:av,gecko:ay,netscape:ar,opera:e,safari:aw}})();window.FeBrowser=k.Browser;k.Dom={};k.Dom.createDom=function(ar,e){if(k.isIE&&e&&e.name){ar="<"+ar+' name="'+k.String.escapeHTML(e.name)+'">'}var at=document.createElement(ar);if(e){k.Dom.setProperties(at,e)}return at};k.Dom.getOffset=function(au){var ax=k.Dom.getOwnerDocument(au);var aw=k.isGecko>0&&ax.getBoxObjectFor&&k.Dom.getStyle(au,"position")=="absolute"&&(au.style.top===""||au.style.left==="");var ay={left:0,top:0};var ar=(k.isIE&&!k.isStrict)?ax.body:ax.documentElement;if(au==ar){return ay}var at=null;var av;if(au.getBoundingClientRect){av=au.getBoundingClientRect();ay.left=av.left+Math.max(ax.documentElement.scrollLeft,ax.body.scrollLeft);ay.top=av.top+Math.max(ax.documentElement.scrollTop,ax.body.scrollTop);ay.left-=ax.documentElement.clientLeft;ay.top-=ax.documentElement.clientTop;if(k.isIE&&!k.isStrict){ay.left-=2;ay.top-=2}}else{if(ax.getBoxObjectFor&&!aw){av=ax.getBoxObjectFor(au);var e=ax.getBoxObjectFor(ar);ay.left=av.screenX-e.screenX;ay.top=av.screenY-e.screenY}else{at=au;do{ay.left+=at.offsetLeft;ay.top+=at.offsetTop;if(k.isWebkit>0&&k.Dom.getStyle(at,"position")=="fixed"){ay.left+=ax.body.scrollLeft;ay.top+=ax.body.scrollTop;break}at=at.offsetParent}while(at&&at!=au);if(k.isOpera>0||(k.isWebkit>0&&k.Dom.getStyle(au,"position")=="absolute")){ay.top-=ax.body.offsetTop}at=au.offsetParent;while(at&&at!=ax.body){ay.left-=at.scrollLeft;if(!k.isOpera||at.tagName!="TR"){ay.top-=at.scrollTop}at=at.offsetParent}}}return ay};k.Dom.getOwnerDocument=function(e){return e.nodeType==9?e:e.ownerDocument||e.document};k.Dom.setProperties=function(ar,e){k.each(e,function(au,at){k.Dom._setProperty(ar,at,au)})};k.Dom._setProperty=function(ar,e,at){if(e=="style"){ar.style.cssText=at}else{if(e=="class"){ar.className=at}else{if(e=="for"){ar.htmlFor=at}else{if(e in k.Dom._DIRECT_ATTRIBUTE_MAP){ar.setAttribute(k.Dom._DIRECT_ATTRIBUTE_MAP[e],at)}else{ar[e]=at}}}}};k.Dom._DIRECT_ATTRIBUTE_MAP={cellpadding:"cellPadding",cellspacing:"cellSpacing",colspan:"colSpan",rowspan:"rowSpan",valign:"vAlign",height:"height",width:"width",usemap:"useMap",frameborder:"frameBorder"};k.G=function(){for(var ar=[],at=arguments.length-1;at>-1;at--){var au=arguments[at];ar[at]=null;if(typeof au=="object"&&au&&au.dom){ar[at]=au.dom}else{if((typeof au=="object"&&au&&au.tagName)||au==window||au==document){ar[at]=au}else{if(typeof au=="string"&&(au=document.getElementById(au))){ar[at]=au}}}}return ar.length<2?ar[0]:ar};if(typeof(HTMLElement)!="undefined"&&!window.opera){HTMLElement.prototype.__defineGetter__("currentStyle",function(){return this.ownerDocument.defaultView.getComputedStyle(this,null)})}k.ac=function(e,ar){if(!(e=this.G(e))){return}ar=this.trim(ar);if(!new RegExp("(^| )"+ar.replace(/(\W)/g,"\\$1")+"( |$)").test(e.className)){e.className=e.className.split(/\s+/).concat(ar).join(" ")}};k.addClassName=k.ac;k.each=function(av,e){if(typeof e!="function"){return av}if(av){if(av.length===undefined){for(var ar in av){e.call(av[ar],av[ar],ar)}}else{for(var at=0,au=av.length;at0&&!window.opera){/MSIE (\d+(\.\d+)?)/.test(navigator.userAgent);k.isIE=parseFloat(RegExp.$1)}})();k.rc=function(e,ar){if(!(e=this.G(e))){return}ar=this.trim(ar);var at=e.className.replace(new RegExp("(^| +)"+ar.replace(/(\W)/g,"\\$1")+"( +|$)","g"),"$2");if(e.className!=at){e.className=at}};k.removeClassName=k.rc;k.show=function(){this.each(arguments,function(e){if(e=k.G(e)){e.style.display=""}})};k.trim=function(e){return e.replace(/(^[\s\t\xa0\u3000]+)|([\u3000\xa0\s\t]+$)/g,"")};var q=k.BaseClass;q.prototype.toString=function(){return this._className||""};var ak=k.BaseEvent;k.on=function(at,ar,e){if(!(at=k.G(at))){return at}ar=ar.replace(/^on/,"").toLowerCase();if(at.addEventListener){at.addEventListener(ar,e,false)}else{if(at.attachEvent){at.attachEvent("on"+ar,e)}}return at};k.un=function(at,ar,e){if(!(at=k.G(at))){return at}ar=ar.replace(/^on/,"").toLowerCase();if(at.removeEventListener){at.removeEventListener(ar,e,false)}else{if(at.detachEvent){at.detachEvent("on"+ar,e)}}return at};k.hc=function(au,at){if(!au||!au.className||typeof au.className!="string"){return false}var ar=-1;try{ar=au.className==at||au.className.search(new RegExp("(\\s|^)"+at+"(\\s|$)"))}catch(av){return false}return ar>-1};if(typeof(HTMLElement)!="undefined"&&!window.opera){try{HTMLElement.prototype.__defineGetter__("children",function(){for(var ar=[],at=0,av,au=0,e=this.childNodes.length;au-1&&ax.tagName!="svg"){ax=at.palette}if(at.palette){av+=parseFloat(at.palette.style.left)+at.offsetX;az+=parseFloat(at.palette.style.top)+at.offsetY}}}ax=ax.offsetParent}ay.offsetX=av;ay.offsetY=az;ay.pixel=new s(av,az);ay.point=at.pixelToPoint(ay.pixel);return ay}this.container.onselectstart=function(){return false};this.container.oncontextmenu=function(){return false};k.on(at.platform,"contextmenu",function(av){if(at.currentOperation==0){at.dispatchEvent(au(av,new ak("onrightclick").inherit(av)))}});k.on(at.platform,"mousemove",function(av){if(at.currentOperation==0){at.dispatchEvent(au(av,new ak("onmousemove").inherit(av)))}});k.on(at.platform,"mousedown",function(ay){if(!at.config.enableMouseDown){return}var ay=window.event||ay;at.temp.operating=true;var ax=ay.srcElement||ay.target;at._bind.upValid=true;if(at._bind.dTimer){clearTimeout(at._bind.dTimer);delete at._bind.dTimer}at._bind.dTimer=setTimeout(function(){at._bind.upValid=false},500);var av=ax;while(av){if(av==at.container){break}if(k.hc(av,"BMap_Marker")){return}av=av.parentNode}if(ax.nodeType!=1){ax=ax.parentNode}if(k.Browser.ie&&at.maskLayer.setCapture){at.maskLayer.setCapture()}else{if(window.captureEvents){window.captureEvents(Event.MOUSEMOVE|Event.MOUSEUP)}}at.temp.tpx=ay.clientX||ay.pageX;at.temp.tpy=ay.clientY||ay.pageY;at.dispatchEvent(au(ay,new ak("onmousedown").inherit(ay)));if(at.config.enableDragging&&!(at.currentOperation&g.drag)&&ay.button!=2){var aw=at.temp;aw.mx=(ay.clientX||ay.pageX);aw.my=(ay.clientY||ay.pageY);aw.pl=at.offsetX;aw.pt=at.offsetY;at.currentOperation|=g.drag;if(at.temp.curSpots.length==0){at.platform.style.cursor=at.config.draggingCursor}else{at.platform.style.cursor="pointer"}}});k.on(document,"mousemove",function(ay){var ay=window.event||ay;if(at.temp.tpx||at.temp.tpy){at.temp.mox=ay.clientX||ay.pageX-at.temp.tpx;at.temp.moy=ay.clientY||ay.pageY-at.temp.tpy}var az=new Date().getTime();if(az-at.temp.lastDomMoveTime<18){return false}at.temp.lastDomMoveTime=az;if(at.currentOperation&g.drag&&at.config.enableDragging){if(at.platform.style.cursor!=at.config.draggingCursor){at.platform.style.cursor=at.config.draggingCursor}var ax;if(!at.temp._moved){ax=au(ay,new ak("ondragstart").inherit(ay))}else{ax=au(ay,new ak("ondragging").inherit(ay))}at.dispatchEvent(ax);var aw=at.temp;var av=ay.clientX||ay.pageX||0;var aA=ay.clientY||ay.pageY||0;if(aw.mx==0&&aw.my==0&&at.temp.keyboardDrag){aw.mx=av;aw.my=aA;aw.pl=at.offsetX;aw.pt=at.offsetY}if(av-aw.mx!=0||aA-aw.my!=0){at.temp._moved=true;at._setPlatformPosition(aw.pl+av-aw.mx,aw.pt+aA-aw.my)}}});k.on(document,"mouseup",function(av){if(k.Browser.ie&&at.maskLayer.releaseCapture){at.maskLayer.releaseCapture()}else{if(window.releaseEvents){window.releaseEvents(Event.MOUSEMOVE|Event.MOUSEUP)}}if(at.temp.preEnableClickPan){at.enableClickPan(true)}if(at.currentOperation&g.drag&&at.config.enableDragging){var av=window.event||av;at.currentOperation^=g.drag;if(at.temp.curSpots.length==0){at.platform.style.cursor=at.config.defaultCursor}else{at.platform.style.cursor="pointer"}if(at.temp._moved){at.dispatchEvent(au(av,new ak("ondragend").inherit(av)))}else{if(at._bind.upValid==true){at.closeInfoWindow()}}at.temp._moved=false}at.temp.operating=false});function e(aw){if(at.config.enableWheelZoom){at.currentOperation|=g.mousewheel;var aw=window.event||aw;at.lastLevel=at.zoomLevel;var av=new ak("onmousewheel");av.trend=aw.wheelDelta>=0||aw.detail<0;if(av.trend==true&&at.zoomLevel==N[at.mapType].zoomLevelMax||av.trend==false&&at.zoomLevel==N[at.mapType].zoomLevelMin){at.currentOperation^=g.mousewheel;U(aw);return}au(aw,av.inherit(aw));at.dispatchEvent(av);at.currentOperation^=g.mousewheel;aw.returnValue=false;U(aw)}}k.on(at.container,"mousewheel",e);if(window.addEventListener){at.container.addEventListener("DOMMouseScroll",e,false)}k.on(at.platform,"click",function(ax){var aw=new ak("onclick");au(ax,aw.inherit(ax));if(!at.currentOperation){if(at.temp.mox>0||at.temp.moy>0){if(at.config.enableDragging){if(at.config.enableClickPan==true){at.enableClickPan(true)}}else{at.temp.preEnableClickPan=at.config.enableClickPan;at.enableClickPan(false)}}else{if(at.config.enableClickPan){at.enableClickPan(true)}}if(at._bind.clicker){clearTimeout(at._bind.clicker)}var av=false;if(!at.temp.mox&&!at.temp.moy){av=true}if(at.temp.curSpots.length>0&&av==true){var ax=new ak("onspotclick");ax.spots=at.temp.curSpots.slice(0);at.dispatchEvent(ax)}at._bind.clicker=setTimeout(function(){at._bind.clicker=false;if(av){at.dispatchEvent(aw)}},at.config.clickInterval);at.temp.tpx=null;at.temp.tpy=null;at.temp.mox=0;at.temp.moy=0}});k.on(at.platform,"dblclick",function(aw){if(!at.currentOperation){if(at._bind.clicker){clearTimeout(at._bind.clicker);at._bind.clicker=false}at.currentOperation|=g.dblclick;var av=new ak("ondblclick").inherit(aw);at.dispatchEvent(au(aw,av));at.currentOperation^=g.dblclick}});at._watchSize=function(){var aw=at.getSize();if(at.width!=aw.width||at.height!=aw.height){var aA=(aw.width-at.width)/2;var aC=(aw.height-at.height)/2;var ax=at.getZoomUnits();var az=at.centerPoint;if(az){at.centerPoint=new D(az.lng+aA*ax,az.lat-aC*ax)}at.maskLayer.style.width=(at.width=aw.width)+"px";at.maskLayer.style.height=(at.height=aw.height)+"px";var ay=new ak("onresize");ay.size=aw;at.dispatchEvent(ay);var av=parseInt(at.platform.style.left)||0;var aB=parseInt(at.platform.style.top)||0;if(at.currentOperation!="undefined"&&at.currentOperation!=0&&(at.offsetX!=av||at.offsetY!=aB)){at._setPlatformPosition(av,aB)}}};at._watchSize();setInterval(at._watchSize,80);if(typeof HTMLElement!="undefined"&&!window.opera){HTMLElement.prototype.contains=function(av){if(av==this){return true}while(av=av.parentNode){if(av==this){return true}}return false}}if(!k.Browser.ie&&typeof Event!="undefined"&&!window.opera){Event.prototype.__defineSetter__("returnValue",function(av){if(!av){this.preventDefault()}return av});Event.prototype.__defineSetter__("cancelBubble",function(av){if(av){this.stopPropagation()}return av})}k.on(document,"mousedown",function(aw){var aw=window.event||aw;var av=aw.srcElement||aw.target;if(at.temp.canKeyboard){at.temp.canKeyboard=at.container.contains(av)}else{at.temp.canKeyboard=at.platform.contains(av)}});k.on(document,"keydown",function(av){if(at.temp.stopArrow==true){at.temp.stopArrow=false}if(at.config.enableKeyboard&&at.temp.canKeyboard){var av=window.event||av;switch(av.keyCode||av.which){case 43:case 189:case 109:at.temp.operating=true;at.zoomOut();break;case 43:case 61:case 187:case 107:at.temp.operating=true;at.zoomIn();break;case 33:at.temp.operating=false;at.temp.stopArrow=true;at.panBy(0,Math.round(at.height*0.8));av.cancelBubble=true;av.returnValue=false;break;case 34:at.temp.operating=false;at.temp.stopArrow=true;at.panBy(0,-Math.round(at.height*0.8));av.cancelBubble=true;av.returnValue=false;break;case 35:at.temp.operating=false;at.temp.stopArrow=true;at.panBy(-Math.round(at.width*0.8),0);av.cancelBubble=true;av.returnValue=false;break;case 36:at.temp.operating=false;at.temp.stopArrow=true;at.panBy(Math.round(at.width*0.8),0);av.cancelBubble=true;av.returnValue=false;break;case 37:at.temp.operating=true;at.temp.arrow|=1;at._arrow();av.cancelBubble=true;av.returnValue=false;break;case 38:at.temp.operating=true;at.temp.arrow|=2;at._arrow();av.cancelBubble=true;av.returnValue=false;break;case 39:at.temp.operating=true;at.temp.arrow|=4;at._arrow();av.cancelBubble=true;av.returnValue=false;break;case 40:at.temp.operating=true;at.temp.arrow|=8;at._arrow();av.cancelBubble=true;av.returnValue=false;break}}});k.on(document,"keyup",function(av){if(at.config.enableKeyboard){var av=window.event||av;switch(av.keyCode||av.which){case 37:at.temp.arrow=at.temp.arrow&~1;if(at.temp.arrow!=0){at._arrow()}break;case 38:at.temp.arrow=at.temp.arrow&~2;if(at.temp.arrow!=0){at._arrow()}break;case 39:at.temp.arrow=at.temp.arrow&~4;if(at.temp.arrow!=0){at._arrow()}break;case 40:at.temp.arrow=at.temp.arrow&~8;if(at.temp.arrow!=0){at._arrow()}break}}at.temp.operating=false})},_setPlatformPosition:function(aC,aA,au){if(isNaN(aC)||isNaN(aA)){return}var av=this.offsetX-aC;var at=this.offsetY-aA;var aw=this.getZoomUnits();var aB=this.centerPoint.lng;var az=this.centerPoint.lat;var ay=new D(aB,az);this.centerPoint=new D(ay.lng+av*aw,ay.lat-at*aw);if(au){this.centerPoint=au}if(this.zoomLevel<=4||this.config.restrictBounds){var ar=N[this.mapType].bounds;if(this.centerPoint.lng-this.width/2*aw<=ar.minX&&av<0||this.centerPoint.lng+this.width/2*aw>ar.maxX&&av>=0){aC=this.offsetX}if(this.centerPoint.lat-this.height/2*aw<=ar.minY&&at>=0||this.centerPoint.lat+this.height/2*aw>ar.maxY&&at<0){aA=this.offsetY}this.centerPoint=new D(ay.lng+(this.offsetX-aC)*aw,ay.lat-(this.offsetY-aA)*aw);var ax=new ak("onreachbounds");this.dispatchEvent(ax)}this.offsetX=aC;this.offsetY=aA;this.platform.style.left=aC+"px";this.platform.style.top=aA+"px";this.maskLayer.style.left=-aC+"px";this.maskLayer.style.top=-aA+"px";this.dispatchEvent(new ak("onmoving"))},setViewSize:function(e){Y(this.maskLayer,e);this.width=e[0];this.height=e[1]},zoomTo:function(ay,ar){if(typeof ay!="number"){return}var ax=N[this.mapType];if(typeof ax!="object"){return}var aw=this.config.zoomLevelMin;if(aw){if(ayat){ay=at}}if(ayax.zoomLevelMax){ay=ax.zoomLevelMax}if(this.zoomLevel==ay){return}this.lastLevel=this.zoomLevel;if(ar){this.temp._cPoint=ar;this.temp._cPixel=this.pointToPixel(ar)}else{if(!ar&&this.temp.infoWin&&this.temp.infoWin.isOpen()){this.temp._cPixel=this.pointToPixel(this.temp.infoWin.overlay.getPoint());ar=this.temp.infoWin.overlay.getPoint();this.temp._cPoint=this.config.coordType==BMAP_COORD_LNGLAT?an.convertLL2MC(ar):ar}}this.dispatchEvent(new ak("onzoomstart"));this.zoomLevel=ay;if(ar||this.temp.infoWin&&this.temp.infoWin.isOpen()){var au=this.temp._cPoint;var e=this.temp._cPixel;var av=this.getZoomUnits(ay);this.centerPoint=new D(au.lng+av*(this.width/2-e.x),au.lat-av*(this.height/2-e.y))}},zoomIn:function(e){this.zoomTo(this.zoomLevel+this.config.zoomStep,e)},zoomOut:function(e){this.zoomTo(this.zoomLevel-this.config.zoomStep,e)},panTo:function(ar,au,av){if(!ar||ar.toString()!="Point"){return}var at=this.pointToPixel(ar);ar=this.config.coordType==BMAP_COORD_LNGLAT?an.convertLL2MC(ar):ar;var e=Math.round(this.width/2);var aw=Math.round(this.height/2);if(Math.abs(e-at.x)>this.width||Math.abs(aw-at.y)>this.height||au==true){this._panTo(e-at.x,aw-at.y,ar)}else{this._panBy(e-at.x,aw-at.y,{duration:av})}},_panTo:function(ar,e,at){if(this.temp.operating==true){return}this.dispatchEvent(new ak("onmovestart"));this._setPlatformPosition(this.offsetX+ar,this.offsetY+e,at);this.dispatchEvent(new ak("onmoveend"))},panBy:function(ar,e){ar=Math.round(ar)||0;e=Math.round(e)||0;if(Math.abs(ar)<=this.width&&Math.abs(e)<=this.height){this._panBy(ar,e,{fps:arguments[2]})}else{this._panTo(ar,e)}},_panBy:function(ar,e,av){if(this.temp.operating==true){return}av=av||{};this.dispatchEvent(new ak("onmovestart"));var au=this,at=au.temp;at.pl=au.offsetX;at.pt=au.offsetY;if(this.temp.tlPan){this.temp.tlPan.cancel()}this.temp.tlPan=new A({fps:av.fps||au.config.fps,duration:av.duration||au.config.actionDuration,transition:av.transition||p.easeInOutQuad,render:function(aw){this.terminative=au.temp.operating;if(au.temp.operating){return}au._setPlatformPosition(at.pl+Math.ceil(ar*aw),at.pt+Math.ceil(e*aw))},finish:function(aw){au.dispatchEvent(new ak("onmoveend"));au.temp.tlPan=false;if(au.temp.stopArrow==true){au.temp.stopArrow=false;if(au.temp.arrow!=0){au._arrow()}}}})},_arrow:function(){if(this._arrow.occurrent&&this._arrow._lastArrow==this.temp.arrow&&this.temp.stopArrow==true){return}var e=this;var at=e.temp.arrow;e._arrow._lastArrow=at;e._arrow.interval=30;e._arrow.duration=999;e._arrow.dx=e._arrow.dy=0;if(at&1){e._arrow.dx=1}if(at&2){e._arrow.dy=1}if(at&4){e._arrow.dx=-1}if(at&8){e._arrow.dy=-1}if(at&1&&at&4){e._arrow.dx=0}if(at&2&&at&8){e._arrow.dy=0}if(!e._arrow.occurrent){e._arrow.occurrent=true;e._arrow.time=new Date().getTime();e._arrow.beginTime=e._arrow.time;e.dispatchEvent(new ak("onmovestart"));var ar=new A({fps:e._arrow.interval,duration:e._arrow.duration,transition:p.linear,render:function(aA){var av=e._arrow;var ay=e.temp.arrow;if(e._arrow._lastArrow!=ay){e._arrow._lastArrow=ay;if(ay&1){av.dx=1}if(ay&2){av.dy=1}if(ay&4){av.dx=-1}if(ay&8){av.dy=-1}if(ay&1&&ay&4){av.dx=0}if(ay&2&&ay&8){av.dy=0}}if(e.temp.stopArrow==true){av.dx=0;av.dy=0}var az=new Date().getTime();var ax=Math.pow((az-av.beginTime)/av.duration,2);if(!e.temp.arrow){av.occurrent=false;ar.terminative=true;e._arrow.time=new Date().getTime();setTimeout(function(){e.dispatchEvent(new ak("onmoveend"))},40)}var aB=(az-av.time);var aw=av.dx*aB*ax>=0?Math.ceil(av.dx*aB*ax):Math.floor(av.dx*aB*ax);var au=av.dy*aB*ax>=0?Math.ceil(av.dy*aB*ax):Math.floor(av.dy*aB*ax);if(aw!=0&&au!=0){aw=Math.round(aw*0.7);au=Math.round(au*0.7)}av.time=az;e._setPlatformPosition(e.offsetX+aw,e.offsetY+au)},finish:function(){e._arrow.time=new Date().getTime();setTimeout(function(){e._arrowPan()},e._arrow.interval)}})}},_arrowPan:function(){var au=this;var ar=au._arrow;if(au.temp.stopArrow){ar.dx=0;ar.dy=0}if(!au.temp.arrow){ar.occurrent=false;au.dispatchEvent(new ak("onmoveend"));return}var av=new Date().getTime();var aw=(av-ar.time);var at=Math.ceil(ar.dx*aw);var e=Math.ceil(ar.dy*aw);ar.time=av;au._setPlatformPosition(au.offsetX+at,au.offsetY+e);setTimeout(function(){au._arrowPan()},ar.interval)},addControl:function(e){if(e&&e._type=="control"&&typeof e._i=="function"){e._i(this);this.dispatchEvent(new ak("onaddcontrol",e))}},removeControl:function(e){if(e&&e._type=="control"&&typeof e.remove=="function"){this.dispatchEvent(new ak("onremovecontrol",e));e.remove()}},addContextMenu:function(e){if(e&&e._type=="contextmenu"&&typeof e.initialize=="function"){e.initialize(this);this.dispatchEvent(new ak("onaddcontextmenu",e))}},removeContextMenu:function(e){if(e&&e._type=="contextmenu"&&typeof e.remove=="function"){this.dispatchEvent(new ak("onremovecontextmenu",e));e.remove()}},addOverlay:function(e){if(e&&e._type=="overlay"&&typeof e.initialize=="function"){this.dispatchEvent(new ak("onaddoverlay",e));e.initialize(this)}},removeOverlay:function(e){if(e&&e._type=="overlay"&&typeof e.remove=="function"){this.dispatchEvent(new ak("onremoveoverlay",e));e.remove()}},clearOverlays:function(){this.dispatchEvent(new ak("onclearoverlays"))},addTileLayer:function(e){if(e&&e._type=="tilelayer"&&typeof e.initialize=="function"){e.initialize(this);this.dispatchEvent(new ak("onaddtilelayer",e))}},removeTileLayer:function(e){if(e&&e._type=="tilelayer"&&typeof e.remove=="function"){e.remove();this.dispatchEvent(new ak("onremovetilelayer",e))}},getTileLayer:function(e){if(this.tileMgr){return this.tileMgr.getTileLayer(e)}return},getTileId:function(e,aw){var au=N[this.mapType];if(typeof au!="object"){return null}var ar=au.baseUnits*Math.pow(2,(au.zoomLevelMax-aw));var av=parseInt(e.lng/ar);var at=parseInt(e.lat/ar);return{row:av,column:at,level:aw}},setCenter:function(e){if(!(e instanceof D)){return}this.panTo(e,true)},centerAndZoom:function(aB,at,aA){if(!aB&&this.config.centerPoint){aB=this.config.centerPoint}if(!at&&this.config.zoomLevel){at=this.config.zoomLevel}var au=this.config.zoomLevelMin;if(au&&atax){at=ax}if(typeof at!="number"){return}var aw=N[this.mapType];if(typeof aw!="object"){return}if(ataw.zoomLevelMax){at=aw.zoomLevelMax}this.lastLevel=this.zoomLevel||at;this.zoomLevel=at;var az=new ak("onload");az.point=aB;az.zoom=at;if(!aA&&this.config.coordType==BMAP_COORD_LNGLAT){aB=this.config.coordType==BMAP_COORD_LNGLAT?an.convertLL2MC(aB):aB}this.centerPoint=aB;this.defaultZoomLevel=this.defaultZoomLevel||this.zoomLevel;this.defaultCenter=this.defaultCenter||this.centerPoint;if(!this.loaded){var ar=new m(-21364736,-10616832,23855104,15859712);var ay=new ac("baidu",ar,"\u767e\u5ea6\u5730\u56fe");var av=new v({mapType:this.mapType,copyright:ay});av.baseLayer=true;this.addTileLayer(av)}az.pixel=this.pointToPixel(this.centerPoint,this.zoomLevel,true);this.dispatchEvent(az)},reset:function(){var ar=this;var at=ar.defaultZoomLevel;var e=ar.defaultCenter;ar.centerAndZoom(e,at,true)},openInfoWindow:function(au,e){if(!au||au.toString()!="InfoWindow"||e.toString()!="Point"){return}if(!this.temp.marker){var ar=new n(aj.imgPath+"blank.gif",{width:1,height:1});this.temp.marker=new K(e,{icon:ar,width:1,height:1,offset:new f(0,0),infoWindowOffset:new f(0,0)})}else{this.temp.marker.setPoint(e)}this.addOverlay(this.temp.marker);this.temp.marker.openInfoWindow(au);this.temp._infoWindowOpened=true;var at=this;au.addEventListener("onclose",function(){at.temp._infoWindowOpened=false})},closeInfoWindow:function(){if(this.temp.infoWin&&this.temp.infoWin.overlay){this.temp.infoWin.overlay.closeInfoWindow()}},resizeMapDiv:function(){var at=this.getSize();if(this.width&&at.width==this.width&&at.height==this.height){return}this.setViewSize(at);var ar=new ak("onresize");ar.size=at;this.dispatchEvent(ar)},enableDragging:function(e){this.config.enableDragging=true},disableDragging:function(){this.config.enableDragging=false},enableScrollWheelZoom:function(e){this.config.enableWheelZoom=true},disableScrollWheelZoom:function(e){this.config.enableWheelZoom=false},enableClickPan:function(e){this.config.enableClickPan=!!e},enableDoubleClickZoom:function(e){this.config.enableDblclickZoom=true},disableDoubleClickZoom:function(e){this.config.enableDblclickZoom=false},enableKeyboard:function(e){this.config.enableKeyboard=true},disableKeyboard:function(e){this.config.enableKeyboard=false},enableMapArea:function(e){this.config.enableMapArea=!!e},getSize:function(){var e=new f(this.container.clientWidth,this.container.clientHeight);return e},getCenter:function(){var e=this.centerPoint;e=this.config.coordType==BMAP_COORD_LNGLAT?an.convertMC2LL(e):e;return e},getZoom:function(){return this.zoomLevel},getContainer:function(){return this.container},getZoomUnits:function(at){var e=N[this.mapType];if(typeof e!="object"){return null}var ar=at||this.zoomLevel;return Math.pow(2,(e.zoomLevelMax-ar))*e.baseUnits/e.tileSize},pointToPixel:function(ar,aw,au){if(!ar){return}if(!au){ar=this.config.coordType==BMAP_COORD_LNGLAT?an.convertLL2MC(ar):ar}var at=this.getZoomUnits(aw);var e=Math.round((ar.lng-this.centerPoint.lng)/at+this.width/2);var av=Math.round((this.centerPoint.lat-ar.lat)/at+this.height/2);return new s(e,av)},pixelToPoint:function(av,ax,at){if(!av){return}var ar=this.getZoomUnits(ax);var au=this.centerPoint.lng+ar*(av.x-this.width/2);var aw=this.centerPoint.lat-ar*(av.y-this.height/2);var e=new D(au,aw);if(!at&&this.config.coordType==BMAP_COORD_LNGLAT){e=this.config.coordType==BMAP_COORD_LNGLAT?an.convertMC2LL(e):e}return e},lnglatToMercator:function(ar,au){if(isNaN(ar)||isNaN(au)){return[]}ar=parseFloat(ar);au=parseFloat(au);var e=new D(ar,au);var at=an.convertLL2MC(e);return[at.lng,at.lat]},mercatorToLnglat:function(at,ar){if(isNaN(at)||isNaN(ar)){return[]}at=parseFloat(at);ar=parseFloat(ar);var au=new D(at,ar);var e=an.convertMC2LL(au);return[e.lng,e.lat]},pt2px:function(e,at){var ar=this.pointToPixel(e,at);return new s(ar.x+this.offsetX,ar.y+this.offsetY)},px2pt:function(e,at){var ar=new s(e.x-this.offsetX,e.y-this.offsetY);return this.pixelToPoint(ar,at,true)},getEventPoint:function(at,au){if(typeof at.offsetY=="number"){var ar=new s(at.offsetX,at.offsetY);return this.pixelToPoint(ar,au,true)}else{return null}},getBounds:function(){var ar=this.pixelToPoint({x:0,y:this.height},null,true);var e=this.pixelToPoint({x:this.width,y:0},null,true);if(this.config.coordType==BMAP_COORD_LNGLAT){ar=an.convertMC2LL(ar);e=an.convertMC2LL(e)}return new m(ar.lng,ar.lat,e.lng,e.lat)},setConfig:function(e){if(!e){return}for(var ar in e){if(typeof(e[ar])!="undefined"&&typeof(this.config[ar])==typeof(e[ar])){this.config[ar]=e[ar]}}},getPointsBounds:function(ar){var at=new m(Number.MAX_VALUE,Number.MAX_VALUE,Number.MIN_VALUE,Number.MIN_VALUE);for(var e=ar.length-1;e>=0;e--){at.extend(ar[e])}if(at.minX==Number.MAX_VALUE&&at.minY==Number.MAX_VALUE&&at.maxX==Number.MIN_VALUE&&at.maxY==Number.MIN_VALUE){return null}return at},getBestMap:function(aE,ax,au,e,ay){if(aE.length==0){return}var aC=[];if(this.config.coordType==BMAP_COORD_LNGLAT){for(var aw=0,av=aE.length;aw=e;at--){var az=this.getZoomUnits(at);if((ar.getMaxX()-ar.getMinX())/azar.getMaxX()){e.lng=ar.getMaxX()}if(e.lat>ar.getMaxY()){e.lat=ar.getMaxY()}if(e.lng=ar._endTime){if(typeof ar._opts.render=="function"){ar._opts.render(ar._opts.transition(1))}if(typeof ar._opts.finish=="function"){ar._opts.finish()}return}ar.schedule=ar._opts.transition((e-ar._beginTime)/ar._opts.duration);if(typeof ar._opts.render=="function"){ar._opts.render(ar.schedule)}if(!ar.terminative){ar._timer=setTimeout(function(){ar._launch()},1000/ar._opts.fps)}};A.prototype.stop=function(e){this.terminative=true;if(this._timer){clearTimeout(this._timer)}if(e){this._endTime=this._beginTime;this._launch()}};A.prototype.cancel=function(){if(this._timer){clearTimeout(this._timer)}this._endTime=this._beginTime;this.schedule=0};var p={linear:function(e){return e},reverse:function(e){return 1-e},easeInQuad:function(e){return e*e},easeInCubic:function(e){return Math.pow(e,3)},easeOutQuad:function(e){return -(e*(e-2))},easeOutCubic:function(e){return Math.pow((e-1),3)+1},easeInOutQuad:function(e){if(e<0.5){return e*e*2}else{return -2*(e-2)*e-1}return},easeInOutCubic:function(e){if(e<0.5){return Math.pow(e,3)*4}else{return Math.pow(e-1,3)*4+1}},easeInOutSine:function(e){return(1-Math.cos(Math.PI*e))/2}};function E(e){q.call(this);this._map=null;this._container;this._type="control";this.blockInfoWindow=true;this._opts={printable:false};this._visible=true}E.inherits(q,"Control");k.extend(E.prototype,{initialize:function(e){this._map=e;if(this._container){e.container.appendChild(this._container);return this._container}return},_i:function(ar){if(!this._container&&this.initialize&&typeof this.initialize=="function"){this._container=this.initialize(ar)}var at=this._container;if(at){var e=at.style;e.position="absolute";e.zIndex=this._cZIndex||"10";e.MozUserSelect="none";at._hashCode=this.hashCode;if(!this._opts.printable){k.ac(at,"BMap_noprint")}}this._setPosition()},remove:function(){this._map=null;if(!this._container){return}this._container.parentNode&&this._container.parentNode.removeChild(this._container);this._container=null},_render:function(){this._container=V(this._map.container,"
");if(this._visible==false){this._container.style.display="none"}return this._container},_setPosition:function(){this.setAnchor(this._opts.anchor)},setAnchor:function(au){if(this.anchorFixed||typeof au!="number"||isNaN(au)||auBMAP_ANCHOR_BOTTOM_RIGHT){au=this.defaultAnchor}this._opts.offset=this._opts.offset||this.defaultOffset;var at=this._opts.anchor;this._opts.anchor=au;if(!this._container){return}var aw=this._container;var e=this._opts.offset.width;var av=this._opts.offset.height;aw.style.left=aw.style.top=aw.style.right=aw.style.bottom="auto";switch(au){case BMAP_ANCHOR_TOP_LEFT:aw.style.top=av+"px";aw.style.left=e+"px";break;case BMAP_ANCHOR_TOP_RIGHT:aw.style.top=av+"px";aw.style.right=e+"px";break;case BMAP_ANCHOR_BOTTOM_LEFT:aw.style.bottom=av+"px";aw.style.left=e+"px";break;case BMAP_ANCHOR_BOTTOM_RIGHT:aw.style.bottom=av+"px";aw.style.right=e+"px";break;default:break}var ar=["TL","TR","BL","BR"];k.rc(this._container,"anchor"+ar[at]);k.ac(this._container,"anchor"+ar[au])},getAnchor:function(){return this._opts.anchor},setOffset:function(e){if(!e||e&&e.toString()!="Size"){return}this._opts.offset=new f(e.width,e.height);this.setAnchor(this._opts.anchor)},getOffset:function(){return this._opts.offset},getDom:function(){return this._container},show:function(){if(this._visible==true){return}this._visible=true;if(this._container){this._container.style.display=""}},hide:function(){if(this._visible==false){return}this._visible=false;if(this._container){this._container.style.display="none"}},isPrintable:function(){return !!this._opts.printable},isVisible:function(){if(!this._container){return false}return !!this._visible}});window.BMAP_ANCHOR_TOP_LEFT=0;window.BMAP_ANCHOR_TOP_RIGHT=1;window.BMAP_ANCHOR_BOTTOM_LEFT=2;window.BMAP_ANCHOR_BOTTOM_RIGHT=3;function u(e){E.call(this);e=e||{};k.extend(this._opts,e);this._copyrightCollection=[];this.defaultAnchor=BMAP_ANCHOR_BOTTOM_LEFT;this.defaultOffset=new f(5,2);this.setAnchor(e.anchor);this._canShow=true;this.blockInfoWindow=false}u.inherits(E,"CopyrightControl");k.extend(u.prototype,{initialize:function(ar){E.prototype.initialize.call(this,ar);this._render();this._updateState();var e=this;ar.addEventListener("load",function(at){e._updateState()});ar.addEventListener("moveend",function(at){e._updateState()});ar.addEventListener("dragend",function(at){e._updateState()});ar.addEventListener("zoomend",function(at){e._updateState()});return this._container},_render:function(){E.prototype._render.call(this);k.ac(this._container,"BMap_cpyCtrl");this._container.style.cursor="default";this._container.style.whiteSpace="nowrap";this._container.style.MozUserSelect="none";E.prototype._setPosition.call(this)},_updateState:function(){if(!this._map||!this._container||this._copyrightCollection.length==0){return}for(var av=0,at=this._copyrightCollection.length;avN[this._map.mapType].zoomLevelMax){e.minZoom=N[this._map.mapType].zoomLevelMin}if(e.mapType!=""&&!N[e.mapType]){e.mapType=BMAP_TYPE_NORMAL}}var au=this.getCopyright(at.id);if(au){for(var av in e){au[av]=e[av]}}else{this._copyrightCollection.push(e)}this._updateState()},getCopyright:function(at){for(var ar=0,e=this._copyrightCollection.length;ar"+e.content+""},getDom:function(au){var at=E.prototype.getDom.call(this);if(typeof au=="undefined"){return at}else{if(at){for(var ar=0,e=at.children.length;arthis._maxZoomLevel){return this._maxZoomLevel}else{return ar}}return -1},_render:function(){E.prototype._render.call(this);var e=k.Browser.ie!=false?" BMap_ie"+k.Browser.ie:"";var ar=this._container;ar.innerHTML=this._generateHTML();k.ac(ar,"BMap_omCtrl"+e);this._omCanvas=ar.children[0].children[0];this._omMapContainer=this._omCanvas.children[0];this._omViewMv=this._omCanvas.children[1];this._omViewMvInn=this._omViewMv.children[0];this._omBtn=ar.children[1];this.setSize(this._opts.size);this._omViewMv.style.cursor=aj.defaultCursor},_generateHTML:function(){var e=['
','
','
','
'];return e.join("")},_bind:function(){var e=this;k.on(this._omBtn,"click",function(){e.changeView()});if(k.Browser.ie){k.on(this._omBtn,"dblclick",function(){e.changeView()})}k.on(this._omViewMv,"mousedown",function(ar){if(e._omViewMv&&typeof e._omViewMv._drag!="undefined"&&e._omViewMv._drag=="true"){return}e._omViewMv._drag="true";var ar=window.event||ar;if(e._omViewMv.setCapture){e._omViewMv.setCapture()}e._bind.iniX=parseInt(e._omViewMv.currentStyle.left);e._bind.iniY=parseInt(e._omViewMv.currentStyle.top);e._bind.mx=ar.pageX||ar.clientX;e._bind.my=ar.pageY||ar.clientY;e._bind.i=0;e._bind.j=0;e._setViewMvCursor(aj.draggingCursor);al(ar);return U(ar)});k.on(document,"mousemove",function(ay){if(e._omViewMv&&e._omViewMv._drag=="true"){var ay=window.event||ay;var ar=ay.pageX||ay.clientX;var az=ay.pageY||ay.clientY;e._bind.curX=e._bind.iniX+ar-e._bind.mx;e._bind.curY=e._bind.iniY+az-e._bind.my;var ax=3;e._bind._moveX=0;e._bind._moveY=0;if(e._bind.curX<=0){e._bind._moveX=ax}if(e._bind.curY<=0){e._bind._moveY=ax}if(e._bind.curX+e._omViewMv.offsetWidth>=e._overviewMap.width){e._bind._moveX=-ax}if(e._bind.curY+e._omViewMv.offsetHeight>=e._overviewMap.height){e._bind._moveY=-ax}e._omViewMv.style.left=e._bind.curX+"px";e._omViewMv.style.top=e._bind.curY+"px";if((e._bind._moveX!=0||e._bind._moveY!=0)&&!e._bind.intervalId){e._bind._mapMoving=true;var aw=e._overviewMap.offsetX;var au=e._overviewMap.offsetY;var av=aw+e._bind._moveX;var at=au+e._bind._moveY;e._overviewMap._setPlatformPosition(av,at);e._bind.intervalId=setInterval(function(){var aB=e._bind._moveX!=0?(e._bind._moveX>0?e._bind.i+=ax:e._bind.i-=ax):e._bind.i;var aA=e._bind._moveY!=0?(e._bind._moveY>0?e._bind.j+=ax:e._bind.j-=ax):e._bind.j;e._overviewMap._setPlatformPosition(av+aB,at+aA)},30)}if(e._bind._moveX==0&&e._bind._moveY==0){clearInterval(e._bind.intervalId);delete e._bind.intervalId;e._bind.i=0;e._bind.j=0}al(ay);return U(ay)}});k.on(document,"mouseup",function(aw){if(e._omViewMv&&e._omViewMv._drag=="true"){e._omViewMv._drag="";e._setViewMvCursor(aj.defaultCursor);if(e._omViewMv.releaseCapture){e._omViewMv.releaseCapture()}if(e._bind.initX==e._bind.curX&&e._bind.initY==e._bind.curY){al(aw);return U(aw)}e._currentOp="dragView";e._overviewMap.config.enableMouseDown=false;e._map.temp.operating=true;if(typeof e._bind.curX=="undefined"||typeof e._bind.curY=="undefined"){return}var av=e._bind.curX+parseInt(e._omViewMv.style.width)/2+1;var au=e._bind.curY+parseInt(e._omViewMv.style.height)/2+1;delete e._bind.curX;delete e._bind.curY;var at=e._overviewMap.pixelToPoint({x:av,y:au},e._overviewMap.zoomLevel);var ar=N[e._map.mapType].bounds;if(at.lngar[2]||at.latar[3]){at=e._overviewMap.getCenter()}e._map.temp.operating=false;if(e._bind._mapMoving==true){clearInterval(e._bind.intervalId);delete e._bind.intervalId;e._bind._mapMoving=false}e._map.temp.operating=true;setTimeout(function(){e._map.temp.operating=false;e._map.panTo(at)},50);al(aw);return U(aw)}})},_initOverviewMap:function(){if(this._overviewInitialized==true){return}var at=this;var au=at._map;au.addEventListener("resize",function(){if(at._overviewMap!=null){at._overviewMap.setCenter(au.getCenter())}if(at._omView!=null){at._omView.setPoint(au.getCenter());at._setRatio()}at.setAnchor(at._opts.anchor)});if(this._opts.isOpen==false){return}if(!this._binded){au.addEventListener("load",function(){at._onMainZoomEnd()});au.addEventListener("moving",function(){at._moveView()});au.addEventListener("moveend",function(av){at._onMainMoveEnd(av)});au.addEventListener("dragend",function(av){at._onMainMoveEnd(av)});au.addEventListener("zoomend",function(av){at._onMainZoomEnd(av)});this._binded=true}var e=au.getCenter();this._minZoomLevel=N[au.mapType].zoomLevelMin;this._maxZoomLevel=N[au.mapType].zoomLevelMax;this._curOMZoomLevel=this._getCurOMZoomLevel();this._overviewMap=new x(this._omMapContainer,{coordType:au.config.coordType,isOverviewMap:true});this._overviewMap.enableClickPan(false);this._overviewMap.enableScrollWheelZoom(false);this._overviewMap.enableDoubleClickZoom(false);this._overviewMap.enableKeyboard(false);this._overviewMap.enableMapArea(false);this._overviewMap.centerAndZoom(e,this._curOMZoomLevel);this._omView=new H({point:au.getCenter(),lineStroke:1,lineColor:"#6688cc"});this._overviewMap.addOverlay(this._omView);this._omView.getDom().innerHTML='
';this._omViewInn=this._omView.getDom().children[0];var ar=this._omView.getDom().style;ar.borderLeftColor="#84b0df";ar.borderTopColor="#adcff4";ar.borderRightColor="#274b8b";ar.borderBottomColor="#274b8b";this._setRatio();this._overviewMap.addEventListener("dragend",function(){at._currentOp="dragMap";au.panTo(at._overviewMap.getCenter())});this._overviewMap.addEventListener("moveend",function(){at._onViewMapMoveEnd()});this._overviewMap.addEventListener("mousedown",function(av){at._temp._downX=av.offsetX;at._temp._downY=av.offsetY});this._overviewMap.addEventListener("resize",function(av){if(at._map&&at._overviewMap){at._overviewMap.setCenter(at._map.getCenter())}at._setRatio()});this._overviewInitialized=true},_setViewMvCursor:function(e){this._omViewMv.style.cursor=e},setAnchor:function(av){E.prototype.setAnchor.call(this,av);if(!this._map){return}if(k.Browser.ie){var ay=this._map.width;var au=this._map.height;var ar=this._opts.size.width;var aw=this._opts.size.height;var at=this._opts.offset.width;var e=this._opts.offset.height;if(this._opts.isOpen==false){ar=this._btnWidth;aw=this._btnHeight}var ax=this._container;switch(av){case BMAP_ANCHOR_TOP_RIGHT:ax.style.right="auto";ax.style.left=ay-ar-at+"px";break;case BMAP_ANCHOR_BOTTOM_LEFT:ax.style.bottom="auto";ax.style.top=au-aw-e+"px";break;case BMAP_ANCHOR_BOTTOM_RIGHT:ax.style.bottom="auto";ax.style.right="auto";ax.style.top=au-aw-e+"px";ax.style.left=ay-ar-at+"px";break;default:break}}this._setQuad();this._redraw()},changeView:function(){this.changeView._running=true;this._opts.isOpen=!this._opts.isOpen;if(!this._container){this.changeView._running=false;return}var aw=this._container;var e=this._opts.size.width;var at=this._opts.size.height;var av=this._btnWidth;var ar=this._btnHeight;var au=this;if(!this._opts.isOpen){this.changeView._preBtnTop=this._omBtn.style.top;this.changeView._preBtnLeft=this._omBtn.style.left;new A({fps:30,duration:120,transition:p.easeInCubic,render:function(ax){aw.style.width=(e-Math.ceil((e-av)*ax))+"px";aw.style.height=(at-Math.ceil((at-ar)*ax))+"px";if(k.Browser.ie){au._omBtn.style.top=(au._quad==3||au._quad==4)?parseInt(aw.style.height)-ar+"px":"0";au._omBtn.style.left=(au._quad==1||au._quad==4)?parseInt(aw.style.width)-av+"px":"0";if(au._opts.anchor>=0&&au._opts.anchor<=BMAP_ANCHOR_BOTTOM_RIGHT){if(au._quad==3||au._quad==4){aw.style.top=au._map.height-parseInt(aw.style.height)-au._opts.offset.height+"px"}if(au._quad==1||au._quad==4){aw.style.left=au._map.width-parseInt(aw.style.width)-au._opts.offset.width+"px"}}}au.dispatchEvent(new ak("onviewchanging"))},finish:function(){if(k.Browser.ie){au._omBtn.style.left="0";au._omBtn.style.top="0";if(au._opts.anchor>=0&&au._opts.anchor<=BMAP_ANCHOR_BOTTOM_RIGHT){if(au._quad==3||au._quad==4){aw.style.top=au._map.height-au._btnHeight-au._opts.offset.height+"px"}if(au._quad==1||au._quad==4){aw.style.left=au._map.width-au._btnWidth-au._opts.offset.width+"px"}}}au._redraw();k.ac(au._omBtn,"BMap_omBtnClosed");var ax=new ak("onviewchanged");ax.isOpen=au._opts.isOpen;au.dispatchEvent(ax);au.changeView._running=false}})}else{if(this._overviewInitialized==false){this._initOverviewMap()}new A({fps:40,duration:120,transition:p.easeOutCubic,render:function(ax){aw.style.width=(Math.ceil(e*ax))+"px";aw.style.height=(Math.ceil(at*ax))+"px";if(k.Browser.ie){au._omBtn.style.top=(au._quad==3||au._quad==4)?parseInt(aw.style.height)-ar+"px":"0";au._omBtn.style.left=(au._quad==1||au._quad==4)?parseInt(aw.style.width)-av+"px":"0";if(au._opts.anchor>=0&&au._opts.anchor<=BMAP_ANCHOR_BOTTOM_RIGHT){if(au._quad==3||au._quad==4){aw.style.top=au._map.height-parseInt(aw.style.height)-au._opts.offset.height+"px"}if(au._quad==1||au._quad==4){aw.style.left=au._map.width-parseInt(aw.style.width)-au._opts.offset.width+"px"}}}au.dispatchEvent(new ak("onviewchanging"))},finish:function(){if(au._opts.anchor>=0&&au._opts.anchor<=BMAP_ANCHOR_BOTTOM_RIGHT){if(k.Browser.ie){if(au._quad==3||au._quad==4){aw.style.top=au._map.height-at-au._opts.offset.height+"px"}if(au._quad==1||au._quad==4){aw.style.left=au._map.width-e-au._opts.offset.width+"px"}}}au._redraw();au._setBtnPosition();k.rc(au._omBtn,"BMap_omBtnClosed");var ax=new ak("onviewchanged");ax.isOpen=au._opts.isOpen;au.dispatchEvent(ax);au.changeView._running=false}})}},_setRatio:function(){if(!this._map){return}var ax=this._map.zoomLevel;var az=this._map.pixelToPoint({x:0,y:0},ax);var au=this._map.pixelToPoint({x:this._map.width,y:this._map.height},ax);var ar=this._overviewMap.pixelToPoint({x:0,y:0},this._curOMZoomLevel);var at=this._overviewMap.pixelToPoint({x:this._overviewMap.width,y:this._overviewMap.height},this._curOMZoomLevel);this._wRatio=(au.lng-az.lng)/(at.lng-ar.lng);this._hRatio=(au.lat-az.lat)/(at.lat-ar.lat);if(this._wRatio>=1||this._hRatio>=1){this._omViewMv.style.display="none";this._omView.hide()}else{var av=parseInt(this._overviewMap.width);var e=parseInt(this._overviewMap.height);var ay=Math.round(av*this._wRatio);var aw=Math.round(e*this._hRatio);this._omView.show();this._omView.setDimension(ay,aw);this._omViewMv.style.display=""}this._setOMViewMvPos()},_setOMViewMvPos:function(){if(!this._omView||!this._omView.getDom()){return}if(this._wRatio>=1||this._hRatio>=1){this._omViewMv.style.display="none";return}var ar=this._omView.getDom().style;this._omViewMv.style.display="";this._omViewMv.style.width=ar.width;this._omViewMv.style.height=ar.height;var e=parseInt(ar.width)-2;var at=parseInt(ar.height)-2;e=e<0?0:e;at=at<0?0:at;this._omViewMvInn.style.width=e+"px";this._omViewMvInn.style.height=at+"px";this._omViewInn.style.width=this._omViewMvInn.style.width;this._omViewInn.style.height=this._omViewMvInn.style.height;this._omViewMv.style.left=parseInt(ar.left)+this._overviewMap.offsetX+"px";this._omViewMv.style.top=parseInt(ar.top)+this._overviewMap.offsetY+"px"},setSize:function(at){if(!at||at.toString()!="Size"){at=new f(150,150)}var ar=at.width;var au=at.height;ar=ar>0?ar:150;au=au>0?au:150;this._opts.size=at;if(!this._container){return}if(this.changeView._running==true){var e=arguments;var av=this;setTimeout(function(){e.callee.call(av,at)},120);return}Y(this._container,[ar,au]);var av=this;setTimeout(function(){if(av._overviewMap&&av._map){av._overviewMap.setCenter(av._map.getCenter())}},100);this.setAnchor(this._opts.anchor);this.dispatchEvent(new ak("resize"))},getSize:function(){if(this._container){return new f(parseInt(this._container.style.width),parseInt(this._container.style.height))}else{return this._opts.size}},setOffset:function(e){if(!e||e.toString()!="Size"){return}E.prototype.setOffset.call(this,e);if(e.width!=0||e.height!=0){k.ac(this._container,"withOffset")}else{k.rc(this._container,"withOffset")}},_redraw:function(){if(!this._omCanvas){return}var at=this._opts.size.width;var aw=this._opts.size.height;var ay=this._opts.padding;var e=this._borderWidth;var au=0;var ax=0;var ar=0;var av=0;this._omCanvas.style.left=this._omCanvas.style.top=this._omCanvas.style.right=this._omCanvas.style.bottom="auto";this._omBtn.style.left=this._omBtn.style.top=this._omBtn.style.right=this._omBtn.style.bottom="auto";if(this._opts.offset.width==0&&this._opts.offset.height==0){switch(this._opts.anchor){case BMAP_ANCHOR_TOP_LEFT:this._omCanvas.style.left="0px";this._omCanvas.style.top="0px";break;case BMAP_ANCHOR_TOP_RIGHT:this._omCanvas.style.left=ay+"px";this._omCanvas.style.top="0px";break;case BMAP_ANCHOR_BOTTOM_LEFT:this._omCanvas.style.top=ay+"px";this._omCanvas.style.left="0px";break;case BMAP_ANCHOR_BOTTOM_RIGHT:this._omCanvas.style.top=ay+"px";this._omCanvas.style.left=ay+"px";break;default:break}au=at-e;ax=aw-e;ar=au-ay-2*e;av=ax-ay-2*e;if(k.Browser.ie&&document.compatMode=="BackCompat"){au=au+1;ax=ax+1;ar=ar+2;av=av+2}}else{this._omCanvas.style.left=this._omCanvas.style.top=this._omCanvas.style.right=this._omCanvas.style.bottom=ay+"px";au=at-2*e;ax=aw-2*e;ar=au-2*ay-2*e;av=ax-2*ay-2*e;if(this._opts.offset.width!=0||this._opts.offset.height!=0){k.ac(this._container,"withOffset")}if(k.Browser.ie&&document.compatMode=="BackCompat"){au=au+2;ax=ax+2;ar=ar+2;av=av+2}}if(au>0&&ax>0){Y(this._container.children[0],[au,ax])}if(ar>0&&av>0){Y(this._omCanvas,[ar,av])}this._setBtnPosition();k.rc(this._omBtn,"BMap_omBtnClosed");if(!this._opts.isOpen){this._container.style.width=this._btnWidth+"px";this._container.style.height=this._btnHeight+"px";if(k.Browser.ie){this.changeView._preBtnTop=this._omBtn.style.top;this.changeView._preBtnLeft=this._omBtn.style.left;this._omBtn.style.left="0";this._omBtn.style.top="0"}k.ac(this._omBtn,"BMap_omBtnClosed")}},_setQuad:function(){var ar=this._container;if(!ar){return}var e=this._quad;switch(this._opts.anchor){case BMAP_ANCHOR_TOP_LEFT:this._quad=2;break;case BMAP_ANCHOR_TOP_RIGHT:this._quad=1;break;case BMAP_ANCHOR_BOTTOM_LEFT:this._quad=3;break;case BMAP_ANCHOR_BOTTOM_RIGHT:this._quad=4;break;default:break}k.rc(ar,"quad"+e);k.ac(ar,"quad"+this._quad)},_setBtnPosition:function(){if(!k.Browser.ie){switch(this._quad){case 2:this._omBtn.style.top="0";this._omBtn.style.left="0";break;case 1:this._omBtn.style.top="0";this._omBtn.style.right="0";break;case 4:this._omBtn.style.bottom="0";this._omBtn.style.right="0";break;case 3:this._omBtn.style.bottom="0";this._omBtn.style.left="0";break;default:break}}else{var au=this._btnWidth;var ar=this._btnHeight;var e=this._opts.size.width;var at=this._opts.size.height;this._omBtn.style.left="auto";this._omBtn.style.top="auto";this._omBtn.style.right="auto";this._omBtn.style.bottom="auto";switch(this._quad){case 2:this._omBtn.style.left="0px";this._omBtn.style.top="0px";break;case 1:this._omBtn.style.left=e-au+"px";this._omBtn.style.top="0px";break;case 4:this._omBtn.style.top=at-ar+"px";this._omBtn.style.left=e-au+"px";break;case 3:this._omBtn.style.left="0px";this._omBtn.style.top=at-ar+"px";break;default:break}}},_moveView:function(){if(this._omView){this._omView.setPoint(this._map.getCenter())}},_onMainMoveEnd:function(ar){switch(this._currentOp){case"dragMap":this._setOMViewMvPos();this._currentOp="";break;case"dragView":this._omViewMv.style.display="none";this._overviewMap.panTo(this._map.getCenter(),false,90);this._currentOp="";break;default:if(this._overviewMap){this._overviewMap.panTo(this._map.getCenter(),false,90)}break}},_onMainZoomEnd:function(){if(!this._overviewMap){return}var e=this;e._curOMZoomLevel=e._getCurOMZoomLevel();setTimeout(function(){e._overviewMap.centerAndZoom(e._map.getCenter(),e._curOMZoomLevel);e._omView.setPoint(e._map.getCenter());e._setRatio()},100)},_onViewMapMoveEnd:function(){this._setOMViewMvPos();this._overviewMap.config.enableMouseDown=true},remove:function(){E.prototype.remove.call(this);this._omCanvas=null;this._omMapContainer=null;this._omView=null;this._omViewInn=null;this._omViewMv=null;this._omViewMvInn=null;this._omBtn=null;this._overviewInitialized=false;this._overviewMap=null},isOpen:function(){if(!this._container){return false}return this._opts.isOpen}});function F(e){E.call(this);e=e||{};this._opts=k.extend(k.extend(this._opts,{color:"black",unit:"metric"}),e);this.defaultAnchor=BMAP_ANCHOR_BOTTOM_LEFT;this.defaultOffset=new f(81,18);this.setAnchor(e.anchor);this._units={metric:{name:"metric",conv:1,incon:1000,u1:"\u7c73",u2:"\u516c\u91cc"},us:{name:"us",conv:3.2808,incon:5280,u1:"\u82f1\u5c3a",u2:"\u82f1\u91cc"}};if(!this._units[this._opts.unit]){this._opts.unit="metric"}this._scaleText=null;this._numberArray={}}window.BMAP_UNIT_METRIC="metric";window.BMAP_UNIT_IMPERIAL="us";F.inherits(E,"ScaleControl");k.extend(F.prototype,{initialize:function(ar){E.prototype.initialize.call(this,ar);this._render();this._numberArray={us:[5280*5000,5280*2500,5280*2000,5280*1000,5280*500,5280*200,5280*100,5280*50,5280*25,5280*20,5280*10,5280*5,5280*2,5280,2000,1000,500,200,100,50,20,10,5],metric:[10000000,5000000,2000000,1000000,500000,200000,100000,50000,25000,20000,10000,5000,2000,1000,500,200,100,50,20,10,5,2,1]};this._updateScale();var e=this;ar.addEventListener("zoomend",function(at){e._updateScale()});ar.addEventListener("load",function(at){e._updateScale()});ar.addEventListener("moveend",function(at){e._updateScale()});ar.addEventListener("dragend",function(at){e._updateScale()});return this._container},_render:function(){E.prototype._render.call(this);k.ac(this._container,"BMap_scaleCtrl");this._container.innerHTML=this._generateHTML();this._scaleText=this._container.children[0];E.prototype._setPosition.call(this)},_generateHTML:function(){var e='
';return e},setColor:function(e){this._opts.color=e+"";if(!this._container){return}this._container.children[0].style.backgroundColor="transparent";this._container.children[0].style.color=e;for(var at=1,ar=this._container.children.length;at=at?this._units[this._opts.unit].u2:this._units[this._opts.unit].u1;if(au>=at){au=Math.round(au/at)}this._setScaleText(au,aA);if(Math.round(e)%2!=0&&k.Browser.ie==6){e=e+1}this._container.style.width=Math.round(e)+"px"},_convertUnit:function(e,ar){ar=ar||"metric";if(this._units[ar]){return e*this._units[ar].conv}return e}});window.BMAP_NAVIGATION_CONTROL_LARGE=0;window.BMAP_NAVIGATION_CONTROL_SMALL=1;window.BMAP_NAVIGATION_CONTROL_PAN=2;window.BMAP_NAVIGATION_CONTROL_ZOOM=3;function Z(e){E.call(this);e=e||{};k.extend(this._opts,e);this.controlHeight=[{width:52,height:226,zoomHeight:167,zoomWidth:37,sliderHeight:133,sliderCHeight:124},{width:37,height:97,zoomHeight:38,zoomWidth:37,sliderHeight:0,sliderCHeight:0},{width:37,height:57,zoomHeight:0,zoomWidth:0,sliderHeight:0,sliderCHeight:0},{width:18,height:38,zoomHeight:38,zoomWidth:18,sliderHeight:0,sliderCHeight:0}];this.defaultAnchor=BMAP_ANCHOR_TOP_LEFT;this.defaultOffset=new f(10,10);this.setAnchor(e.anchor);this.setType(e.type);this._maxTotalZoomLv=18;this._minZoomLevel=-1;this._maxZoomLevel=-1;this._totalZoomLv=-1;this._sliderInterval=7;this._minBarY=1;this._maxBarY=-1;this._curBarY=-1;this._zoomDom=null;this._zoomBtnDom=null;this._sliderDom=null;this._sliderBaseDom=null;this._cZIndex="1100"}Z.inherits(E,"NavigationControl");k.extend(Z.prototype,{initialize:function(ar){E.prototype.initialize.call(this,ar);this._setParam();this._render();this._bind();this._setSliderZoomLv(ar.getZoom());var e=this;ar.addEventListener("zoomend",function(at){if(!e._map){return}e._setSliderZoomLv(e._map.getZoom());if(e._msover){return}if(e._isShowLevelHint){e._hideTimerId=setTimeout(function(){e._hideLevelHint()},1000)}});ar.addEventListener("mousewheel",function(){if(!e._map){return}if(e._map.config.enableWheelZoom&&e._isShowLevelHint){if(e._hideTimerId){clearTimeout(e._hideTimerId);e._hideTimerId=null}e._showLevelHint()}});ar.addEventListener("load",function(at){if(!e._map){return}e._setSliderZoomLv(e._map.getZoom())});return this._container},_setParam:function(){var e=this._map.mapType;this._minZoomLevel=this._map.config.zoomLevelMin;this._maxZoomLevel=this._map.config.zoomLevelMax;if(this._minZoomLevel!=N[e].zoomLevelMin||this._maxZoomLevel!=N[e].zoomLevelMax){this._isShowLevelHint=false}else{this._isShowLevelHint=true}this._totalZoomLv=this._maxZoomLevel-this._minZoomLevel+1;this._maxBarY=this._minBarY+(this._totalZoomLv-1)*this._sliderInterval},_render:function(){E.prototype._render.call(this);var at=k.Browser.ie==6?" BMap_ie6":"";var ar=" BMap_stdMpType"+this._opts.type;var au=this._container;k.ac(au,"BMap_stdMpCtrl");k.ac(au,at);k.ac(au,ar);au.innerHTML=this._generateHtml(this._opts.type);this._setSliderBarCursor(k.Browser.opera?"pointer":aj.defaultCursor);this._zoomDom=k.G(au.children[1]);var e=this._zoomDom;this._zoomBtnDom=k.G(e.children[0]);this._sliderDom=k.G(e.children[1]);this._sliderBaseDom=k.G(e.children[1].children[0]);this._sliderBotDom=k.G(e.children[1].children[1]);this.setType(this._opts.type)},_setSliderHeight:function(){var az=this._opts.type;var ax=this.controlHeight[az].width;var e=this.controlHeight[az].height;var au=this.controlHeight[az].zoomHeight;var ay=this.controlHeight[az].zoomWidth;var ar=this.controlHeight[az].sliderHeight;var av=this.controlHeight[az].sliderCHeight;var at=(this._maxTotalZoomLv-this._totalZoomLv)*this._sliderInterval;if(this._opts.type==BMAP_NAVIGATION_CONTROL_LARGE){e=e-at>=0?e-at:0;au=au-at>=0?au-at:0;ar=ar-at>=0?ar-at:0;av=av-at>=0?av-at:0;sliderBotDomTop=124-at>=0?124-at:0;this._sliderBotDom.style.top=sliderBotDomTop+"px"}this._container.style.width=ax+"px";this._container.style.height=e+"px";this._zoomDom.style.height=au+"px";this._zoomDom.style.width=ax+"px";this._zoomBtnDom.style.height=au+"px";this._zoomBtnDom.style.width=ay+"px";this._sliderDom.style.height=ar+"px";this._sliderBaseDom.style.height=av+"px";var aw=this._zoomBtnDom.children;if(this._opts.type==BMAP_NAVIGATION_CONTROL_ZOOM){aw[0].style.left=aw[1].style.left="0"}else{aw[0].style.left=aw[1].style.left=""}},_generateHtml:function(){var e=[];e.push(this._generatePanHtml());e.push(this._generateZoomContainerHtml());return e.join("")},_generatePanHtml:function(){var e='
';return e},_generateZoomContainerHtml:function(){var e='
'+this._generateZoomHtml()+this._generateSliderHtml()+this._generateZoomBalloonHtml()+"
";return e},_generateZoomHtml:function(){var e='
';return e},_generateSliderHtml:function(){var e='
';return e},_generateZoomBalloonHtml:function(){var e='
';return e},setType:function(e){if(typeof e=="number"&&e>=BMAP_NAVIGATION_CONTROL_LARGE&&e<=BMAP_NAVIGATION_CONTROL_ZOOM){this._opts.type=e}else{this._opts.type=BMAP_NAVIGATION_CONTROL_LARGE}if(!this._map||!this._container){return}var ar=this._container;ar.className=ar.className.replace(/BMap_stdMpType\d/,"BMap_stdMpType"+this._opts.type);this._setSliderHeight();if(e!=BMAP_NAVIGATION_CONTROL_LARGE){k.rc(ar.children[1].children[2],"hvr")}this.setAnchor(this._opts.anchor)},getType:function(){return this._opts.type},_bind:function(){var ay=this;var ax=ay._container;k.on(this._zoomDom,"mouseover",function(){if(!ay._isShowLevelHint){return}ay._msover=true;if(ay._hideTimerId){clearTimeout(ay._hideTimerId);ay._hideTimerId=null}ay._showLevelHint()});k.on(this._zoomDom,"mouseout",function(){if(!ay._isShowLevelHint){return}if(ay._hideTimerId){clearTimeout(ay._hideTimerId)}ay._msover=false;ay._hideTimerId=setTimeout(function(){ay._hideLevelHint();ay._hideTimerId=null},1000)});k.on(ax.children[0],"mouseover",function(){ay._hideLevelHint(true)});k.on(ax.children[0].children[0],"click",function(){ay._panBy(0,Math.round(ay._map.height/3))});k.on(ax.children[0].children[1],"click",function(){ay._panBy(Math.round(ay._map.width/3),0)});k.on(ax.children[0].children[2],"click",function(){ay._panBy(-Math.round(ay._map.width/3),0)});k.on(ax.children[0].children[3],"click",function(){ay._panBy(0,-Math.round(ay._map.height/3))});var av=ax.children[1].children[0].children;k.on(av[0],"click",function(){ay._zoomIn()});k.on(av[1],"click",function(){ay._zoomOut()});for(var at=1;at<6;at++){k.on(ax.children[0].children[at],"mouseup",function(aA){if((ay._map.currentOperation&g.stdMapCtrlDrag)==0&&(ay._map.currentOperation&g.drag)==0){al(aA)}});k.on(ax.children[0].children[at],"contextmenu",function(aA){U(aA)});k.on(ax.children[0].children[at],"click",function(aA){U(aA)})}k.on(av[0],"mouseup",function(aA){if((ay._map.currentOperation&g.stdMapCtrlDrag)==0&&(ay._map.currentOperation&g.drag)==0){al(aA)}});k.on(av[1],"mouseup",function(aA){if((ay._map.currentOperation&g.stdMapCtrlDrag)==0&&(ay._map.currentOperation&g.drag)==0){al(aA)}});k.on(av[0],"contextmenu",function(aA){U(aA)});k.on(av[1],"contextmenu",function(aA){U(aA)});var az=ax.children[1].children[1].children[2];k.on(az,"mouseup",function(aA){if((ay._map.currentOperation&g.stdMapCtrlDrag)==0&&(ay._map.currentOperation&g.drag)==0){al(aA)}});k.on(av[0],"click",function(aA){al(aA)});k.on(av[1],"click",function(aA){al(aA)});k.on(az,"click",function(aA){al(aA)});var aw=ax.children[1].children[1].children[3];k.on(aw,"mouseup",function(aA){if(aA.button==2){al(aA)}});k.on(aw,"contextmenu",function(aA){U(aA)});k.on(this._zoomDom.children[2].children[0],"click",function(aA){ay._map.zoomTo(18)});k.on(this._zoomDom.children[2].children[1],"click",function(aA){ay._map.zoomTo(12)});k.on(this._zoomDom.children[2].children[2],"click",function(aA){ay._map.zoomTo(8)});k.on(this._zoomDom.children[2].children[3],"click",function(aA){ay._map.zoomTo(4)});k.on(az,"mousedown",function(aB){aB=window.event||aB;var aA=0;if(typeof aB.layerY!="undefined"){aA=aB.layerY}else{if(typeof aB.offsetY!="undefined"){aA=aB.offsetY}}var aC=0;aC=(ay._maxZoomLevel+1)-Math.round(ay._totalZoomLv*parseFloat(aA/(ay._totalZoomLv*ay._sliderInterval)));ay._map.zoomTo(aC)});k.on(aw,"mouseover",function(){k.ac(aw,"h")});k.on(aw,"mouseout",function(){if((ay._map.currentOperation&g.stdMapCtrlDrag)==0){k.rc(aw,"h")}});var au=function(aA){var aA=window.event||aA;if(aA.button==2){return}if((k.Browser.ie&&aA.button!=1)){return}if(aw.setCapture){aw.setCapture()}ay._map.currentOperation|=g.stdMapCtrlDrag;ay._bind.my=aA.pageY||aA.clientY||0;if(!k.Browser.opera){ay._setSliderBarCursor(aj.draggingCursor)}k.on(document,"mousemove",e);k.on(document,"mouseup",ar);al(aA);return U(aA)};var e=function(aB){if((ay._map.currentOperation&g.stdMapCtrlDrag)!=0){var aB=window.event||aB;var aC=aB.pageY||aB.clientY;var aA=ay._curBarY+aC-ay._bind.my;if(aAay._maxBarY){aw.style.top=ay._maxBarY+"px"}else{aw.style.top=aA+"px"}}}};var ar=function(aB){if((ay._map.currentOperation&g.stdMapCtrlDrag)!=0){var aA=k.G(aw);ay._curBarY=parseInt(aA.style.top);k.rc(aw,"h");ay._map.currentOperation&=~g.stdMapCtrlDrag;if(ax&&aw&&aw.releaseCapture){aw.releaseCapture()}if(!k.Browser.opera){ay._setSliderBarCursor(aj.defaultCursor)}var aC=(ay._maxZoomLevel+1)-Math.round(parseFloat(ay._curBarY-ay._minBarY)/parseFloat(ay._maxBarY-ay._minBarY)*(ay._totalZoomLv-1)+1);ay._map.zoomTo(aC);k.un(document,"mousemove",e);k.un(document,"mouseup",ar)}};k.on(aw,"mousedown",au)},_setSliderBarCursor:function(e){this._container.children[1].children[1].children[3].style.cursor=e},_panBy:function(ar,e){this._map.panBy(ar,e)},_zoomIn:function(){this._map.zoomIn()},_zoomOut:function(){this._map.zoomOut()},_setSliderZoomLv:function(ar){if(!this._container||this.getType()!=BMAP_NAVIGATION_CONTROL_LARGE){return}var e=(this._maxZoomLevel-ar)*this._sliderInterval+this._minBarY;this._curBarY=e>this._maxBarY?this._maxBarY:e")}}this._updateShadowSize()},remove:function(){if(this._container){this._container.parentNode.removeChild(this._container);this._container=null}if(this._shadow){this._shadow.parentNode.removeChild(this._shadow);this._shadow=null}this._map=null},_render:function(){this._container=V(this._map.container,"
");this._container.className="BMap_contextMenu";this._container.style.font="12px arial, simsun";this._shadow=V(this._map.container,"
");return this._container},addItem:function(at){if(!at||at._type!="menuitem"||at._text==""||at._width<=0){return}for(var ar=0,e=this._items.length;ar1){this._items[this._items.length-2]._type=="menuitem"&&k.rc(this._items[this._items.length-2].getDom(),"BMap_cmLstItem")}else{this._items[0]._type=="menuitem"&&k.ac(this._items[0].getDom(),"BMap_cmFstItem")}this._updateShadowSize()},removeItem:function(at){if(!at||at._type!="menuitem"){return}for(var ar=0,e=this._items.length;ar0){this._items[this._items.length-1]._type=="menuitem"&&k.ac(this._items[this._items.length-1].getDom(),"BMap_cmLstItem")}this._updateShadowSize()},addSeparator:function(){this._items.push({_type:"divider",_dIndex:this._dividers.length});this._dividers.push({dom:null});if(!this._container){return}var e="
";this._dividers[this._dividers.length-1].dom=V(this._container,e);this._updateShadowSize()},removeSeparator:function(ar){if(!this._dividers[ar]){return}if(this._dividers[ar].dom&&this._dividers[ar].dom.parentNode){this._dividers[ar].dom.parentNode.removeChild(this._dividers[ar].dom)}for(var at=0,e=this._items.length;atar){this._items[at]._dIndex--}}this._dividers.splice(ar,1);this._updateShadowSize()},getDom:function(){return this._container},setPosition:function(e,ar){this._left=e;this._top=ar;this._container.style.left=e+"px";this._container.style.top=ar+"px";this._shadow.style.left=e+1+"px";this._shadow.style.top=ar+2+"px"},show:function(){if(this._isOpen==true){return}if(this._rItems.length==0){return}this._isOpen=true;if(this._container){this._container.style.visibility="visible"}if(this._shadow){this._shadow.style.visibility="visible"}var e=new ak("onopen");e.point=this.curPoint;e.pixel=this.curPixel;this.dispatchEvent(e)},hide:function(){if(this._isOpen==false){return}this._isOpen=false;if(this._container){this._container.style.visibility="hidden"}if(this._shadow){this._shadow.style.visibility="hidden"}var e=new ak("onclose");e.point=this.curPoint;e.pixel=this.curPixel;this.dispatchEvent(e)},setCursor:function(e){if(!e){return}this._opts.cursor=e;if(this._container){this._container.style.cursor=this._opts.cursor}if(this._shadow){this._shadow.style.cursor=this._opts.cursor}},_updateShadowSize:function(){if(this._container&&this._shadow){this._shadow.style.width=this._container.offsetWidth+"px";this._shadow.style.height=this._container.offsetHeight+"px"}},getItem:function(e){return this._rItems[e]},_showMenu:function(av,ax){if(this._rItems.length==0){return}var ay=this;var aA=av.layerX||av.offsetX;var az=av.layerY||av.offsetY;var aC=av.target||av.srcElement;var aw=aC;if(ax==ay._map.container&&aw!==ay._map.maskLayer&&aw.nodeName.toLowerCase()!="svg"){while(aw&&!k.hc(aw,"shadow")){aw=aw.parentNode}if(!k.hc(aw,"shadow")||aw.getAttribute("type")!="infowindow_shadow"){ay.hide();return}}while(aC&&aC!=ay._map.container){if(!(aC.clientWidth==0&&aC.clientHeight==0&&aC.offsetParent&&aC.offsetParent.nodeName.toLowerCase()=="td")){if(aC.nodeName.toLowerCase()=="svg"){aA+=parseInt(aC.getAttribute("viewBox").split(" ")[0])||0;az+=parseInt(aC.getAttribute("viewBox").split(" ")[1])||0}else{aA+=aC.offsetLeft;az+=aC.offsetTop}}aC=aC.offsetParent||aC.parentNode}ay.curPixel=new s(aA,az);ay.curPoint=ay._map.pixelToPoint(ay.curPixel);if(ay.curPoint.lngN[ay._map.mapType].bounds[2]||ay.curPoint.latN[ay._map.mapType].bounds[3]){return}var au=ay.getDom().offsetHeight;var aB=ay.getDom().offsetWidth;var at=aA;var ar=az;if(aA+aB>this._map.width){at=aA-aB}if(az+au>this._map.height){ar=az-au}ay.setPosition(at,ar);ay.show()}});function L(ar,at,e){if(!ar||!at||typeof at!="function"){return}q.call(this);this._opts={width:100,id:""};e=e||{};this._opts.width=(e.width*1)?e.width:100;this._opts.id=e.id?e.id:"";this._text=ar+"";this._callback=at;this._map=null;this._type="menuitem";this._contextmenu=null;this._container=null;this._enabled=true}L.inherits(q,"MenuItem");k.extend(L.prototype,{initialize:function(e,ar){if(this._container){return false}this._map=e;this._contextmenu=ar;if(ar.getDom()){this._render();this._bind()}return true},remove:function(){var e=this;if(this._container){this._container.parentNode.removeChild(this._container);this._container=null}this._contextmenu=null;this._map=null},_render:function(){var e=""+this._text+"";this._container=V(this._contextmenu.getDom(),e);var ar=this._container.style;ar.padding="2px 6px";ar.margin="0 2px";ar.fontSize="12px";ar.MozUserSelect="none";ar.lineHeight="17px";ar.width=this._opts.width+"px";if(this._enabled){ar.color="#000";ar.cursor="pointer"}else{ar.color="#aaa";ar.cursor=this._map.config.defaultCursor}return this._container},_bind:function(){var e=this;k.on(this._container,"click",function(ar){if(!e._enabled){al(ar);return}if(e._callback&&e._callback.call){e._callback.call(e,e._contextmenu.curPoint,e._contextmenu.curPixel)}});k.on(this._container,"mousedown",function(ar){al(ar)});k.on(this._container,"mouseover",function(){if(!e._enabled){return}e._container.style.color="#6688cc"});k.on(this._container,"mouseout",function(){if(!e._enabled){return}e._container.style.color="#000"})},setText:function(e){if(!e){return}this._text=e+"";if(this._container){this._container.innerHTML=""+this._text+""}},getDom:function(){return this._container},enable:function(){this._enabled=true;if(this._container){this._container.style.color="#000";this._container.style.cursor="pointer"}},disable:function(){this._enabled=false;if(this._container){this._container.style.color="#aaa";this._container.style.cursor=this._map.config.defaultCursor}}});function m(e,au,at,ar){this.minX=e;this.minY=au;this.maxX=at;this.maxY=ar}k.extend(m.prototype,{isEmpty:function(){var e="number";return(typeof(this.minX)!=e||typeof(this.minY)!=e||typeof(this.maxX)!=e||typeof(this.maxY)!=e)},equals:function(e){if(!e||e.toString()!="Bounds"){return}return(this.minX==e.minX&&this.minY==e.minY&&this.maxX==e.maxX&&this.maxY==e.maxY)},getMaxX:function(){return this.maxX},getMaxY:function(){return this.maxY},getMinX:function(){return this.minX},getMinY:function(){return this.minY},containsBounds:function(e){if(!e||e.toString()!="Bounds"){return}return(e.minX>this.minX&&e.maxXthis.minY&&e.maxYMath.max(this.minX,this.maxX)||Math.max(at.minY,at.maxY)Math.max(this.minY,this.maxY)){return null}var av=Math.max(this.minX,at.minX);var ar=Math.min(this.maxX,at.maxX);var au=Math.max(this.minY,at.minY);var e=Math.min(this.maxY,at.maxY);return new m(av,au,ar,e)},containsPoint:function(e){if(!e||e.toString()!="Point"){return}return(e.lng>=this.minX&&e.lng<=this.maxX&&e.lat>=this.minY&&e.lat<=this.maxY)},extend:function(e){if(!e||e.toString()!="Point"){return}var at=e.lng,ar=e.lat;if(this.minX>at){this.minX=at}if(this.maxXar){this.minY=ar}if(this.maxYthis.minY&&ar.lat",_maskElement:null,_cursor:"default",inUse:false,show:function(e){if(!this._map){this._map=e}this.inUse=true;if(!this._maskElement){this._createMask(e)}this._maskElement.style.display="block"},_createMask:function(e){if(!this._map){this._map=e}if(!this._map){return}this._maskElement=V(this._map.container,this._html);k.on(this._maskElement,"mouseup",function(ar){if(ar.button==2){al(ar);return U(ar)}});k.on(this._maskElement,"click",function(ar){});this._maskElement.style.display="none"},getDrawPoint:function(au,ax,av){au=window.event||au;var ar=au.layerX||au.offsetX||0;var aw=au.layerY||au.offsetY||0;var at=au.target||au.srcElement;if(at!=j.getDom(this._map)&&ax==true){while(at&&at!=this._map.container){if(!(at.clientWidth==0&&at.clientHeight==0&&at.offsetParent&&at.offsetParent.nodeName.toLowerCase()=="td")){ar+=at.offsetLeft;aw+=at.offsetTop}at=at.offsetParent}}if(at!=j.getDom(this._map)&&at!=this._map.container){return}if(typeof ar==="undefined"||typeof aw==="undefined"){return}if(isNaN(ar)||isNaN(aw)){return}if(av){ar=ar+av.x;aw=aw+av.y}return this._map.pixelToPoint(new s(ar,aw))},hide:function(){if(!this._map){return}this.inUse=false;if(this._maskElement){this._maskElement.style.display="none"}},getDom:function(e){if(!this._maskElement){this._createMask(e)}return this._maskElement},setCursor:function(e){this._cursor=e||"default";if(this._maskElement){this._maskElement.style.cursor=this._cursor}}};function ag(){k.BaseClass.call(this);this._visible=true;this._type="overlay";this.infoWindow=null}ag.inherits(k.BaseClass,"Overlay");z.register(function(at){var ar='
';at.temp.overlayDiv=at.overlayDiv=V(at.platform,ar);var e='
';at.temp.areaDiv=V(at.temp.overlayDiv,e);at.temp.areaDiv.style.zIndex=700;at.temp.labelDiv=V(at.temp.overlayDiv,e);at.temp.labelDiv.style.zIndex=500;at.markerDiv=at.temp.markerDiv=V(at.temp.overlayDiv,e);at.temp.markerDiv.style.zIndex=400});ag.getZIndex=function(ar,e){ar=ar*1;if(!ar){return 0}if(e&&e==BMAP_COORD_MERCATOR){ar=an.convertMC2LL(new z.Point(0,ar)).lat}return(ar*-100000)<<5};k.extend(ag.prototype,{remove:function(){if(this.domElement&&this.domElement.parentNode&&this.domElement.parentNode.tagName){if(this.infoWindow&&this.infoWindow.overlay&&this.infoWindow.overlay==this){this.closeInfoWindow()}this.domElement.parentNode.removeChild(this.domElement);this.domElement=null;this.dispatchEvent(new ak("onremove"))}},_addOverlayDom:function(){var at=this.map;if(!this.domElement){switch(this.toString()){case"Marker":this.domElement=V(at.temp.areaDiv,this.render());this.siblingElement=V(at.temp.markerDiv,this.siblingRender());this.siblingElement.hashCode=this.getHashCode();break;case"Label":this.domElement=V(at.temp.labelDiv,this.render());break;default:this.domElement=V(at.temp.overlayDiv,this.render());break}var e=this;if(this.domElement){k.on(this.domElement,"mousemove",function(au){if(e.isDraging){return true}return al(au)})}this.domElement.hashCode=this.getHashCode();if(this._visible==false){this.domElement.style.display="none";if(this.siblingElement){this.siblingElement.style.display="none"}}function ar(ax,aw){var av=ax.srcElement||ax.target;var au=ax.clientX||ax.pageX;var az=ax.clientY||ax.pageY;if(ax&&aw&&au&&az&&av){var ay=k.Dom.getOffset(at.container);aw.pixel=new s(au-ay.left,az-ay.top);aw.point=at.pixelToPoint(aw.pixel);return aw}else{return aw}}var e=this;k.on(this.domElement,"mouseover",function(au){if(!e._dragstarted){e.dispatchEvent(ar(au,new ak("onmouseover").inherit(au)))}});k.on(this.domElement,"mouseout",function(au){if(!e._dragstarted){e.dispatchEvent(ar(au,new ak("onmouseout").inherit(au)))}});k.on(this.domElement,"click",function(av){var au=av.srcElement||av.target;while(au){if(au==e.domElement){if(e.toString()!="Marker"||e.toString()=="Marker"&&(!e._lastPt||e._lastPt&&e.getPoint().equals(e._lastPt))){e.dispatchEvent(ar(av,new ak("onclick").inherit(av)))}break}else{if(e.map.infoWindow&&au==e.map.infoWindow.popDom){break}}au=au.parentNode}av.cancelBubble=true});k.on(this.domElement,"mousedown",function(au){if(e.toString()=="Marker"){e._lastPt=e.getPoint()}e.dispatchEvent(ar(au,new ak("onmousedown").inherit(au)))});k.on(this.domElement,"mouseup",function(au){e.dispatchEvent(ar(au,new ak("onmouseup").inherit(au)))});k.on(this.domElement,"dblclick",function(au){e.dispatchEvent(ar(au,new ak("ondblclick").inherit(au)));au.cancelBubble=true;au.returnValue=false})}else{if(this.toString()=="Marker"){at.temp.areaDiv.appendChild(this.domElement);at.temp.markerDiv.appendChild(this.siblingElement)}else{if(this.toString()=="Label"){at.temp.labelDiv.appendChild(this.domElement)}else{at.overlayDiv.appendChild(this.domElement)}}}this.setPoint(this.point)},hide:function(){if(this._visible==false){return}this._visible=false;if(this.infoWindow&&this.infoWindow.overlay&&this.infoWindow.overlay==this){this.closeInfoWindow()}k.hide(this.domElement)},show:function(){if(this._visible==true){return}this._visible=true;k.show(this.domElement)},dispose:function(){k.BaseClass.prototype.dispose.call(this)},openInfoWindow:function(aw,av){if(!aw||!this.domElement||this.domElement.style.display=="none"||aw.toString()!="InfoWindow"){return}if(this.map.temp.infoWin===aw&&this.map.temp.infoWin.isOpen()&&this.map.temp.infoWin.overlay===this){return}if(this.map.temp.infoWin&&this.map.temp.infoWin.isOpen()){this.map.closeInfoWindow()}this.infoWindow=aw;var e=false;if(this.map.temp.infoWin==null||this.map.temp.infoWin!=aw){e=true;aw.initialize(this)}aw.overlay=this;var ar=this.map.infoWindow;var at=this.map.temp;at.infoWin=aw;if(!at.pop){at.pop=V(this.map.temp.overlayDiv,"")}if(!at.shadow){at.shadow=V(this.map.temp.overlayDiv,"")}aw.setPosition();at.shadow.appendChild(ar.shadowDom);at.pop.appendChild(ar.popDom);aw.reset(null);aw.reset(true);if(!e){aw.reset(true)}if(!(av&&av.notMove)){setTimeout(function(){aw.setPanTo()},200)}var au=this;this.dispatchEvent(new ak("oninfowindowopen"))},closeInfoWindow:function(){if(!this.map||!this.map.infoWindow){return}var ar=this;if(this.infoWindow!=null&&this.infoWindow.hashCode==this.map.infoWindow.hashCode){try{ar.infoWindow.hide()}catch(e){}this.dispatchEvent(new ak("oninfowindowclose"))}this.infoWindow=null},setStyle:function(e){if(this.domElement){if(this.siblingElement){this.siblingElement.style.cssText=this.siblingElement.style.cssText+";"+e}else{this.domElement.style.cssText=this.domElement.style.cssText+";"+e}}},getDom:function(){return this.domElement},setConfig:function(ar){if(ar==null){return}for(var e in ar){if(typeof(this._config[e])==typeof(ar[e])){this._config[e]=ar[e]}}},overlayPoints:function(at){if(at.length==0){return{pixels:[],points:[]}}if(typeof(at)=="string"){return this._overlayPoints(at)}else{if(typeof(at[0])=="string"){var ar=[];for(var e=0;ethis.lengthMax){this.remove(this.cacheBox.firstChild)}};d.prototype.addMap=function(e){this.map.addOverlay(e)};d.prototype.remove=function(e){e.domElement.parentNode.removeChild(e.domElement)};d.prototype.clear=function(){this.cacheBox.innerHTML=""};function v(e){this.opts=e||{};this.copyright=this.opts.copyright||{};this.transparentPng=this.opts.transparentPng||false;this.baseLayer=this.opts.baseLayer||false;this.offset=[0,0];this._type="tilelayer"}v.inherits(q,"TileLayer");k.extend(v.prototype,{isTransparentPng:function(){return this.transparentPng},getTilesUrl:function(ay,ar){var at=N[this.mapType];if(typeof at!="object"){return null}var ax=at.baseUnits*Math.pow(2,(at.zoomLevelMax-ar));var az=parseInt(ay.lng/ax)-this.offset[0];var au=parseInt(ay.lat/ax-this.offset[1]);var aw=Math.floor(az/200);var av=Math.floor(au/200);var e="";if(this.opts.tileUrlTemplate){e=this.opts.tileUrlTemplate;e=e.replace(/\{X\}/,az);e=e.replace(/\{Y\}/,au);e=e.replace(/\{Z\}/,ar)}else{e=at.tileUrls[Math.abs(az+au)%at.tileUrls.length]+"?qt=tile&x="+az+"&y="+au+"&z="+ar+"&styles=pl&udt=20140928";e=e.replace(/-(\d+)/gi,"M$1")}return e},initialize:function(at){if(!at.temp.layerZIndex){at.temp.layerZIndex=0}this.zIndex=this.zIndex||-1;if(this.baseLayer){this.zIndex=-1}if(!at.temp.layid){at.temp.layid=0}if(!this.opts.mapType){this.mapType="BMAP_CUSTOM_LAYER_"+at.temp.layid;at.temp.layid++}else{this.mapType=this.opts.mapType}var e=N[this.mapType];if(!e){N[this.mapType]={tileUrls:[],tileSize:256,baseUnits:256,zoomLevelMin:1,zoomLevelMax:18,errorUrl:aj.imgPath+"/blank.gif",bounds:new m(-21364736,-10616832,23855104,15859712),imgExtend:"png"}}var ar=V(at.platform,'
');ar.style.display="";ar.style.left=Math.ceil(-at.offsetX+at.width/2)+"px";ar.style.top=Math.ceil(-at.offsetY+at.height/2)+"px";this.tilesDiv=ar;this.map=at},remove:function(){if(this.tilesDiv&&this.tilesDiv.parentNode){this.tilesDiv.innerHTML="";this.tilesDiv.parentNode.removeChild(this.tilesDiv)}delete this.tilesDiv},getCopyright:function(){return this.copyright},getMapType:function(){return this.mapType},setZIndex:function(e){this.zIndex=e;if(this.tilesDiv){this.tilesDiv.style.zIndex=e}}});function ac(ar,e,at){this.bounds=ar;this.content=e;this.mapType=at}ac.inherits(q,"Copyright");function af(e){ag.call(this);this._config={strokeColor:"#3a6bdb",strokeWeight:5,strokeOpacity:0.65,fillColor:"#fff",fillOpacity:0.65,strokeStyle:"solid",startArrow:"none",endArrow:"none"};this.drawMargin=350;this.setConfig(e);if(this._config.strokeWeight<=0){this._config.strokeWeight=1}if(this._config.strokeOpacity<0){this._config.strokeOpacity=0}else{if(this._config.strokeOpacity>1){this._config.strokeOpacity=1}}if(this._config.fillOpacity<0){this._config.fillOpacity=0}else{if(this._config.fillOpacity>1){this._config.fillOpacity=1}}if(this._config.strokeStyle!="solid"&&this._config.strokeStyle!="dashed"){this._config.strokeStyle="solid"}this.domElement=null;this.isSvg=!!window.SVGAngle;this.isVml=!window.SVGAngle;this.svgs="http://www.w3.org/2000/svg";this.svgType={strokeweight:"stroke-width",strokecolor:"stroke",stroked:"stroke",fillcolor:"fill",filled:"fill"}}af.inherits(ag,"Draw");k.extend(af.prototype,{_addOverlayDom:function(){if(this.map.palette){this.setPalette()}},createPalette:function(){if(this.map.palette){this.setPalette();return}var at=this.map.overlayDiv;var e;if(this.isSvg){e=document.createElementNS(this.svgs,"svg");this.setTypeNS(e,"font-size","24px");this.setTypeNS(e,"version","1.1");e.style.position="absolute";e.style.zIndex="200";e.setAttribute("type","system");at.appendChild(e);k.on(e,"mousedown",function(au){U(au)})}else{if(this.isVml){var ar='';e=V(at,ar)}}this.map.palette=e;this.setPalette()},setPalette:function(){if(!this.isSvg){return}var aw=this.map;var ar=aw.palette;var at=aw.width*3;var e=aw.height*3;var av=-aw.offsetX-aw.width;var au=-aw.offsetY-aw.height;this.setTypeNS(ar,"x",at+"px");this.setTypeNS(ar,"y",e+"px");ar.style.top=au+"px";ar.style.left=av+"px";ar.style.width=at+"px";ar.style.height=e+"px";this.setTypeNS(ar,"viewBox",av+" "+au+" "+at+" "+e)},polyline:function(at,aw){var au=this;var ar=this.map.palette;if(this.getDom()==null){if(this.isSvg){var e=document.createElementNS(this.svgs,"path");this.setTypeNS(e,"stroke-linejoin","round");this.setTypeNS(e,"stroke-linecap","round");this.setTypeNS(e,"fill-rule","evenodd");ar.appendChild(e)}else{if(this.isVml){var ax=['','','',""].join("");var e=V(ar,ax)}}}else{var e=this.getDom()}this.setPolylinePoint(e,at,aw);if(this._config.startArrow!="none"){this.startArrow(this._config.startArrow,e)}if(this._config.endArrow!="none"){this.endArrow(this._config.endArrow,e)}function av(aD,aB){var aA=aD.srcElement||aD.target;var az=B();var ay=aD.pageX?aD.pageX:(aD.clientX+az[1]);var aF=aD.pageY?aD.pageY:(aD.clientY+az[0]);if(aD&&aB&&ay&&aF&&aA){var aC=k.I(aA.hashCode).map;var aE=k.Dom.getOffset(aC.container);aB.pixel=new s(ay-aE.left,aF-aE.top);aB.point=aC.pixelToPoint(aB.pixel);return aB}else{return aB}}k.on(e,"mouseover",function(ay){au.dispatchEvent(au.dispatchEvent(av(ay,new ak("onmouseover").inherit(ay))))});k.on(e,"mousemove",function(ay){au.dispatchEvent(au.dispatchEvent(av(ay,new ak("onmousemove").inherit(ay))))});k.on(e,"mouseout",function(ay){au.dispatchEvent(au.dispatchEvent(av(ay,new ak("onmouseout").inherit(ay))))});k.on(e,"click",function(ay){au.dispatchEvent(au.dispatchEvent(av(ay,new ak("onclick").inherit(ay))))});k.on(e,"mousedown",function(ay){au.dispatchEvent(au.dispatchEvent(av(ay,new ak("onmousedown").inherit(ay))))});k.on(e,"mouseup",function(ay){au.dispatchEvent(au.dispatchEvent(av(ay,new ak("onmouseup").inherit(ay))))});k.on(e,"dblclick",function(ay){au.dispatchEvent(au.dispatchEvent(av(ay,new ak("ondblclick").inherit(ay))))});k.on(this,"remove",function(ay){this.remove();au.dispatchEvent(new ak("remove").inherit(ay))});return e},setPolylinePoint:function(av,au){var au=this.overlayPoints(au);this.points=au.points;if(this.points&&this.points.length==0){return}if(this.toString()=="Polygon"||this.toString()=="Oval"){var aw=au.points[0];var e=au.points[au.points.length-1];if(aw.lng!=e.lng||aw.lat!=e.lat){au.points.push(au.points[0]);au.pixels.push(au.pixels[0])}}if(au[0]==null){var at=this._setPolylinePoint(av,au)}else{var ax=[];for(var ar=0;ar0){this.setTypeNS(e,"refY","8")}else{this.setTypeNS(e,"refY","5")}this.setTypeNS(e,"markerUnits","strokeWidth");this.setTypeNS(e,"markerWidth","4");this.setTypeNS(e,"markerHeight","9");this.setTypeNS(e,"orient","auto");switch(ar){case"oval":break;case"classic":var at=document.createElementNS(this.svgs,"path");this.setTypeNS(at,"fill",this._config.strokeColor);at.setAttributeNS(null,"d","M 0 0 L10 5 L0 10 L3 5 z")}e.appendChild(at);this.map.palette.appendChild(e);return at}},setTypeNS:function(at,ar,au){if(!at){return}if(this.isSvg){var e=this.svgType;if(e[ar]){ar=e[ar];if(au==false){au="none"}}at.setAttributeNS(null,ar,au)}else{if(this.isVml){at[ar]=au}}},getTypeNS:function(at,ar){if(this.isSvg){var e=this.svgType;if(e[ar]){ar=e[ar]}return at.getAttributeNS(null,ar)}else{if(this.isVml){return at.getAttribute(ar)}}},getDrawPoint:function(at){at=window.event||at;var ar=(at.pageX||at.clientX);var av=(at.pageY||at.clientY);var au=k.Dom.getOffset(this.map.container);ar=ar-au.left;av=av-au.top;return{x:ar,y:av}},startArrow:function(ar,e,au){e=e||this.getDom();if(!e){return}ar=ar.toLowerCase();if(this.isSvg&&au==true){if(this.map.palette.getElementsByTagName("marker").length==0){this.arrowElement=this.arrow(ar);e._arrow=this.map.palette.getElementsByTagName("marker")[0]}this.setTypeNS(e,"marker-start","url(#"+ar+")")}else{if(this.isVml){if(e.childNodes.length==0){var at=V(e,"")}else{var at=e.childNodes[0];at.setAttribute("StartArrow",ar)}}}},_startArrowF:function(ar,e){this.startArrow(ar,e,true)},endArrow:function(ar,e,au){e=e||this.getDom();if(!e){return}ar=ar.toLowerCase();if(this.isSvg&&au==true){if(this.map.palette.getElementsByTagName("marker").length==0){this.arrowElement=this.arrow(ar);e._arrow=this.map.palette.getElementsByTagName("marker")[0]}this.setTypeNS(e,"marker-end","url(#"+ar+")")}else{if(this.isVml){if(e.childNodes.length==0){var at=V(e,"")}else{var at=e.childNodes[0];at.setAttribute("endarrow",ar)}}}},_endArrowF:function(ar,e){this.endArrow(ar,e,true)},setStrokeColor:function(e){if(this._config){this._config.strokeColor=e}if(this.domElement){this.setTypeNS(this.domElement,"strokecolor",e)}if(this.arrowElement){this.setTypeNS(this.arrowElement,"fill",e)}},getStrokeColor:function(){return this._config.strokeColor},setStrokeWeight:function(e){if(e>0){this._config.strokeWeight=e;this.setTypeNS(this.domElement,"strokeweight",this._config.strokeWeight+"px")}},getStrokeWeight:function(){return this._config.strokeWeight},setStrokeOpacity:function(e){if(e>1||e<0){return}this._config.strokeOpacity=e;if(!this.map){return}if(this.isSvg){this.setTypeNS(this.getDom(),"stroke-opacity",e)}else{if(this.getDom()&&this.getDom().childNodes){this.setTypeNS(this.getDom().childNodes[0],"opacity",e)}}},getStrokeOpacity:function(){return this._config.strokeOpacity},setFillOpacity:function(e){if(e>1||e<0){return}this._config.fillOpacity=e;if(!this.map){return}if(this.isSvg){this.setTypeNS(this.getDom(),"fill-opacity",e)}else{if(this.getDom()&&this.getDom().childNodes){this.setTypeNS(this.getDom().childNodes[1],"opacity",e)}}},getFillOpacity:function(){return this._config.fillOpacity},setStrokeStyle:function(ar){if(ar!="solid"&&ar!="dashed"){return}if(!ar){ar=this._config.strokeStyle}else{this._config.strokeStyle=ar}if(!this.map){return}var e=this.getDom();if(this.isSvg){ar=ar=="solid"?0:this.getStrokeWeight()*2;this.setTypeNS(e,"stroke-dasharray",ar)}else{if(this.isVml){ar=ar=="solid"?"solid":"4 2 1 2";if(e&&e.childNodes&&e.childNodes[0]){e.childNodes[0]["dashstyle"]=ar}}}},getStrokeStyle:function(){return this._config.strokeStyle},setFillColor:function(e){if(e){this._config.fillColor=e;if(this.domElement){if(this.domElement.getElementsByTagName("fill").length==0&&this.isVml){this.domElement.innerHTML+=""}this.setTypeNS(this.domElement,"filled",true);this.setTypeNS(this.domElement,"fillcolor",e)}}else{this._config.fillColor="";this.setTypeNS(this.domElement,"filled",false)}},getFillColor:function(){if(this.toString()!="Rect"&&this.toString()!="Polygon"&&this.toString()!="Oval"){return}return this._config.fillColor},getIntersectLine:function(aH,aF){if(!aF){return[aH]}if(this.toString()=="Rect"||this.toString()=="Polygon"||this.toString()=="Oval"){return[aH,aF]}var aw=[{x:(-this.map.offsetX-this.drawMargin),y:(-this.map.offsetY+this.map.height+this.drawMargin)},{x:(-this.map.offsetX+this.map.width+this.drawMargin),y:(-this.map.offsetY-this.drawMargin)}];var aA=[{x:(aH.x>aF.x?aF.x:aH.x),y:(aH.y>aF.y?aH.y:aF.y)},{x:(aH.x>aF.x?aH.x:aF.x),y:(aH.y>aF.y?aF.y:aH.y)}];var au=[];var av=function(aK,aI){try{if(parseInt(aK.x)>=(aI[0]["x"]-2)&&parseInt(aK.x)<=(aI[1]["x"]+2)&&parseInt(aK.y)>=(aI[1]["y"]-2)&&parseInt(aK.y)<=(aI[0]["y"]+2)){return true}else{return false}}catch(aJ){return true}};var aG=function(aJ){if(aF.y==aH.y){return}else{var aI=parseInt(((aF.x-aH.x)*(aJ-aH.y))/(aF.y-aH.y)+aH.x);if(av({x:aI,y:aJ},aw)){return{x:aI,y:aJ}}}};var aE=function(aI){if(aF.x==aH.x){return}else{var aJ=parseInt(((aF.y-aH.y)*(aI-aH.x))/(aF.x-aH.x)+aH.y);if(av({x:aI,y:aJ},aw)){return{x:aI,y:aJ}}}};var ay=av(aH,aw);var aD=av(aF,aw);if(ay&&aD){au.push(aH);au.push(aF)}else{if(ay||aD){var at=[];if(ay){at.push(aH)}if(aH.x==aF.x){var ar={x:aH.x,y:aw[0].y};var e={x:aH.x,y:aw[1].y};if(av(ar,aA)){au.push(ar)}if(av(e,aA)){au.push(e)}}else{if((aH.y==aF.y)){var ar={x:aw[0].x,y:aH.y};var ar={x:aw[0].x,y:aH.y};if(av(ar,aA)){au.push(ar)}if(av(e,aA)){au.push(e)}}else{for(var ax=0;ax<2;ax++){var az=aw[ax];var aC=aE(az.x);if(aC!=null&&av(aC,aA)){at.push(aC)}var aB=aG(az.y);if(aB!=null&&av(aB,aA)){at.push(aB)}}}}if(aD){at.push(aF)}if(at.length==2){if(((aH.x-aF.x)>0)==((at[0].x-at[1].x)>0)&&((aH.y-aF.y)>0)==((at[0].y-at[1].y)>0)){au.push(at[0]);au.push(at[1])}else{au.push(at[1]);au.push(at[0])}}}else{var at=[];for(var ax=0;ax<2;ax++){var az=aw[ax];var aC=aE(az.x);if(aC!=null&&av(aC,aw)&&av(aC,aA)){at.push(aC)}var aB=aG(az.y);if(aB!=null&&av(aB,aw)&&av(aB,aA)){at.push(aB)}}if(at.length==2){if(((aH.x-aF.x)>0)==((at[0].x-at[1].x)>0)){au.push(at[0]);au.push(at[1])}else{au.push(at[1]);au.push(at[0])}}}}return au}});if(document.namespaces&&!document.namespaces.olv){document.namespaces.add("olv","urn:schemas-microsoft-com:vml")}function H(e){ag.call(this);this.map=null;this.domElement=null;this._config={width:0,height:0,offset:new f(0,0),opacity:1,background:"transparent",lineStroke:1,lineColor:"#000",lineStyle:"solid",point:null};this.setConfig(e);this.point=this._config.point}H.inherits(ag,"Division");k.extend(H.prototype,{render:function(){var e=this._config;var at=this.content;var ar=['
');ar.push(at);ar.push("
");return ar.join("")},initialize:function(e){this.map=e;this._addOverlayDom();if(this.domElement){k.on(this.domElement,"mousedown",function(ar){al(ar)})}},getPoint:function(){return this._config.point},_getPixel:function(e){return this.map.pointToPixel(this.getPoint())},setPoint:function(e){this._config.offset=new f(-Math.round(this._config.width/2)-Math.round(this._config.lineStroke),-Math.round(this._config.height/2)-Math.round(this._config.lineStroke));ag.prototype.setPoint.call(this,e)},setDimension:function(e,ar){this._config.width=Math.round(e);this._config.height=Math.round(ar);if(this.domElement){this.domElement.style.width=this._config.width+"px";this.domElement.style.height=this._config.height+"px";this.setPoint(this._config.point)}}});function n(ar,at,av){if(!ar||!at){return}this.imageUrl=ar;this.size=at;var au=new f(Math.floor(at.width/2),Math.floor(at.height/2));var aw={offset:au,imageOffset:new f(0,0)};av=av||{};for(var e in av){if(typeof(aw[e])==typeof(av[e])){aw[e]=av[e]}}this.offset=aw.offset;this.imageOffset=aw.imageOffset;this.infoWindowOffset=av.infoWindowOffset||this.offset}k.inherit(n,k.BaseClass,"Icon");n.prototype.setImageUrl=function(e){if(!e||typeof e!="string"){return}this.imageUrl=e};n.prototype.getHTML=function(){if(k.Browser.ie==6&&this.imageUrl.toLowerCase().indexOf(".png")>0){return["'].join("")}else{return[''].join("")}};n.prototype.setSize=function(e){if(!e||e.toString()!="Size"){return}this.size=new f(e.width,e.height)};n.prototype.setOffset=function(e){if(!e||e.toString()!="Size"){return}this.offset=new f(e.width,e.height)};n.prototype.setImageOffset=function(e){if(!e||e.toString()!="Size"){return}this.imageOffset=new f(e.width,e.height)};n.prototype.setInfoWindowOffset=function(e){if(!e||e.toString()!="Size"){return}this.infoWindowOffset=new f(e.width,e.height)};n.prototype.toString=function(){return"Icon"};function Q(ar,e){k.BaseClass.call(this);this.content=ar;this.map=null;this._config={width:0,height:0,maxWidth:600,offset:new f(0,0),title:"",maxContent:"",enableMaximize:false,margin:[10,10,40,10],collisions:[[10,10],[10,10],[10,10],[10,10]],ifMaxScene:false};this.setConfig(e);if(this._config.width!=0){if(this._config.width<220){this._config.width=220}if(this._config.width>730){this._config.width=730}}if(this._config.height!=0){if(this._config.height<60){this._config.height=60}if(this._config.height>650){this._config.height=650}}if(this._config.maxWidth!=0){if(this._config.maxWidth<220){this._config.maxWidth=220}if(this._config.maxWidth>730){this._config.maxWidth=730}}this.isWinMax=false;this.IMG_PATH=aj.imgPath;this.overlay=null}Q.inherits(k.BaseClass,"InfoWindow");k.extend(Q.prototype,{initialize:function(at){if(!at.map){return}this.overlay=at;this.map=at.map;if(this.map.infoWindow){var ar=this.map.infoWindow;k.hide(ar.popDom);k.hide(ar.shadowDom)}this.render();this._bind();if(this._config.enableMaximize){this.enableMaximize()}else{this.disableMaximize()}this.setTitle();this.setContent();if(this._config.ifMaxScene){this.setMaxScene(true)}this.reset(true);if(this.map.infoWindow.marker){var e=this.map.infoWindow.marker;this.map.infoWindow.marker=null}if(at.toString()=="Marker"){this.map.infoWindow.marker=at}if(!this._binded){var au=this;this.map.addEventListener("dragstart",function(){au._setOverflow()});this.map.addEventListener("movestart",function(){au._setOverflow()});this.map.addEventListener("dragend",function(){au._resetOverflow()});this.map.addEventListener("moveend",function(){au._resetOverflow()});this._binded=true}},render:function(){var av=this.map;var ar=this;if(!av.infoWindow){av.infoWindow={};var e=['");e.push('");av.infoWindow.popDom=V(av.platform,e.join(""));av.infoWindow.shadowDom=av.infoWindow.popDom.previousSibling;av.infoWindow.popDiv=av.infoWindow.popDom.getElementsByTagName("div");av.infoWindow.shadoDiv=av.infoWindow.shadowDom.getElementsByTagName("div");av.infoWindow.contentMain=av.infoWindow.popDiv[8];av.infoWindow.titleDiv=V(av.infoWindow.popDiv[8],'
');av.infoWindow.contentDiv=V(av.infoWindow.popDiv[8],'
');av.infoWindow.maxContentDiv=V(av.infoWindow.popDiv[8],'');var at='';av.infoWindow.closeButton=V(av.infoWindow.popDom,at);var au='';av.infoWindow.maxButton=V(av.infoWindow.popDom,au);this._mendIE6(av.infoWindow)}av.infoWindow.hashCode=this.hashCode},_bind:function(){var ar=this.map;var e=this;ar.infoWindow.closeButton.onclick=function(at){var at=at||window.event;e.hide();e.dispatchEvent(new ak("onclickclose"));at.cancelBubble=true;at.returnValue=false};k.on(ar.infoWindow.closeButton,"mouseout",function(at){at.cancelBubble=true;at.returnValue=false});k.on(ar.infoWindow.popDiv,"click",function(at){if(!at){return}at.cancelBubble=true;at.returnValue=false});k.on(ar.infoWindow.popDom,"mousedown",function(at){if(!at){return}at.cancelBubble=true});k.on(ar.infoWindow.popDom,"mouseout",function(at){at.cancelBubble=true;at.returnValue=false});k.on(ar.infoWindow.popDom,"mousemove",function(at){at.cancelBubble=true;at.returnValue=false});k.on(ar.infoWindow.popDom,"mouseover",function(at){if(!at){return}at.cancelBubble=true;at.returnValue=false});k.on(ar.infoWindow.popDom,"click",function(at){if(!at){return}at.cancelBubble=true});k.on(ar.infoWindow.popDom,"dblclick",function(at){if(!at){return}at.cancelBubble=true;at.returnValue=false});k.on(ar.infoWindow.popDom,"mousewheel",function(at){if(!at){return}at.cancelBubble=true;at.returnValue=false});k.on(ar.infoWindow.popDom,"keydown",function(at){if(!at){return}at.cancelBubble=true});k.on(ar.infoWindow.popDom,"selectstart",function(at){at.cancelBubble=true});if(window.addEventListener){ar.infoWindow.popDom.addEventListener("DOMMouseScroll",function(at){if(!at){return}at.cancelBubble=true;at.returnValue=false},false)}ar.infoWindow.maxButton.onclick=function(au){var at=e.map.infoWindow.maxButton;if(at.src.indexOf("iw_plus")>0||at.src.indexOf("blank.gif")>0){e.isWinMax=true;at.src=e.IMG_PATH+"iw_minus.gif";e.setMaxContent();e.map.infoWindow.maxContentDiv.style.display="block"}else{e.isWinMax=false;at.src=e.IMG_PATH+"iw_plus.gif";e.setContent();e.map.infoWindow.maxContentDiv.style.display="none"}e.reset(false);e.reset(true);setTimeout(function(){e.setPanTo()},200);au=au||window.event;if(!au){return}au.cancelBubble=true;au.returnValue=false}},_mendIE6:function(au){if(k.isIE>6||k.isIE==0){return}var at=au.popDom.getElementsByTagName("IMG");for(var ar=0;ar730){this._config.width=730}}if(this.map&&this.map.infoWindow&&this.map.infoWindow.hashCode==this.hashCode&&this.isOpen()){this.reset(true);var ar=this;setTimeout(function(){ar.setPanTo(),200})}},setHeight:function(e){if(typeof(e)!="number"){return}if(e<0){return}if(e!=0){if(e<60){e=60}if(e>650){e=650}}this._config.height=e;var at=this.map;if(this.map&&this.map.infoWindow&&this.map.infoWindow.hashCode==this.hashCode&&this.isOpen()){if(this._config.width!=0){at.infoWindow.contentDiv.style.width=this._config.width+"px"}this.reset(true);var ar=this;setTimeout(function(){ar.setPanTo(),200})}},setMaxWidth:function(e){if(!typeof(e)!="number"){return}if(e<0){return}this._config.maxWidth=e},setTitle:function(ar){var e=this.map;ar=ar||this._config.title;ar=ar.replace(/(^[\s\t\xa0\u3000]+)|([\u3000\xa0\s\t]+$)/g,"");this._config.title=ar;if(!e||!e.infoWindow||e.infoWindow.hashCode!=this.hashCode){return}if(ar==""){k.hide(this.map.infoWindow.titleDiv);return}e.infoWindow.titleDiv.innerHTML=ar;k.show(this.map.infoWindow.titleDiv)},setContent:function(ar){var e=ar;ar=ar||this.content;var at=this.map;this.content=ar;if(!at||!at.infoWindow||at.infoWindow.hashCode!=this.hashCode){return}if(this.isWinMax){return}at.infoWindow.contentDiv.innerHTML=ar;if(this._config.width!=0){at.infoWindow.contentDiv.style.width=this._config.width+"px"}at.infoWindow.maxContentDiv.style.display="none";if(navigator.userAgent.indexOf("Safari")>0){at.infoWindow.contentDiv.style.display="block"}else{at.infoWindow.contentDiv.style.display="inline"}},setMaxContent:function(e){if(!e){e=this._config.maxContent}else{this._config.maxContent=e}var ar=this.map;if(!ar||!ar.infoWindow||ar.infoWindow.hashCode!=this.hashCode){return}ar.infoWindow.maxContentDiv.innerHTML=e;if(!this.isWinMax){return}ar.infoWindow.contentDiv.style.display="none";if(navigator.userAgent.indexOf("Safari")>0){ar.infoWindow.maxContentDiv.style.display="block"}else{ar.infoWindow.maxContentDiv.style.display="inline"}},reset:function(e){return this.redraw(e)},redraw:function(ar){if(!this.map||!this.map.infoWindow||this.map.infoWindow.hashCode!=this.hashCode){return}var at=this;timeout=100;var e=at.map.infoWindow;var au=0;if(e.titleDiv.style.display!="none"){au=24}if(this.isWinMax){w=at._config.maxWidth;setTimeout(function(){var av=au+e.maxContentDiv.scrollHeight;av=av>at.map.height?at.map.height-60:av;if(at._config.width==0){e.contentMain.style.overflowX="hidden"}else{e.contentMain.style.overflowX="auto"}if(at._config.height==0){e.contentMain.style.overflowY="hidden"}else{e.contentMain.style.overflowY="auto"}w=w<220?220:w;w=w>600?600:w;av=av<55?55:av;av=av>440?440:av;at._setWinSize(w+32,av+32,ar);e.contentMain.style.width=w+"px";e.contentMain.style.height=av+"px";e.closeButton.style.left=w+7+"px";e.maxButton.style.left=(w-20)+7+"px";if(ar!=false){at.dispatchEvent(new ak("onresize"))}},timeout)}else{e.contentDiv.style.width=e.contentMain.style.width="auto";e.contentDiv.style.height=e.contentMain.style.height="auto";if(e.contentDiv.style.display!="block"){e.contentDiv.style.display="block"}e.contentDiv.style.whiteSpace="nowrap";setTimeout(function(){var av=e.contentMain.scrollWidth||0;av=at._config.width==0?av:at._config.width;av=av<220?220:av;av=av>600?600:av;e.contentMain.style.width=av+"px";h=e.contentMain.scrollHeight||0;h=at._config.height==0?h:at._config.height;if(at._config.width==0){e.contentMain.style.overflowX="hidden"}else{e.contentMain.style.overflowX="auto"}e.contentDiv.style.whiteSpace="";if(at._config.height==0){e.contentMain.style.overflowY="hidden"}else{e.contentMain.style.overflowY="auto"}h=h<55?55:h;h=h>440?440:h;at._setWinSize(av+32,h+32,ar);e.contentMain.style.height=h+"px";e.closeButton.style.left=av+7+"px";e.maxButton.style.left=(av-20)+7+"px";if(ar!=false){at.dispatchEvent(new ak("onresize"))}},timeout)}},setPosition:function(){var ar=this.map.temp;var at=this.overlay;if(ar.pop&&at&&at.getDom()){var e=parseInt(at.getDom().style.left)+at.getIcon().infoWindowOffset.width;var au=parseInt(at.getDom().style.top)+at.getIcon().infoWindowOffset.height;ar.pop.style.left=ar.shadow.style.left=e+"px";ar.pop.style.top=ar.shadow.style.top=au+"px"}},setPanTo:function(){if(!this.overlay||!this.overlay.point){return}var aH=this.map;var au=aH.infoWindow.popDiv;var aI=aH.infoWindow.popDom;var av=parseInt(au[3].style.width)+2;var aE=parseInt(au[1].style.height)+parseInt(au[3].style.height)+parseInt(au[7].style.height);var aC=parseInt(aI.style.left);var ax=parseInt(aI.style.top);var ar=aH.pointToPixel(this.getPoint());ar.x=ar.x-this.overlay.getIcon().offset.width+this.overlay.getIcon().infoWindowOffset.width;ar.y=ar.y-this.overlay.getIcon().offset.height+this.overlay.getIcon().infoWindowOffset.height;var az=new s(ar.x+aC,ar.y+ax);var ay=new s(ar.x+av+aC,ar.y+aE+ax);if(this._config.height!=0&&document.all){if(!aH.temp.infoKey){aH.temp.infoKey=-1}var aF=-aH.temp.infoKey;aH.temp.infoKey=-aH.temp.infoKey}var aF=0;var aD=0;var e=10;var at=this._config.margin[0];var aw=this._config.margin[1];var aG=this._config.margin[2];var aA=this._config.margin[3];if(az.xaH.width-aw){aF=aH.width-ay.x-aw}if(ay.y>aH.height-aG){aD=aH.height-ay.y-aG}this._loadCollisions();var aB=this._config.collisions;if(az.xaH.width-aB[1][0]&&az.y=av){aF=-ay.x+aH.width-aB[1][0]}else{aD=-az.y+aB[1][1];if(aH.width-aB[0][0]-aB[1][0]aH.height-aB[3][1]){if(Math.abs(-az.x+aB[3][0])=av){aF=-az.x+aB[3][0]}else{aD=-ay.y+aH.height-aB[3][1]}if(aH.height-aB[0][1]-aB[3][1]aH.width-aB[2][0]&&ay.y>aH.height-aB[2][1]){if(Math.abs(-ay.x+aH.width-aB[2][0])=av){aF=-ay.x+aH.width-aB[2][0]}else{if(aH.height-aB[1][1]-aB[2][1]>=aE){aD=-ay.y+aH.height-aB[2][1]}else{aD=-az.y+aB[1][1]}if(aH.width-aB[0][0]-aB[2][0]aE[0]?ax:aE[0],au>aE[1]?au:aE[1]]}},enableMaximize:function(){this._config.enableMaximize=true;if(this.map&&this.map.infoWindow&&this.map.infoWindow.hashCode==this.hashCode){this.map.infoWindow.maxButton.style.display="block"}},disableMaximize:function(){this._config.enableMaximize=false;if(this.map&&this.map.infoWindow&&this.map.infoWindow.hashCode==this.hashCode){this.map.infoWindow.maxButton.style.display="none"}},show:function(){if(!this.map||!this.map.infoWindow||this.map.infoWindow.hashCode!=this.hashCode){return}var ar=this.map.infoWindow;if(ar.popDom.style.display!="none"){return}k.show(ar.popDom);k.show(ar.shadowDom);var e=new ak("onopen");e.point=this.getPoint();this.dispatchEvent(e)},hide:function(){if(!this.map||!this.map.infoWindow||this.map.infoWindow.hashCode!=this.hashCode){return}var ar=this.map.infoWindow;if(ar.popDom.style.display=="none"){return}k.hide(ar.popDom);k.hide(ar.shadowDom);if(this.isWinMax){this.isWinMax=false;ar.maxContentDiv.style.display="none";this.map.infoWindow.maxButton.src=this.IMG_PATH+"iw_plus.gif"}var e=new ak("onclose");e.point=this.getPoint();this.dispatchEvent(e)},close:function(){this.hide()},dispose:function(){k.BaseClass.prototype.dispose.call(this)},getObject:function(){return this.domElement},setConfig:function(ar){if(ar==null){return}for(var e in ar){if(typeof(this._config[e])==typeof(ar[e])){this._config[e]=ar[e]}}},_revert:function(){if(!this.map||!this.map.infoWindow||this.map.infoWindow.hashCode!=this.hashCode){return}this.isWinMax=false;this.map.infoWindow.titleDiv.innerHTML="";this.map.infoWindow.contentDiv.innerHTML="";this.map.infoWindow.maxContentDiv.innerHTML="";this.map.infoWindow.maxButton.src=this.IMG_PATH+"iw_plus.gif"},_setOverflow:function(){var e=this.map;if(!e||!e.infoWindow||e.infoWindow.hashCode!=this.hashCode){return}e.infoWindow._overflowX=e.infoWindow.contentMain.style.overflowX;e.infoWindow._overflowY=e.infoWindow.contentMain.style.overflowY;e.infoWindow.contentMain.style.overflowX="hidden";e.infoWindow.contentMain.style.overflowY="hidden"},_resetOverflow:function(){var e=this;var ar=this.map;if(!ar||!ar.infoWindow||ar.infoWindow.hashCode!=this.hashCode||!ar.infoWindow._overflowX||!ar.infoWindow._overflowY){return}ar.infoWindow.contentMain.style.overflowX=ar.infoWindow._overflowX;ar.infoWindow.contentMain.style.overflowY=ar.infoWindow._overflowY;delete ar.infoWindow._overflowX;delete ar.infoWindow._overflowY},isVisible:function(){return this.isOpen()},isOpen:function(){if(!this.map){return false}var e=this.map.temp.infoWin;if(this.map.infoWindow&&this.map.infoWindow.hashCode!=this.hashCode){return false}if(e&&e.overlay==this.overlay&&this.map.infoWindow&&this.map.infoWindow.popDom.style.display=="none"){return false}else{return true}},getPoint:function(){if(this.overlay&&this.overlay.getPoint&&this.overlay.getPoint()){return this.overlay.getPoint()}},getOffset:function(){return this._config.offset},setMaxScene:function(e){var ar=this;if(!ar.map||!ar.map.infoWindow||ar.map.infoWindow.hashCode!=this.hashCode){return}ar.map.infoWindow.maxButton.style.display="block";var at=ar.map.infoWindow.maxButton;if(!!e==!!this.isWinMax){return}if(e){ar.isWinMax=true;at.src=ar.IMG_PATH+"iw_minus.gif";ar.setMaxContent();ar.map.infoWindow.maxContentDiv.style.display="block"}else{ar.isWinMax=false;at.src=ar.IMG_PATH+"iw_plus.gif";ar.setContent();ar.map.infoWindow.maxContentDiv.style.display="none"}this.reset(false)},toString:function(){return"InfoWindow"}});function R(ar,e){ag.call(this);this.content=ar;this.map=null;this.domElement=null;this._config={width:0,offset:new f(0,0),styles:{backgroundColor:"#fff",border:"1px solid #f00",padding:"1px",whiteSpace:"nowrap",font:"12px arial,simsun",zIndex:"80",MozUserSelect:"none"},point:null};e=e||{};this.setConfig(e);if(this._config.width<0){this._config.width=0}this.point=e.point}R.inherits(ag,"Label");k.extend(R.prototype,{render:function(){var e=this._config;var at=this.content;var ar=['");return ar.join("")},initialize:function(e){this.map=e;this._addOverlayDom();this.setStyle(this._config.styles);if(!k.Browser.ie){this.domElement.style.cursor="inherit"}},_getPixel:function(e){return this.map.pointToPixel(this.getPoint())},setContent:function(e){this.content=e;if(this.domElement){this.domElement.innerHTML=e}},setOpacity:function(e){if(e>=0&&e<=1){this._config.opacity=e}if(this.domElement){ad(this.domElement,e)}},setOffset:function(e){if(!e||e.toString()!="Size"){return}this._config.offset=new f(e.width,e.height);this.setPoint(this.getPoint())},getOffset:function(){return this._config.offset},setStyle:function(ar){ar=ar||{};this._config.styles=k.extend(this._config.styles,ar);if(this.domElement){for(var au in ar){try{this.domElement.style[au]=ar[au]}catch(at){alert(at.message)}}}},setStyles:function(e){return this.setStyle(e)},setTitle:function(e){this._config.title=e||"";if(this.domElement){this.domElement.title=this._config.title}},getTitle:function(){return this._config.title}});function K(e,ar){ag.call(this);ar=ar||{};this.point=e;this.map=null;this.domElement=null;this.iconDom=null;this.infoWindowDom=null;this.siblingElement=null;this.iconClassName="none";this.isDraging=false;this._config={offset:new f(0,0),opacity:1,icon:null,infoWindow:null,label:null,baseZIndex:2500000,clickable:true,zIndexFixed:false,isTop:false};this.setConfig(ar);if(!ar.icon){this._config.icon=new z.Icon(aj.imgPath+"marker_red.png",new f(23,25),{offset:new f(10,25),infoWindowOffset:new f(10,0)})}}K.inherits(ag,"Marker");k.extend(K.prototype,{initialize:function(e){this.map=e;this._addOverlayDom();this.setIcon(this._config.icon);this.setLabel(this._config.label);this.enableDragging(this.isDraging)},render:function(){var e=['');e.push("");return e.join("")},siblingRender:function(){var e=['');e.push("");return e.join("")},remove:function(){if(this.domElement&&this.domElement.parentNode){this.domElement.parentNode.removeChild(this.domElement)}if(this.siblingElement&&this.siblingElement.parentNode){this.siblingElement.parentNode.removeChild(this.siblingElement)}if(this.infoWindow&&this.infoWindow.overlay&&this.infoWindow.overlay===this){this.closeInfoWindow();this.infoWindow=null}this.domElement=null;this.siblingElement=null;this.iconDom=null;if(this._config.label){this._config.label.domElement=null;this._config.label=null}this.dispatchEvent(new ak("onremove"))},hide:function(){ag.prototype.hide.call(this);if(this.infoWindow&&this.infoWindow.overlay&&this.infoWindow.overlay==this){this.closeInfoWindow()}k.hide(this.domElement);k.hide(this.siblingElement)},show:function(){ag.prototype.show.call(this);if(this.domElement){this.domElement.style.display=""}k.show(this.siblingElement)},setIcon:function(at){if(!at||at.toString()!="Icon"){return}this._config.icon=at;if(!this.map||!this.domElement||!this.siblingElement){return}var av=this.map;try{if(this.iconDom){this.siblingElement.removeChild(this.iconDom);this.iconDom=null}this.domElement.style.width=at.size.width+"px";this.domElement.style.height=at.size.height+"px"}catch(au){}if(this._config.icon){var ar=['
");ar.push(at.getHTML());ar.push("
");this.iconDom=V(this.siblingElement,ar.join(""));this.iconDom.galleryImg=false}this.setPoint(this.getPoint())},setIconClassName:function(e){if(this.iconDom){this.iconDom.className=e}},getIcon:function(){return this._config.icon},setLabel:function(e){if(!e||e.toString()!="Label"){return}this._config.label=e;var ar=this;if(!this._config.label._binded){this._config.label._binded=true;this._config.label.addEventListener("remove",function(){ar._config.label=null})}if(!this.map){return}this.map.addOverlay(e);if(e.getDom()){this.siblingElement.appendChild(e.getDom())}else{e.domElement=V(this.domElement,e.render());e.domElement.hashCode=e.getHashCode()}e.domElement.style.left=(e._config.offset.width)+"px";e.domElement.style.top=(e._config.offset.height)+"px"},getLabel:function(){return this._config.label},enableDragging:function(av){this.isDraging=!!av;if(!this.domElement){return}var az=this;var aw=0;var au=0;var at=0;var ar=false;var aA={x:0,y:0};function ay(aE,aD){var aC=aE.srcElement||aE.target;var aB=aE.clientX||aE.pageX;var aG=aE.clientY||aE.pageY;if(aE&&aD&&aB&&aG&&aC){var aF=k.Dom.getOffset(map.container);aD.pixel=new s(aB-aF.left,aG-aF.top);aD.point=map.pixelToPoint(aD.pixel);return aD}else{return aD}}this.dragStart=function(aC){ar=true;var aB=az.map.pointToPixel(az.point);aw=aC.clientX-aB.x;au=aC.clientY-aB.y;at=new Date().getTime();k.on(document,"mousemove",az.dragIng);k.on(document,"mouseup",az.dragEnd);if(az.domElement&&az.domElement.setCapture){az.domElement.setCapture()}};this.dragEnd=function(aB){if(az.domElement&&az.domElement.releaseCapture){az.domElement.releaseCapture()}ar=false;k.un(document,"mousemove",az.dragIng);k.un(document,"mouseup",az.dragEnd);aw=au=0;if((new Date()).getTime()-at>=100&&(aA.x>2||aA.y>2)){az._dragstarted=false;az.dispatchEvent(ay(aB,new ak("ondragend").inherit(aB)))}};this.dragIng=function(aD){if(ar==false){return}if(!az._dragstarted){az.dispatchEvent(ay(aD,new ak("ondragstart").inherit(aD)));az._dragstarted=true}var aC=new s((aD.clientX-aw),(aD.clientY-au));aA=aC;if((aC.x>15&&aC.x30&&aC.y=this.MCBAND[au]){av=this.MC2LL[au];break}}var e=this.convertor(ar,av);var ar=new D(e.lng.toFixed(6),e.lat.toFixed(6));return ar},convertLL2MC:function(e){var ar,au;e.lng=this.getLoop(e.lng,-180,180);e.lat=this.getRange(e.lat,-74,74);ar=new D(e.lng,e.lat);for(var at=0;at=this.LLBAND[at]){au=this.LL2MC[at];break}}if(!au){for(var at=this.LLBAND.length-1;at>=0;at--){if(ar.lat<=-this.LLBAND[at]){au=this.LL2MC[at];break}}}var av=this.convertor(e,au);var e=new D(av.lng.toFixed(2),av.lat.toFixed(2));return e},convertor:function(at,au){if(!at||!au){return}var e=au[0]+au[1]*Math.abs(at.lng);var ar=Math.abs(at.lat)/au[9];var av=au[2]+au[3]*ar+au[4]*ar*ar+au[5]*ar*ar*ar+au[6]*ar*ar*ar*ar+au[7]*ar*ar*ar*ar*ar+au[8]*ar*ar*ar*ar*ar*ar;e*=(at.lng<0?-1:1);av*=(at.lat<0?-1:1);return new D(e,av)},getDistance:function(ar,e,au,at){return this.EARTHRADIUS*Math.acos((Math.sin(au)*Math.sin(at)+Math.cos(au)*Math.cos(at)*Math.cos(e-ar)))},toRadians:function(e){return Math.PI*e/180},toDegrees:function(e){return(180*e)/Math.PI},getRange:function(at,ar,e){if(ar!=null){at=Math.max(at,ar)}if(e!=null){at=Math.min(at,e)}return at},getLoop:function(at,ar,e){while(at>e){at-=e-ar}while(at0){aE[au.name]=au;aE.push(au.name)}var aH=aE.length-aA.bufferNumber;for(var aB=0;aH>0&&aB0&&at.isTransparentPng()==true){var aG=au.src.toUpperCase();if(aG.indexOf(".PNG")>0){var az=au.img.style.width;var aI=au.img.style.height;var aF='position:absolute;FILTER: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="'+au.src+'",sizingMethod=scale);';au.img.style.cssText=aF;au.img.style.width=az;au.img.style.height=aI;ai(au.img,au.position)}}}}};this.img.onerror=function(aA){if(!au.mgr){return}var ay=au.mgr;au.error=true;var az=N[at.mapType];if(az.errorUrl){au.img.src=az.errorUrl}if(!G(au.img)){if(at.tilesDiv){at.tilesDiv.appendChild(au.img)}}};if(FeBrowser.ie<=6&&FeBrowser.ie>0&&at.isTransparentPng()==true){av.src=aj.imgPath+"blank.gif"}else{av.src=ax}}function S(e){this.tileLayers=[];this.cacheDiv=null;this.map=e;this.bufferNumber=500;this.mapTiles=[];this.bufferTiles=[];this.slideMaxZoom=4;this.config=N[this.map.mapType];this.errorUrl=this.config.errorUrl;this.tileSize=this.config.tileSize;this.baseUnits=this.config.baseUnits;this.minZoomLevel=this.config.zoomLevelMin;this.maxZoomLevel=this.config.zoomLevelMax;this.tileURLs=this.config.tileUrls;this.temp={}}z.register(function(ar){var e=ar.tileMgr=new S(ar);ar.addEventListener("dragstart",function(at){e.dragStart(at)});ar.addEventListener("dragend",function(at){e.dragEnd(at)});ar.addEventListener("click",function(at){e.click(at)});ar.addEventListener("mousewheel",function(at){e.mouseWheel(at)});ar.addEventListener("dblclick",function(at){e.dblClick(at)});ar.addEventListener("load",function(at){e.loadTiles()});ar.addEventListener("zoomstart",function(at){e._zoom(at)});ar.addEventListener("moving",function(at){e.mend(at)});ar.addEventListener("resize",function(at){e.resizeMap(at)});ar.addEventListener("addtilelayer",function(at){e.addTileLayer(at)});ar.addEventListener("removetilelayer",function(at){e.removeTileLayer(at)})});k.extend(S.prototype,{addTileLayer:function(au){var at=this;var ar=au.target;at.tileLayers.push(ar);at.moveGridTiles(true)},removeTileLayer:function(az){var aA=this;var ax=az.target;var av=ax.mapType;var au=aA.mapTiles;var aB=aA.bufferTiles;for(var ar in aB){var at=ar.split("-")[1];if(at==av){delete aB[ar]}}for(var ar in au){var at=ar.split("-")[1];if(at==av){delete au[ar]}}if(aA.zoomsDiv&&aA.zoomsDiv.parentNode){aA.zoomsDiv.parentNode.removeChild(aA.zoomsDiv);aA.zoomsDiv.innerHTML=""}for(var ay=0,aw=aA.tileLayers.length;ay0){aC._diff++}else{aC._diff--}}if(this._zTimeLine&&this._zTimeLine.schedule==0){this._zTimeLine.stop();this._zTimeLine=null;aD=aC._diff}var aB=Math.pow(2,aD);var az=this.zoomsDiv.childNodes.length;for(var ay=az-1;ay>-1;ay--){var au={};var aE=this.zoomsDiv.childNodes[ay].style;au.top=parseInt(aE.top)||0;au.left=parseInt(aE.left)||0;au.width=parseInt(aE.width);au.height=parseInt(aE.height);au.dw=au.width*aB-au.width;au.dh=au.height*aB-au.height;au.dx=(au.left-ar.x)*aB-(au.left-ar.x);au.dy=(au.top-ar.y)*aB-(au.top-ar.y);aw[ay]=au}this.zoomsDiv._ol=parseInt(this.zoomsDiv.style.left);this.zoomsDiv._ot=parseInt(this.zoomsDiv.style.top);if(this._zTimeLine!=null){this._zTimeLine.stop();this._zTimeLine=null}this._zTimeLine=new A({fps:20,duration:at.config.zoomerDuration,transition:p.easeInQuad,render:function(aI){if(aI<0.1){return}for(var aH=aw.length-1;aH>-1;aH--){var aJ=aw[aH];if(aC.zoomsDiv&&aC.zoomsDiv.childNodes[aH]){var e=aC.zoomsDiv.childNodes[aH].style;e.top=Math.round(aJ.top+aJ.dy*aI)+"px";e.left=Math.round(aJ.left+aJ.dx*aI)+"px";e.width=Math.ceil(aJ.width+aJ.dw*aI)+"px";e.height=Math.ceil(aJ.height+aJ.dh*aI)+"px"}}if(aG||aF){aC.zoomsDiv.style.left=aC.zoomsDiv._ol-(aG*aI)+"px";aC.zoomsDiv.style.top=aC.zoomsDiv._ot-(aF*aI)+"px"}},finish:function(){aC.moveGridTiles(true);aC._zTimeLine=null;if(at.overlayDiv){at.overlayDiv.style.visibility=""}if(at.markerDiv){at.markerDiv.style.visibility=""}for(var aH=0,e=aC.tileLayers.length;aHaP[0]||aKaP[1]||aCaw){ay.zoomLevel=aw;return}}if(ay.zoomLevel>av.zoomLevelMax){ay.zoomLevel=av.zoomLevelMax;return}if(ay.zoomLevelaz){ay.zoomLevel=az}var aw=ay.config.zoomLevelMax;if(aw){if(ay.zoomLevel>aw){ay.zoomLevel=aw;az=aw}}if(ay.zoomLevel/g,">")}});function aq(ar,e){a.call(this,ar);this._opts=k.extend(k.extend(this._opts,{icon:null,iconFollow:false,followText:"",cursor:"pointer"}),e);this._isOpen=false;this._opts.followText=this._checkStr(this._opts.followText);this.followTitle=this._opts.followText;this.followMarker=null;this._overlays=[]}aq.inherits(a,"PushpinTool");k.extend(aq.prototype,{open:function(){if(this._isOpen==true){return true}if(this._map._toolInUse){return false}this._map._toolInUse=true;this._isOpen=true;if(!this.binded){this._bind();this.binded=true}if(this.followMarker==null){this.followMarker=new K(this._map.getCenter(),{icon:this._opts.icon})}this._map.addOverlay(this.followMarker);this.followMarker.hide();j.show(this._map);this.setCursor(this._opts.cursor)},close:function(){if(!this._isOpen){return}this._map._toolInUse=false;this._isOpen=false;if(this.followMarker){this.followMarker.remove();this.followMarker=null}if(this.followTitle){this.followTitle.hide()}j.hide()},_bind:function(){a.prototype._bind.call(this);var e=this;k.on(j.getDom(e._map),"click",function(aw){if(!e._isOpen){return}aw=window.event||aw;var ar=aw.layerX||aw.offsetX;var ax=aw.layerY||aw.offsetY;var av=j.getDrawPoint(aw);var at=new K(av,{icon:e._opts.icon});e._map.addOverlay(at);e._overlays.push(at);var au=new ak("onmarkend");au.marker=at;e.dispatchEvent(au);e.close()})},setIcon:function(e){if(!e||e&&e.toString()!="Icon"){return}this._opts.icon=e},getIcon:function(){return this._opts.icon},setCursor:function(e){this._opts.cursor=e;j.setCursor(this._opts.cursor)},getCursor:function(){return this._opts.cursor},clear:function(){for(var ar=0,e=this._overlays.length;ar1){this._opts.opacity=1}else{if(this._opts.opacity<0){this._opts.opacity=0}}if(this._opts.lineStyle!="solid"&&this._opts.lineStyle!="dashed"){this._opts.lineStyle="solid"}this._checked=false;this._drawing=null;this.followTitle=null;this._totalDis={};this._points=[];this._paths=[];this._dots=[];this._segDistance=[];this._overlays=[];this._units={metric:{name:"metric",conv:1,incon:1000,u1:"\u7c73",u2:"\u516c\u91cc"},us:{name:"us",conv:3.2808,incon:5279.856,u1:"\u82f1\u5c3a",u2:"\u82f1\u91cc"}};if(!this._units[this._opts.unit]){this._opts.unit="metric"}this._dLineColor="#ff6319";this._dLineStroke=3;this._dOpacity=0.8;this._dLineStyle="solid";this._dCursor=aj.imgPath+"ruler.cur";if(this._opts.showResult){this._opts.followText="\u5355\u51fb\u786e\u5b9a\u8d77\u70b9"}this._followTextM="\u5355\u51fb\u786e\u5b9a\u5730\u70b9\uff0c\u53cc\u51fb\u7ed3\u675f";this._movingTimerId=null;if(this._opts.showResult){this.text="\u6d4b\u8ddd"}else{this.text="\u7ed8\u7ebf"}this._isOpen=false}t.inherits(a,"PolylineTItem");k.extend(t.prototype,{initialize:function(ar,e){if(a.prototype.initialize.call(this,ar,e)==false){return}},open:function(){if(this._isOpen==true){return true}if(this._map._toolInUse){return false}this._map._toolInUse=true;this._isOpen=true;if(this._mapMoving){delete this._mapMoving}var au=this;if(!this._binded){this._binded=true;this._bind();this._map.addEventListener("moving",function(){au._hideCurrent()})}var at=function(aC){var ax=au._map;if(ax.currentOperation&g.toolbarOperation==0||!au._isOpen){return}aC=window.event||aC;var az=j.getDrawPoint(aC,true);if(!au._isPointValid(az)){return}au._bind.initX=aC.pageX||aC.clientX||0;au._bind.initY=aC.pageY||aC.clientY||0;if(au._points.length>0){var aF=ax.pointToPixel(au._points[au._points.length-1]);var ay=ax.pointToPixel(az);var aB=Math.sqrt(Math.pow(aF.x-ay.x,2)+Math.pow(aF.y-ay.y,2));if(aB<5){return}}au._bind.x=aC.layerX||aC.offsetX||0;au._bind.y=aC.layerY||aC.offsetY||0;au._points.push(az);if(au._opts.showResult){au._addSecPoint(az)}if(au._opts.showResult&&au._paths.length==0){au._formatTitle(1,au._followTextM,au.getTotalDistance())}if(au._paths.length>0){au._paths[au._paths.length-1].show();if(au._opts.showResult){au._paths[au._paths.length-1].setStrokeOpacity(au._dOpacity)}}var aI=new C([az,az]);au._map.addOverlay(aI);aI._stCode=au._opts.styleCodes.lnCode;au._paths.push(aI);au._overlays.push(aI);if(au._opts.showResult){aI.setStrokeWeight(au._dLineStroke);aI.setStrokeColor(au._dLineColor);aI.setStrokeOpacity(au._dOpacity/2);aI.setStrokeStyle(au._dLineStyle)}else{aI.setStrokeStroke(au._opts.lineStroke);aI.setStrokeColor(au._opts.lineColor);aI.setStrokeOpacity(au._opts.opacity);aI.setStrokeStyle(au._opts.lineStyle)}if(au._mapMoving){aI.hide()}if(au._points.length>1){var aA=au._paths[au._points.length-2];aA.setPath(az,1)}if(au._opts.showResult){var aD="";if(au._points.length>1){var aG=au._setSegDistance(au._points[au._points.length-2],au._points[au._points.length-1]);var aE=au.getTotalDistance();aD=au._formatDisStr(aE)}else{aD="\u8d77\u70b9"}var aH=new R(aD,{offset:new z.Size(10,-5)});aH.setStyles({color:"#333",borderColor:"#ff0103"});aH._stCode=au._opts.styleCodes.slCode;au._map.addOverlay(aH);au._formatSegLabel(aH,aD);au._overlays.push(aH);az.disLabel=aH;aH.setPoint(az)}};var ar=function(aO){if(!au._isOpen){return}if(au._paths.length>0){aO=window.event||aO;var aE=aO.pageX||aO.clientX||0;var aD=aO.pageY||aO.clientY||0;if(typeof au._bind.initX=="undefined"){au._bind.x=aO.layerX||aO.offsetX||0;au._bind.y=aO.layerY||aO.offsetY||0;au._bind.initX=aE;au._bind.initY=aD}var aG=au._bind.x+aE-au._bind.initX;var aF=au._bind.y+aD-au._bind.initY;var aM=au._paths[au._paths.length-1];var aK=au._map.pixelToPoint(new s(aG,aF));aM.setPath(aK,1);if(!au._mapMoving){aM.show()}var aI=0;var aH=0;if(aG<10){aI=8}else{if(aG>au._map.width-10){aI=-8}}if(aF<10){aH=8}else{if(aF>au._map.height-10){aH=-8}}if(aI!=0||aH!=0){if(!ar._movingTimerId){var az=au._map.offsetX;var ay=au._map.offsetY;var aB=az+aI;var aA=ay+aH;au._mapMoving=true;au._map._setPlatformPosition(aB,aA);au._bind.i=0;au._bind.j=0;ar._movingTimerId=setInterval(function(){var aQ=aI!=0?au._bind.i+=aI:0;var aP=aH!=0?au._bind.j+=aH:0;au._map._setPlatformPosition(aB+aQ,aA+aP)},30);au._movingTimerId=ar._movingTimerId;aM.hide();au.followTitle&&au.followTitle.hide()}}else{if(ar._movingTimerId){clearInterval(ar._movingTimerId);delete ar._movingTimerId;delete au._movingTimerId;var aJ=au._paths[au._paths.length-1];var ax=au._map.pixelToPoint(new s(aG,aF));if(!aJ){return}aJ.setPath(ax,1);aJ.show();if(au.followTitle){au.followTitle.setPoint(ax);au.followTitle.show()}au._bind.i=0;au._bind.j=0;delete au._mapMoving}}if(au._opts.showResult&&au.followTitle){var aC=au.getTotalDistance();var aN=au._getDistance(au._points[au._points.length-1],aK);au._updateInstDis(au.followTitle.getDom(),aC+aN)}}else{if(au.followTitle){au.followTitle.show();aO=window.event||aO;var aL=aO.target||aO.srcElement;if(aL!=j.getDom()){au.followTitle.hide()}}}};var e=function(aE){if(!au._isOpen){return}k.un(j.getDom(au._map),"click",at);k.un(document,"mousemove",ar);k.un(j.getDom(au._map),"dblclick",e);if(au._opts.showResult&&au._points.length>0){var aD=au._points[au._points.length-1];aD.disLabel.remove();delete aD.disLabel}var ay=0;if(au._paths.length>0){var aC=au._paths[au._paths.length-1];var aB=au._map.pointToPixel(au._points[au._points.length-1]);var az=au._map.pointToPixel(au._points[au._points.length-2]);if(aB&&az){var ax=Math.round(Math.sqrt((aB.x-az.x)*(aB.x-az.x)+(aB.y-az.y)*(aB.y-az.y)));if(ax<5){aC.remove();au._paths.length=au._paths.length-1}if(au._opts.showResult&&au._paths.length>0){ay=au.getTotalDistance();au._processLastOp()}}}else{if(au._opts.showResult==true&&au._paths.length<1){au._clearThis()}}var aA=new ak("ondrawend");aA.points=au._points.slice(0);aA.overlays=au._paths.slice(0);if(au._opts.showResult){aA.distance=ay.toFixed(0)}au.dispatchEvent(aA);setTimeout(function(){if(au._isOpen==true){au.close()}},50)};var aw=function(ax){ax=window.event||ax;if(ax.keyCode==27){au._clearThis();au.dispatchEvent(new ak("ondrawended"));setTimeout(function(){if(au._isOpen==true){au.close()}},50)}};var av=function(ax){ax=window.event||ax;if(k.Browser.ie&&ax.button!=1||ax.button==2){if(au._isOpen==true){au.dispatchEvent(new ak("ondrawend"));au.close()}}};au._initArrays();if(this._opts.showResult){this._formatTitle()}j.show(this._map);this.setCursor(this._opts.cursor);k.on(j.getDom(this._map),"click",at);k.on(document,"mousemove",ar);k.on(j.getDom(this._map),"dblclick",e);k.on(document,"keydown",aw);k.on(j.getDom(this._map),"mouseup",av);this.bindFunc=[{elem:j.getDom(this._map),type:"click",func:at},{elem:j.getDom(this._map),type:"dblclick",func:e},{elem:document,type:"mousemove",func:ar},{elem:document,type:"keydown",func:aw},{elem:j.getDom(this._map),type:"mouseup",func:av}];return true},close:function(){if(this._isOpen==false){return}this._isOpen=false;this._map._toolInUse=false;if(this._mapMoving){delete this._mapMoving}var at=this;if(at._points.length<2){at._clearThis()}else{at._paths[at._paths.length-1].remove();at._paths[at._paths.length-1]=null;at._paths.length=at._paths.length-1;var au=at._points[at._points.length-1];if(au.disLabel){au.disLabel.remove()}at._processLastOp()}j.hide();for(var ar=0,e=this.bindFunc.length;arthis._units[ar].incon){e=e/this._units[ar].incon;at=this._units[ar].u2;e=e.toFixed(1)}else{e=e.toFixed(0)}return e+at},setLineColor:function(e){if(e&&typeof e=="string"){this._opts.lineColor=e}},setLineStroke:function(e){if(Math.round(e)>0){this._opts.lineStroke=Math.round(e)}},setOpacity:function(e){if(e>=0&&e<=1){this._opts.opacity=e}},setLineStyle:function(e){if(e=="solid"||e=="dashed"){this._opts.lineStyle=e}},clear:function(){for(var ar=0,e=this._overlays.length;ar"+at+""},_processLastOp:function(){var av=this;delete av._bind.x;delete av._bind.y;delete av._bind.initX;delete av._bind.initY;if(av._paths.length>av._points.length-1){var at=av._paths.length-1;av._paths[at].remove();av._paths[at]=null;av._paths.length=at}if(!av._opts.showResult){return}var e=av._totalDis[av._points[0].getHashCode()]={};e.points=av._points.slice(0);e.paths=av._paths.slice(0);e.dots=av._dots.slice(0);e.segDis=av._segDistance.slice(0);var aw=av._map.pointToPixel(e.points[e.points.length-1]);var au=av._map.pointToPixel(e.points[e.points.length-2]);var ax=[0,0];var ar=[0,0];if(aw.y-au.y>=0){ar=[-5,11]}else{ar=[-5,-35]}if(aw.x-au.x>=0){ax=[14,0]}else{ax=[-14,0]}var aA=e.points[e.points.length-1];aA.disLabel=new R("",{offset:new z.Size(-15,-40)});aA.disLabel.setStyles({color:"#333",borderColor:"#ff0103"});aA.disLabel._stCode=av._opts.styleCodes.tlCode;av._map.addOverlay(aA.disLabel);aA.disLabel.setOffset(new z.Size(ar[0],ar[1]));aA.disLabel.setPoint(aA);av._formatTitle(2,"","",aA.disLabel);var az=new n(aj.imgPath+"mapctrls.gif",new z.Size(12,12),{imageOffset:new z.Size(0,-14)});e.closeBtn=new K(e.points[e.points.length-1],{icon:az,offset:new z.Size(ax[0],ax[1]),baseZIndex:3600000});av._map.addOverlay(e.closeBtn);e.closeBtn.getDom().title="\u6e05\u9664\u672c\u6b21\u6d4b\u8ddd";e.closeBtn.addEventListener("click",function(aE){var aC=e.points[0].getHashCode();for(var aD=0,aB=e.points.length;aDthis._units[az].incon){ar=ar/this._units[az].incon;ax=this._units[az].u2;ar=ar.toFixed(1)}else{ar=ar.toFixed(0)}ay.push("\u603b\u957f\uff1a"+ar+""+ax+"
");ay.push(""+aA+"")}else{if(au==2){var az=this._opts.unit;var ax=this._units[az].u1;var ar=this._convertUnit(this.getTotalDistance(),az);if(ar>this._units[az].incon){ar=ar/this._units[az].incon;ax=this._units[az].u2;ar=ar.toFixed(1)}else{ar=ar.toFixed(0)}ay.push("\u603b\u957f\uff1a"+ar+""+ax);av.content="\u603b\u957f\uff1a"+ar+ax}else{av.setOffset(0,25);ay.push(aB)}}at.innerHTML=ay.join("")},_updateInstDis:function(at,e){var ar=this._opts.unit;var au=this._units[ar].u1;if(e>this._units[ar].incon){e=e/this._units[ar].incon;au=this._units[ar].u2;e=e.toFixed(1)}else{e=e.toFixed(0)}at.children[0].innerHTML="\u603b\u957f\uff1a"+e+""+au},_hideCurrent:function(){if(!this._isOpen){return}if(this._paths.length>0){var e=this._paths[this._paths.length-1];e.hide()}this.followTitle&&this.followTitle.hide()},_isPointValid:function(e){if(!e){return false}if(e.lngN[this._map.mapType].bounds[2]||e.latN[this._map.mapType].bounds[3]){return false}return true},_getDistance:function(at,ar){var e=0;if(this._map.config.coordType==BMAP_COORD_LNGLAT){e=an.getDistanceByLL(at,ar)}else{e=an.getDistanceByMC(at,ar)}return e},toString:function(){return"DistanceTool"}});window.BMAP_ZOOM_IN=0;window.BMAP_ZOOM_OUT=1;function l(ar,e){a.call(this,ar);this._opts=k.extend(k.extend(this._opts,{zoomType:BMAP_ZOOM_IN,followText:"",strokeWeight:2,strokeColor:"#111",style:"solid",fillColor:"#ccc",opacity:0.4,cursor:"crosshair",autoClose:false}),e);this._opts.strokeWeight=this._opts.strokeWeight<=0?1:this._opts.strokeWeight;this._opts.opacity=this._opts.opacity<0?0:this._opts.opacity>1?1:this._opts.opacity;if(this._opts.zoomTypeBMAP_ZOOM_OUT){this._opts.zoomType=BMAP_ZOOM_IN}this._isOpen=false;this._fDiv=null;this.followTitle=null}l.inherits(a,"DragAndZoomTool");k.extend(l.prototype,{open:function(){if(this._isOpen==true){return true}if(this._map._toolInUse){return false}this._map._toolInUse=true;this._isOpen=true;if(!this.binded){this._bind();this.binded=true}var at=this;var au=this._map;var ar=function(aw){aw=window.event||aw;if(aw.button!=0&&!k.Browser.ie||k.Browser.ie&&aw.button!=1){return}if(z.OperationMask.getDom(au).setCapture){z.OperationMask.getDom(au).setCapture()}if(!at._isOpen){return}at._bind.isZooming=true;k.on(document,"mousemove",e);k.on(document,"mouseup",av);at._bind.mx=aw.layerX||aw.offsetX||0;at._bind.my=aw.layerY||aw.offsetY||0;at._bind.ix=aw.pageX||aw.clientX||0;at._bind.iy=aw.pageY||aw.clientY||0;j.getDom(au).insertAdjacentHTML("beforeBegin",at._generateHTML());at._fDiv=j.getDom(au).previousSibling;at._fDiv.style.width="0";at._fDiv.style.height="0";at._fDiv.style.left=at._bind.mx+"px";at._fDiv.style.top=at._bind.my+"px";al(aw);return U(aw)};var e=function(aC){if(at._isOpen==true&&at._bind.isZooming==true){var aC=window.event||aC;var ay=aC.pageX||aC.clientX||0;var aw=aC.pageY||aC.clientY||0;var aA=at._bind.dx=ay-at._bind.ix;var ax=at._bind.dy=aw-at._bind.iy;var az=Math.abs(aA)-at._opts.strokeWeight;var aB=Math.abs(ax)-at._opts.strokeWeight;at._fDiv.style.width=(az<0?0:az)+"px";at._fDiv.style.height=(aB<0?0:aB)+"px";if(aA>=0){at._fDiv.style.right="auto";at._fDiv.style.left=at._bind.mx+"px";if(at._bind.mx+aA>=au.width-2*at._opts.strokeWeight){at._fDiv.style.width=au.width-at._bind.mx-2*at._opts.strokeWeight+"px";at.followTitle&&at.followTitle.hide()}}else{at._fDiv.style.left="auto";at._fDiv.style.right=au.width-at._bind.mx+"px";if(at._bind.mx+aA<=2*at._opts.strokeWeight){at._fDiv.style.width=at._bind.mx-2*at._opts.strokeWeight+"px";at.followTitle&&at.followTitle.hide()}}if(ax>=0){at._fDiv.style.bottom="auto";at._fDiv.style.top=at._bind.my+"px";if(at._bind.my+ax>=au.height-2*at._opts.strokeWeight){at._fDiv.style.height=au.height-at._bind.my-2*at._opts.strokeWeight+"px";at.followTitle&&at.followTitle.hide()}}else{at._fDiv.style.top="auto";at._fDiv.style.bottom=au.height-at._bind.my+"px";if(at._bind.my+ax<=2*at._opts.strokeWeight){at._fDiv.style.height=at._bind.my-2*at._opts.strokeWeight+"px";at.followTitle&&at.followTitle.hide()}}al(aC);return U(aC)}};var av=function(aD){if(at._isOpen==true){k.un(document,"mousemove",e);k.un(document,"mouseup",av);if(z.OperationMask.getDom(au).releaseCapture){z.OperationMask.getDom(au).releaseCapture()}var az=parseInt(at._fDiv.style.left)+parseInt(at._fDiv.style.width)/2;var ay=parseInt(at._fDiv.style.top)+parseInt(at._fDiv.style.height)/2;if(isNaN(az)){az=at._map.width-parseInt(at._fDiv.style.right)-parseInt(at._fDiv.style.width)/2}if(isNaN(ay)){ay=at._map.height-parseInt(at._fDiv.style.bottom)-parseInt(at._fDiv.style.height)/2}var aE=Math.min(au.width/Math.abs(at._bind.dx),au.height/Math.abs(at._bind.dy));aE=Math.floor(aE);var aB=new s(az-parseInt(at._fDiv.style.width)/2,ay-parseInt(at._fDiv.style.height)/2);var aA=new s(az+parseInt(at._fDiv.style.width)/2,ay+parseInt(at._fDiv.style.height)/2);var aH=at._map.pixelToPoint(aB);var aG=at._map.pixelToPoint(aA);var aC=new m(aH.lng,aG.lat,aG.lng,aH.lat);delete at._bind.dx;delete at._bind.dy;delete at._bind.ix;delete at._bind.iy;if(!isNaN(aE)){var aI=at._map.getZoomUnits(at._map.getZoom());if(at._opts.zoomType==BMAP_ZOOM_IN){targetZoomLv=Math.round(au.getZoom()+(Math.log(aE)/Math.log(2)));if(targetZoomLvau.getZoom()){targetZoomLv=au.getZoom()}}}else{targetZoomLv=at._map.getZoom()+(at._opts.zoomType==BMAP_ZOOM_IN?1:-1)}var ax=at._map.pixelToPoint({x:az,y:ay},at._map.getZoom());at._map.centerAndZoom(ax,targetZoomLv);var aJ=j.getDrawPoint(aD);if(at.followTitle){at.followTitle.setPoint(aJ);at.followTitle.show()}at._bind.isZooming=false;at._fDiv.parentNode.removeChild(at._fDiv);at._fDiv=null}var aw=new ak("ondrawend");aw.bounds=aC;at.dispatchEvent(aw);var aF=new J(new D(aC.minX,aC.minY),new D(aC.maxX,aC.maxY));aF.setStrokeWeight(2);aF.setStrokeColor("#111");aF.setStrokeOpacity(0.3);aF.setFillColor("");au.addOverlay(aF);new A({duration:240,fps:20,delay:1000,render:function(aL){var aK=0.3*(1-aL);aF.setStrokeOpacity(aK)},finish:function(){aF.remove();aF.dispose();aF=null}});if(at._opts.autoClose){setTimeout(function(){if(at._isOpen==true){at.close()}},70)}al(aD);return U(aD)};j.show(this._map);this.setCursor(this._opts.cursor);if(!this._bind[this.hashCode]){k.on(j.getDom(this._map),"mousedown",ar);this._bind[this.hashCode]=true}return true},close:function(){if(!this._isOpen){return}this._map._toolInUse=false;this._isOpen=false;if(this.followTitle){this.followTitle.hide()}j.hide()},_generateHTML:function(){return["
"].join("")},setStrokeColor:function(e){if(typeof e=="string"){this._opts.strokeColor=e;this._updateStyle()}},setLineStroke:function(e){if(typeof e=="number"&&Math.round(e)>0){this._opts.strokeWeight=Math.round(e);this._updateStyle()}},setLineStyle:function(e){if(e=="solid"||e=="dashed"){this._opts.style=e;this._updateStyle()}},setOpacity:function(e){if(typeof e=="number"&&e>=0&&e<=1){this._opts.opacity=e;this._updateStyle()}},setLineStyle:function(e){if(e=="solid"||e=="dashed"){this._opts.style=e;this._updateStyle()}},setFillColor:function(e){this._opts.fillColor=e;this._updateStyle()},_updateStyle:function(){if(this._fDiv!=null){this._fDiv.style.border=[this._opts.strokeWeight,"px ",this._opts.style," ",this._opts.color].join("");this._fDiv.style.opacity=this._opts.opacity;this._fDiv.style.filter="alpha(opacity="+Math.round(opacity*100)+")"}},setCursor:function(e){this._opts.cursor=e;j.setCursor(this._opts.cursor)},getCursor:function(){return this._opts.cursor},toString:function(){return"DragAndZoomTool"}});function i(){}function ab(ar,e,au){var at=document.createElement("div");if(ar>0){aa(at).position=(ar==2)?"relative":"absolute"}if(e){ai(at,e)}if(au){b(at,au)}return at}function aa(e){return e.style}function b(e,ar){aa(e).zIndex=ar}function ai(ar,e){aa(ar).left=ae(e[0]);aa(ar).top=ae(e[1])}function ad(at,ar){var e=aa(at);e.opacity=ar;e.MozOpacity=ar;e.KhtmlOpacity=ar;e.filter="alpha(opacity="+(ar*100)+")";e=null}function ae(at){if(typeof at=="number"){return at+"px"}else{if(typeof at=="string"){var ar=/"\\s","g"/;var au=/"^\\d+(px|%)+$","i"/;var e=at.replace(ar,"");if(au.exec(e)){return e}var av=new RegExp("^\\d+$");if(av.exec(e)){return e+"px"}return"0px"}}}function T(e){if(k.Browser.ie>0){e.unselectable="on";e.selectstart=function(){return false}}else{aa(e).MozUserSelect="none"}}function Y(ar,e){aa(ar).width=ae(e[0]);aa(ar).height=ae(e[1])}function W(at){var ar=[at.offsetWidth,at.offsetHeight];if(at==document.body&&!document.all){ar[1]=at.clientHeight}if(!ar[0]){ar[0]=at.clientWidth}if(!ar[0]){ar[0]=parseInt(aa(at).width)}if(!ar[1]){ar[1]=at.clientHeight}if(!ar[1]){ar[1]=parseInt(aa(at).height)}if(!ar[0]||!ar[1]){var e=at.parentElement;while(e){if(!ar[0]&&e.offsetWidth){ar[0]=e.offsetWidth}if(!ar[1]&&e.offsetHeight){ar[1]=e.offsetHeight}if(ar[0]&&ar[1]){break}e=e.parentElement}}return ar}function G(e){return e.parentNode&&e.parentNode.nodeType!=11}function V(ar,e){ar.insertAdjacentHTML("beforeEnd",e);return ar.lastChild}function I(e,ar){if(e.lngar.maxX||e.latar.maxY){return false}else{return true}}function al(ar){var ar=window.event||ar;ar.stopPropagation?ar.stopPropagation():ar.cancelBubble=true}function U(ar){var ar=window.event||ar;ar.preventDefault?ar.preventDefault():ar.returnValue=false;return false}function P(aw,au){aw=aw||window.event;var ar=aw.clientX||aw.pageX;var ay=aw.clientY||aw.pageY;var at=aw.target||aw.srcElement;if(aw&&au&&ar&&ay&&at&&k.I(at.hashCode)){var av=k.I(at.hashCode).map;var ax=k.Dom.getOffset(av.container);au.pixel=new s(ar-ax.left,ay-ax.top);au.point=av.pixelToPoint(au.pixel);return au}else{return au}}function o(au){au=au||window.event;if(au&&au.clientX&&au.clientY&&au.target&&k.I(au.target.hashCode)){var at=k.I(au.target.hashCode).map;var av=k.Dom.getOffset(at.container);var ar=au.clientX||au.x;var aw=au.clientY||au.y;au.pixel=new s(ar-av.left,aw-av.top);au.point=at.pixelToPoint(au.pixel);return au}else{return au}}function X(at,e){if(document.createEvent){var ar=document.createEvent("MouseEvents");ar.initEvent(e,true,false);at.dispatchEvent(ar)}else{if(document.createEventObject){at.fireEvent("on"+e)}}}function B(){var e=document.documentElement,ar=document.body;if(e&&(e.scrollTop||e.scrollLeft)){return[e.scrollTop,e.scrollLeft]}else{if(ar){return[ar.scrollTop,ar.scrollLeft]}else{return[0,0]}}}function O(au){var ar=au.attributes,at,e,av;if(ar){e=ar.length;for(at=0;at