window.BMapGL=window.BMapGL||{};(function(aK,c3){var y=y||{version:"20150702",emptyFn:function(){}};(function(){y._log=[];var i=0;var fp={};y.BaseClass=function(fq){fp[(this.hashCode=(fq||y.BaseClass.guid()))]=this};y.BaseClass.guid=function(){return"mz_"+(i++).toString(36)};y.BaseClass.create=function(){var fq=new y.BaseClass();fq.decontrol();return fq};var e=y.instance=y.I=function(fq){return fp[fq]};y.BaseClass.prototype.dispose=function(){if(this.hashCode){delete fp[this.hashCode]}for(var fq in this){if(typeof this[fq]!="function"){delete this[fq]}}};y.BaseClass.prototype.getHashCode=function(){if(!this.hashCode){fp[(this.hashCode=y.BaseClass.guid())]=this}return this.hashCode};y.BaseClass.prototype.decontrol=function(){delete fp[this.hashCode]};y.BaseClass.prototype.toString=function(){return"[object "+(this._className||"Object")+"]"};y.BaseClass.prototype._wlog=function(fr,fs){var fq=y._log;if(fq.length>100){fq.reverse().length=50;fq.reverse()}fq[fq.length]="["+fr+"]["+(this._className||"Object")+" "+this.hashCode+"] "+fs}})();Function.prototype.inherits=function(fq,fp){var e,fr,ft=this.prototype,fs=function(){};fs.prototype=fq.prototype;fr=this.prototype=new fs();if(typeof(fp)=="string"){fr._className=fp}for(e in ft){fr[e]=ft[e]}this.prototype.constructor=ft.constructor;ft=fs=null;return fr};y.BaseEvent=function(e,i){this.type=e;this.returnValue=true;this.target=i||null;this.currentTarget=this.srcElement=null;this.cancelBubble=false;this.domEvent=null};y.BaseClass.prototype.on=y.BaseClass.prototype.addEventListener=function(fp,i){if(typeof i!=="function"){return this._wlog("error","addEventListener:"+i+" is not a function")}if(!this._listeners){this._listeners={}}var e=this._listeners;if(fp.indexOf("on")!==0){fp="on"+fp}if(typeof e[fp]!=="object"){e[fp]={}}var fq=i.hashCode||y.BaseClass.guid();i.hashCode=fq;if(e[fp][fq]){this._wlog("warning","repeat key:"+fq)}e[fp][fq]=i};y.BaseClass.prototype.off=y.BaseClass.prototype.removeEventListener=function(fp,i){if(typeof i=="function"){i=i.hashCode}else{if(typeof i!="string"){return}}if(!this._listeners){this._listeners={}}if(fp.indexOf("on")!=0){fp="on"+fp}var e=this._listeners;if(!e[fp]){return}if(e[fp][i]){delete e[fp][i]}};y.BaseClass.prototype.fire=y.BaseClass.prototype.dispatchEvent=function(fq){if(!this._listeners){this._listeners={}}var fp,e=this._listeners,fr=fq.type;fq.target=fq.srcElement=fq.target||fq.srcElement||this;fq.currentTarget=this;if(typeof this[fr]=="function"){this[fr](fq)}if(typeof e[fr]=="object"){for(fp in e[fr]){if(typeof e[fr][fp]=="function"){e[fr][fp].call(this,fq)}}}return fq.returnValue};y.BaseEvent.prototype.inherit=function(fp){var i=this;this.domEvent=fp=window.event||fp;i.clientX=fp.clientX||fp.pageX;i.clientY=fp.clientY||fp.pageY;i.offsetX=fp.offsetX||fp.layerX;i.offsetY=fp.offsetY||fp.layerY;i.screenX=fp.screenX;i.screenY=fp.screenY;i.ctrlKey=fp.ctrlKey||fp.metaKey;i.shiftKey=fp.shiftKey;i.altKey=fp.altKey;return i};y.Browser=(function(){var fp=navigator.userAgent;var fr=0;var e=0;var fs=0;var i=0;var fw=0;var fu=0;var fv=0;var ft=0;var fq=0;var fx=0;if(typeof window.opera==="object"&&/Opera(\s|\/)(\d+(\.\d+)?)/.test(fp)){fs=parseFloat(RegExp.$2)}else{if(/OPR(\/(\d+)(\..?)?)/.test(fp)){fs=parseInt(RegExp.$2,10)}else{if(/Edge\/((\d+)\.\d+)/.test(fp)){fr=parseInt(RegExp.$2,10)}else{if(/MSIE (\d+(\.\d+)?)/.test(fp)){e=parseFloat(RegExp.$1)}else{if(fp.indexOf("Trident")>-1&&/rv:(\d+(\.\d+)?)/.test(fp)){e=parseInt(RegExp.$1,10)}else{if(/Firefox(\s|\/)(\d+(\.\d+)?)/.test(fp)){fw=parseFloat(RegExp.$2)}else{if(navigator.vendor==="Netscape"&&/Netscape(\s|\/)(\d+(\.\d+)?)/.test(fp)){fv=parseFloat(RegExp.$2)}else{if(fp.indexOf("Safari")>-1&&/Version\/(\d+(\.\d+)?)/.test(fp)){i=parseFloat(RegExp.$1)}}}}}}}}if(fp.indexOf("Trident")>-1&&/Trident\/(\d+(\.\d+)?)/.test(fp)){ft=parseInt(RegExp.$1,10)}else{if(!e&&!fr&&fp.indexOf("Gecko")>-1&&fp.indexOf("KHTML")===-1&&/rv\:(\d+(\.\d+)?)/.test(fp)){fq=parseFloat(RegExp.$1)}else{if(!fr&&/chrome\/(\d+(\.\d+)?)/i.test(fp)){fu=parseFloat(RegExp.$1)}else{if(!fr&&/AppleWebKit\/(\d+(\.\d+)?)/.test(fp)){fx=parseInt(RegExp.$1,10)}}}}var fy={edge:fr,ie:e,firefox:fw,netscape:fv,opera:fs,safari:i,chrome:fu,gecko:fq,trident:ft,webkit:fx};return fy})();window.FeBrowser=y.Browser;y.Dom={};y.Dom.createDom=function(i,e){if(y.isIE&&e&&e.name){i="<"+i+' name="'+y.String.escapeHTML(e.name)+'">'}var fp=document.createElement(i);if(e){y.Dom.setProperties(fp,e)}return fp};y.Dom.getOffset=function(fq){var ft=y.Dom.getOwnerDocument(fq);var fs=y.isGecko>0&&ft.getBoxObjectFor&&y.Dom.getStyle(fq,"position")=="absolute"&&(fq.style.top===""||fq.style.left==="");var fu={left:0,top:0};var i=(y.isIE&&!y.isStrict)?ft.body:ft.documentElement;if(fq==i){return fu}var fp=null;var fr;if(fq.getBoundingClientRect){fr=fq.getBoundingClientRect();fu.left=fr.left+Math.max(ft.documentElement.scrollLeft,ft.body.scrollLeft);fu.top=fr.top+Math.max(ft.documentElement.scrollTop,ft.body.scrollTop);fu.left-=ft.documentElement.clientLeft;fu.top-=ft.documentElement.clientTop;if(y.isIE&&!y.isStrict){fu.left-=2;fu.top-=2}}else{if(ft.getBoxObjectFor&&!fs){fr=ft.getBoxObjectFor(fq);var e=ft.getBoxObjectFor(i);fu.left=fr.screenX-e.screenX;fu.top=fr.screenY-e.screenY}else{fp=fq;do{fu.left+=fp.offsetLeft;fu.top+=fp.offsetTop;if(y.isWebkit>0&&y.Dom.getStyle(fp,"position")=="fixed"){fu.left+=ft.body.scrollLeft;fu.top+=ft.body.scrollTop;break}fp=fp.offsetParent}while(fp&&fp!=fq);if(y.isOpera>0||(y.isWebkit>0&&y.Dom.getStyle(fq,"position")=="absolute")){fu.top-=ft.body.offsetTop}fp=fq.offsetParent;while(fp&&fp!=ft.body){fu.left-=fp.scrollLeft;if(!y.isOpera||fp.tagName!="TR"){fu.top-=fp.scrollTop}fp=fp.offsetParent}}}return fu};y.Dom.getOwnerDocument=function(e){return e.nodeType==9?e:e.ownerDocument||e.document};y.Dom.setProperties=function(i,e){y.each(e,function(fq,fp){y.Dom._setProperty(i,fp,fq)})};y.Dom._setProperty=function(i,e,fp){if(e=="style"){i.style.cssText=fp}else{if(e=="class"){i.className=fp}else{if(e=="for"){i.htmlFor=fp}else{if(e in y.Dom._DIRECT_ATTRIBUTE_MAP){i.setAttribute(y.Dom._DIRECT_ATTRIBUTE_MAP[e],fp)}else{i[e]=fp}}}}};y.Dom._DIRECT_ATTRIBUTE_MAP={cellpadding:"cellPadding",cellspacing:"cellSpacing",colspan:"colSpan",rowspan:"rowSpan",valign:"vAlign",height:"height",width:"width",usemap:"useMap",frameborder:"frameBorder"};y.G=function(){for(var fp=[],fq=arguments.length-1;fq>-1;fq--){var fr=arguments[fq];fp[fq]=null;if(typeof fr=="object"&&fr&&fr.dom){fp[fq]=fr.dom}else{if((typeof fr=="object"&&fr&&fr.tagName)||fr==window||fr==document){fp[fq]=fr}else{if(typeof fr=="string"&&(fr=document.getElementById(fr))){fp[fq]=fr}}}}return fp.length<2?fp[0]:fp};y.ac=function(e,i){if(!(e=this.G(e))){return}i=this.trim(i);if(!new RegExp("(^| )"+i.replace(/(\W)/g,"\\$1")+"( |$)").test(e.className)){e.className=e.className.split(/\s+/).concat(i).join(" ")}};y.addClassName=y.ac;y.each=function(fs,e){if(typeof e!="function"){return fs}if(fs){if(fs.length===undefined){for(var fp in fs){e.call(fs[fp],fs[fp],fp)}}else{for(var fq=0,fr=fs.length;fq0&&!window.opera){/MSIE (\d+(\.\d+)?)/.test(navigator.userAgent);y.isIE=parseFloat(RegExp.$1)}})();y.rc=function(e,i){if(!(e=this.G(e))){return}i=this.trim(i);var fp=e.className.replace(new RegExp("(^| +)"+i.replace(/(\W)/g,"\\$1")+"( +|$)","g"),"$2");if(e.className!=fp){e.className=fp}};y.removeClassName=y.rc;y.show=function(){this.each(arguments,function(e){if(e=y.G(e)){e.style.display=""}})};y.trim=function(e){return e.replace(/(^[\s\t\xa0\u3000]+)|([\u3000\xa0\s\t]+$)/g,"")};if(typeof HTMLElement!="undefined"&&HTMLElement.prototype.__lookupGetter__&&!HTMLElement.prototype.__lookupGetter__("children")&&!window.opera){try{HTMLElement.prototype.__defineGetter__("children",function(){for(var fp=[],fq=0,fs,fr=0,e=this.childNodes.length;fr-1};y.isEmptyObject=function(fp){if(Object.prototype.toString.call(fp)==="[object Object]"){for(var e in fp){return false}return true}else{return false}};var ad=false;var g=false;var L=window.BMAPGL_URL?window.BMAPGL_URL:"http://999.999.999.999";var dk={isOffline:false,isGLApi:true,mapStyleNameIdPair:{"default":0,"grayed-out":1},mapHost:"https://map.baidu.com",apiHost:"https://api.map.baidu.com",staticHost:"//webmap0.bdimg.com",imgPath:"//webmap0.bdimg.com/image/api/",tileDomain:["https://maponline0.bdimg.com","https://maponline1.bdimg.com","https://maponline2.bdimg.com","https://maponline3.bdimg.com"],rasterTilePath:"/tile/",vectorTilePath:"/pvd/",originTilePath:["https://pcor.baidu.com"],getIconSetPath:function(e){var i="map_icons2x/";if(typeof e==="string"&&this.mapStyleNameIdPair[e]>0){i="map_icons2x_"+(this.mapStyleNameIdPair[e]-1)+"/"}return"https://maponline0.bdimg.com/sty/"+i},getImageFullUrl:function(e,i){return this.getIconSetPath(e)+i+"?udt="+dN().udt},getMapStyleFiles:function(fp){var fr=true;if(typeof fp==="string"&&fp!=="default"){fr=false}var fs=fr?"":"_"+(this.mapStyleNameIdPair[fp]-1);var i=dN();var fq="udt="+i.udt+"&v="+i.ver;var e="https://maponline0.bdimg.com/sty/";return[e+"icons_2x"+fs+".js?"+fq,e+"fs"+fs+".js?"+fq,e+"indoor_fs.js?"+fq]}};var ds=dk;aK.MapConfig=ds;aK=aK||{};var e2=aK;aK.version="3.0";aK._register=[];aK.register=function(e){this._register[this._register.length]=e};aK.guid=1;aK.getGUID=function(e){return(e||"")+aK.guid++};dk.imgResources={blankGIF:dk.staticHost+"/res/litemapapi/v1d1/images/blank.gif?20170501",markerPng:dk.staticHost+"/res/litemapapi/v1d1/images/marker.png?20170501",locPng:dk.staticHost+"/res/litemapapi/v1d1/images/loc.png?20180918",locNewPng:dk.staticHost+"/res/litemapapi/v1d1/images/loc_new.png?20190314",zoomPng:dk.staticHost+"/res/litemapapi/v1d1/images/zoombtn.png?20180918",mapLogoPng:dk.staticHost+"/res/litemapapi/v1d1/images/logo-2x.png?20190226",mapLogoNewPng:dk.staticHost+"/res/litemapapi/v1d1/images/logo-new-2x.png?20190226"};var ax="ruler.cur";if(y.Browser.ie||y.Browser.edge){y.extend(dk,{distCursor:"url("+dk.imgPath+ax+"),crosshair",defaultCursor:"url("+dk.imgPath+"openhand.cur),default",draggingCursor:"url("+dk.imgPath+"closedhand.cur),move"})}else{if(y.Browser.firefox){y.extend(dk,{distCursor:"url("+dk.imgPath+ax+"),crosshair",defaultCursor:"-moz-grab",draggingCursor:"-moz-grabbing"})}else{if(y.Browser.chrome||y.Browser.safari){y.extend(dk,{distCursor:"url("+dk.imgPath+ax+") 2 6,crosshair",defaultCursor:"url("+dk.imgPath+"openhand.cur) 8 8,default",draggingCursor:"url("+dk.imgPath+"closedhand.cur) 8 8,move"});if(y.Platform.macintosh){dk.defaultCursor="-webkit-grab";dk.draggingCursor="-webkit-grabbing"}}else{y.extend(dk,{distCursor:"url("+dk.imgPath+ax+"),crosshair",defaultCursor:"url("+dk.imgPath+"openhand.cur),default",draggingCursor:"url("+dk.imgPath+"closedhand.cur),move"})}}}dk.tvc={ditu:{normal:{version:"088",updateDate:"20200509"},satellite:{version:"009",updateDate:"20200509"},normalTraffic:{version:"081",updateDate:"20200509"},satelliteTraffic:{version:"083",updateDate:"20200509"},mapJS:{version:"104",updateDate:"20200509"},satelliteStreet:{version:"083",updateDate:"20200509"},panoClick:{version:"1033",updateDate:"20180108"},panoUdt:{version:"20180108",updateDate:"20180108"},panoSwfAPI:{version:"20150123",updateDate:"20150123"},panoSwfPlace:{version:"20141112",updateDate:"20141112"},earthVector:{version:"001",updateDate:"20200509"}}};dk.msv={mapstyle:{updateDate:"20200428",version:"001"}};function dV(i,e){this._size=i;this._cache=[];this._totalGetTimes=0;this._totalHitTimes=0;this._options={clearCallback:null,removeOldCallback:null};e=e||{};for(var fp in e){if(e.hasOwnProperty(fp)){this._options[fp]=e[fp]}}}dV.prototype.setData=function(fp,fq){var e=this._cache;var i=this._size;if(i===0){return}if(e.length>i){this._removeOld()}if(!e[fp]){e.push(fq)}e[fp]=fq;fq._key_=fp};dV.prototype.getHitRate=function(){return Math.round(this._totalHitTimes/this._totalGetTimes*1000)/1000};dV.prototype.getData=function(i){var e=this._cache[i];if(e){this._totalHitTimes++}this._totalGetTimes++;return e};dV.prototype.removeData=function(fr){if(this._options.clearCallback){this._options.clearCallback(this._cache[fr])}var fp=this._cache;var fs=fp[fr];for(var fq=0,e=fp.length;fq=0;fr--){var fq=this._cache[fr]._key_;if(!fs[fq]){fp.splice(fr,1);if(this._options.clearCallback){this._options.clearCallback(fp[fq])}delete fp[fq]}}};dV.prototype.getDataCount=function(){return this._cache.length};function X(){}y.extend(X.prototype,{centerAndZoom:function(fv,fp,fw){var ft=this;if(!fv&&!fp){return}fv=fv||this.centerPoint;fp=fp||this.zoomLevel;fp=this._getProperZoom(fp).zoom;if(this.mapType===ez){if(!this._earth){this.mapType=C;this.temp.originMapType=ez;function fu(){ft._earth=new aK.Earth(ft,{showRealSunlight:ft.config.showRealSunlight,showMilkyway:ft.config.showMilkyway,earthBackground:ft.config.earthBackground});ft._proxyEarthEvents();ft._changeEarthMapType(ez);y.extend(ft,aK.EarthView.prototype);if(!ft._navigationCtrl&&ft.config.showControls){ft._navigationCtrl=new aK.NavigationControl3D(ft)}delete ft.temp.originMapType}cL.load("earth",function(){if(aK["FeatureStyle"+ft.config.style]){fu()}else{ft.loadMapStyleFiles(function(){fu()})}})}}this.lastLevel=this.zoomLevel||fp;this.zoomLevel=fp;var fr=new aD("onload");fr.point=fv;fr.zoom=fp;this.centerPoint=this.restrictCenter(new e7(fv.lng,fv.lat));if(this.centerPoint.zoom){this.zoomLevel=this.centerPoint.zoom}this.defaultZoomLevel=this.defaultZoomLevel||this.zoomLevel;this.defaultCenter=this.defaultCenter||this.centerPoint;if(!this.loaded&&!(this.temp.originMapType===ez)){var i=this.config.defaultMaxBounds;var fs=new bW(i,"baidu",this.mapType);var fq=new bJ({mapType:this.mapType,copyright:fs,customLayer:false,baseLayer:true,tileTypeName:"web"});fq._isInnerLayer=true;this.addTileLayer(fq);if(this.mapType===bU&&this._isHybridShow===true){this._addHybirdMap()}}this.dispatchEvent(fr);this.loaded=true;fw=fw||{};fw.callback&&fw.callback()},_setPlatformPosition:function(fw,fv,fz){fz=fz||{};if(fw===0&&fv===0&&!fz.point){return}if(isNaN(fz.initMapOffsetX)){fz.initMapOffsetX=this.offsetX}if(isNaN(fz.initMapOffsetY)){fz.initMapOffsetY=this.offsetY}var fx=fw+fz.initMapOffsetX;var fu=fv+fz.initMapOffsetY;if(fz.point){var i=this.restrictCenter(fz.point);if(!i.equals(this.centerPoint)){this.centerPoint=i.clone();this.fire(new aD("oncenter_changed"))}}else{var fq=this.offsetX-fx;var e=this.offsetY-fu;var fp=this.getZoomUnits();var ft=this.centerPoint.lng;var fs=this.centerPoint.lat;var fr=new e7(ft,fs);this.centerPoint=this.restrictCenter(new e7(fr.lng+fq*fp,fr.lat-e*fp),fp);this.fire(new aD("oncenter_changed"));if(this.zoomLevel<10){fx=this.offsetX-(this.centerPoint.lng-fr.lng)/fp;fu=this.offsetY+(this.centerPoint.lat-fr.lat)/fp}}this.offsetX=fx;this.offsetY=fu;var fy=this.platform.style;fy.left=fx+"px";fy.top=fu+"px";this.maskLayer.style.left=-fx+"px";this.maskLayer.style.top=-fu+"px";if(fz.dispatchEvent!==false){this.dispatchEvent(new aD("onmoving"))}},zoomTo:function(e,ft,fx){fx=fx||{};fx.zoomCenter=ft;if(fx.noAnimation!==true){this.deepZoomTo(e,fx);return}if(typeof e!=="number"){return}var fr=bg[this.mapType];if(!fr){return}var fp=e;e=this._getProperZoom(e).zoom;if(e===this.zoomLevel){var fu=new aD("onzoomexceeded");fu.targetZoom=fp;this.dispatchEvent(fu);fx.callback&&fx.callback();return}this.lastLevel=this.zoomLevel;if(this.config.fixCenterWhenPinch){ft=this.centerPoint.clone()}if(ft){this.temp._cPoint=ft;this.temp._cPixel=this.pointToPixel(ft)}else{if(this.getInfoWindow()){var fw=this.getInfoWindow().getPoint();this.temp._cPixel=this.pointToPixel(fw);this.temp._cPoint=fw}}if(this.config.zoomCenter){ft=this.config.zoomCenter;this.temp._cPoint=ft;this.temp._cPixel=this.pointToPixel(ft)}if(ft||this.temp.infoWin&&this.temp.infoWin.isOpen()){var i=this.temp._cPoint;var fv=this.temp._cPixel;var fq=this.getZoomUnits(e);var fs=new e7(i.lng+fq*(this.width/2-fv.x),i.lat-fq*(this.height/2-fv.y));this.centerPoint=this.restrictCenter(fs,fq,e);if(this.centerPoint.zoom){e=this.centerPoint.zoom}}if(fx.fireEvent!==false){this.dispatchEvent(new aD("onzoomstart"))}if(e!==this.zoomLevel){this.zoomLevel=e;this.dispatchEvent(new aD("onzooming"));this.dispatchEvent(new aD("onzoomstartcode"))}if(fx.fireEvent!==false){this.dispatchEvent(new aD("onzoomend"))}if(fx.callback){fx.callback()}},deepZoomMedia:function(e){var i=this;if(!i.temp.isStdCtrlBusy){i.temp.isStdCtrlBusy=true;i.deepZoomTo(i.zoomLevel+e);setTimeout(function(){i.temp.isStdCtrlBusy=false},400)}},deepZoomTo:function(fu,fq){fq=fq||{};var fs=fu-this.zoomLevel;var fr=this._getProperZoom(fu);if(fr.exceeded){var e=new aD("onzoomexceeded");e.targetZoom=fu;this.dispatchEvent(e);return}var i;if(fq.zoomCenter){i=this.pointToPixel(fq.zoomCenter)}else{if(this.getInfoWindow()){i=this.pointToPixel(this.getInfoWindow().getPoint(),{zoom:this.lastLevel})}else{var i=new cS(this.width/2,this.height/2)}}this.lastLevel=this.zoomLevel;var ft=this.deepZoom||new aX(this);var fp=fs>0?1:-1;ft.zoomMap(i,fs,fp,null,fq)},flyTo:function(fv,e){if(e===this.zoomLevel){this.panTo(fv);return}var fs=this._getProperZoom(e);if(fs.exceeded){var fw=new aD("onzoomexceeded");fw.targetZoom=e;this.dispatchEvent(fw);return}var fu=e-this.zoomLevel;var fp=new cS(this.width/2,this.height/2);var i=this.pointToPixel(fv);var ft=new cK(i.x-fp.x,i.y-fp.y);this.lastLevel=this.zoomLevel;if(Math.abs(fu)>=4||Math.abs(ft.width)>this.width||Math.abs(ft.height)>this.height){this.centerAndZoom(fv,e);return}var fr=this.deepZoom||new aX(this);var fq=fu>0?1:-1;fr.zoomMap(i,fu,fq,ft)},panTo:function(i,fp){fp=fp||{};if(!i||i.equals(this.centerPoint)){fp.callback&&fp.callback();return}var fq=this.pointToPixel(i);var e=Math.round(this.width/2);var fr=Math.round(this.height/2);if(Math.abs(e-fq.x)>this.width||Math.abs(fr-fq.y)>this.height||fp.noAnimation===true){this._panTo(e-fq.x,fr-fq.y,i);fp.callback&&fp.callback()}else{this._panBy(e-fq.x,fr-fq.y,fp)}},_panTo:function(i,e,fq){var fp=this.temp;if(fp.operating===true){return}if(fp.dragAni){fp.dragAni.stop();fp.dragAni=null;this.dispatchEvent(new aD("onmoveend"))}this.dispatchEvent(new aD("onmovestart"));this._setPlatformPosition(i,e,{point:fq});this.dispatchEvent(new aD("onmoveend"))},panBy:function(i,e,fp){fp=fp||{};i=Math.round(i)||0;e=Math.round(e)||0;if(Math.abs(i)<=this.width&&Math.abs(e)<=this.height&&fp.noAnimation!==true){this._panBy(i,e,fp)}else{this._panTo(i,e);fp.callback&&fp.callback()}},_panBy:function(i,e,fr){if(this.temp.operating===true){return}fr=fr||{};this.dispatchEvent(new aD("onmovestart"));var fq=this;var fp=fq.temp;fp.pl=fq.offsetX;fp.pt=fq.offsetY;if(fp.tlPan){fp.tlPan.cancel()}if(fp.dragAni){fp.dragAni.stop();fp.dragAni=null;this.dispatchEvent(new aD("onmoveend"))}fp.tlPan=new m({fps:fr.fps||fq.config.fps,duration:fr.duration||fq.config.actionDuration,transition:fr.transition||bs.easeInOutQuad,render:function(fs){this.terminative=fq.temp.operating;if(fq.temp.operating){return}fq._setPlatformPosition(Math.ceil(i*fs),Math.ceil(e*fs),{initMapOffsetX:fp.pl,initMapOffsetY:fp.pt})},finish:function(fs){fq.dispatchEvent(new aD("onmoveend"));fq.temp.tlPan=false;if(fq.temp.stopArrow===true){fq.temp.stopArrow=false;if(fq.temp.arrow!==0){fq._arrow()}}fr.callback&&fr.callback()}})},getCenter:function(){return this.centerPoint},getZoom:function(){return this.zoomLevel},setTilt:function(){},getTilt:function(){return this._tilt},setHeading:function(){},getHeading:function(){return this._heading},restrictCenter:function(fu,fr,fv){this.isRestrict=false;fr=fr||this.getZoomUnits();fv=fv||this.zoomLevel;var fp=this.pixelToPoint(new cS(0,0),{center:fu,zoom:fv});var fs=this.pixelToPoint(new cS(0,this.height),{center:fu,zoom:fv});if(this.zoomLevel<5){if(fp.lat>bY.MAX_LAT&&fs.latbY.MAX_LAT){this.isRestrict=true;fu.lat=bY.MAX_LAT-this.height/2*fr}else{if(fs.lat=1.5?2:1,enableEarth:aC.ifEnableEarth(),defaultMaxBounds:new cy(new e7(-21364736,-10616832),new e7(23855104,15859712)),showControls:false,showRealSunlight:true,showMilkyway:true,earthBackground:null,showStreetLayer:true,minZoom:null,maxZoom:null,style:"default",enableIconClick:false,autoSafeArea:false,ak:null,webgl2:false,restrictCenter:dk.isGLApi?false:true,smaa:true,loadVectorTileData:true,enableCapture:false};for(var fp in i){if(i.hasOwnProperty(fp)){this.config[fp]=i[fp];if(fp==="fixCenterWhenResize"){this.config.enableResizeOnCenter=i[fp]}}}this._displayMapper={showText:"poi",showIndoor:"indoor",showBuilding3d:"building",showOverlay:"overlay"};this._setTextRenderType();this._displayOptions={poi:true,poiText:true,poiIcon:true,overlay:true,layer:true,building:true,indoor:true,street:true,skyColors:["rgba(226, 237, 248, 0)","rgba(186, 211, 252, 1)"],isFlat:false};if(i.displayOptions){for(var e in i.displayOptions){if(i.displayOptions.hasOwnProperty(e)){if(this._displayMapper[e]){this._displayOptions[this._displayMapper[e]]=i.displayOptions[e]}else{this._displayOptions[e]=i.displayOptions[e]}}}}if(this.config.restrictCenter===false){this._enableTiltZoom=0;this._enableHeadingZoom=0}},getMinZoom:function(){var fp;if(bg[this.mapType][this._renderType]){fp=bg[this.mapType][this._renderType].minZoom}else{fp=bg[this.mapType].minZoom}if(this.config.minZoom!==null&&this.config.minZoom>=fp){fp=this.config.minZoom}if(this.mapType==="B_EARTH_MAP"){return fp}var i=this.getSize();var e=this.worldSize(fp);while(ee){fq=true;fp=e}if(this._renderType!=="webgl"){fp=Math.round(fp)}return{zoom:fp,exceeded:fq}},getContainer:function(){return this.container},getZoomUnits:function(fp){if(this.mapType===ez){return Math.pow(2,18-this._earth.getImageZoom())}var e=bg[this.mapType];if(typeof e!=="object"){return null}var i=fp||this.zoomLevel;if(dk.isWgs84){return b7.prototype.getZoomUnits(i)}return Math.pow(2,(e.zoomLevelBase-i))},pointToPixel:function(fz,fB){if(!fz){return}fB=fB||{};if(this.mapType===ez){var fq;if(!fz._llPt){fq=cU.convertMC2LL(fz);fz._llPt=fq}fq=fz._llPt;var fv=null;var fp=null;if(typeof fB.zoom==="number"){var fy=this._earth;var fA=fy._getEarthZoomByImgZoom(fB.zoom);if(fA<=3){fv=fy._generateTmpPMatrix(fA)}fp=fy._generateTmpMVMatrix(fy.getCenter(),fA)}var fr=this._earth.fromLatLngToPixel(fq,{useRound:false,isCalcOnBack:true,matrixInfo:{modelViewMatrix:fp,projectionMatrix:fv}});return fr}if((this._heading%360===0&&this._tilt===0)||!this._webglMapCamera){var fx=this.getZoomUnits(fB.zoom);var ft=fB.center||this.centerPoint;var i=this.width/2;var fs=this.height/2;var fw=(fz.lng-ft.lng)/fx+i;var fu=(ft.lat-fz.lat)/fx+fs;if(fB.useRound!==false){fw=Math.round(fw);fu=Math.round(fu)}return new cS(fw,fu)}var e=this._webglMapCamera.fromMCToScreenPixel(fz.lng,fz.lat,fB);if(fB.useRound===false){return e}e.x=Math.round(e.x);e.y=Math.round(e.y);return e},pixelToPoint:function(e,fx){if(!e){return}fx=fx||{};if(this.mapType===ez){if(typeof fx.zoom==="number"){var fv=this._earth;var fs=null;var fp=null;var fw=fv._getEarthZoomByImgZoom(fx.zoom);if(fw<=3){fs=fv._generateTmpPMatrix(fw)}fp=fv._generateTmpMVMatrix(fv.getCenter(),fw)}var i=this._earth.fromPixelToLatLng(e,{matrixInfo:{modelViewMatrix:fp,projectionMatrix:fs}});if(i===null){return null}return cU.convertLL2MC(i)}if((this._heading%360!==0||this._tilt>0)&&this._webglMapCamera){return this._webglMapCamera.fromScreenPixelToMC(e.x,e.y,fx)}var ft=fx.center||this.centerPoint;var fu=this.getZoomUnits(fx.zoom);var fr=ft.lng+fu*(e.x-this.width/2);var fq=ft.lat-fu*(e.y-this.height/2);return new e7(fr,fq)},pointToOverlayPixel:function(e,fq){fq=fq||{};var fp=this.pointToPixel(e,{zoom:fq.zoom,center:fq.center,forLabel:true,frustumTest:true,useRound:fq.useRound});if(!fp){return}if(fq.fixPosition&&this.mapType!=="B_EARTH_MAP"){var fr=this.getSize();var i=this.worldSize(fq.zoom);if(fp.x>fr.width){while(fp.x>fr.width){fp.x-=i}}else{if(fp.x<0){while(fp.x<0){fp.x+=i}}}}if(this._renderType==="webgl"){return fp}fp.x-=this.offsetX;fp.y-=this.offsetY;return fp},overlayPixelToPoint:function(i,e){if(!i){return}var fp=i.clone();if(this._renderType!=="webgl"){fp.x+=this.offsetX;fp.y+=this.offsetY}return this.pixelToPoint(fp,e)},lnglatToMercator:function(e,fq){var i=new e7(e,fq);var fp=cU.convertLL2MC(i);return[fp.lng,fp.lat]},mercatorToLnglat:function(i,e){if(isNaN(i)||isNaN(e)){return[]}i=parseFloat(i);e=parseFloat(e);var fq=new e7(i,e);var fp=cU.convertMC2LL(fq);return[fp.lng,fp.lat]},getBounds:function(){var fD=arguments[0];if(this.mapType===ez&&this._earth){var fx=this._earth.getCustomBounds();if(!fx){return this.config.defaultMaxBounds}var fw=fx.getSouthWest();var e=fx.getNorthEast();if(fw.lng>e.lng){e.lng=180}var fU=cU.convertLL2MC(fw);var fK=cU.convertLL2MC(e);var fA=this.config.defaultMaxBounds;var fJ=Math.max(fU.lng,fA.sw.lng);var fI=Math.max(fU.lat,fA.sw.lat);var fC=Math.min(fK.lng,fA.ne.lng);var fB=Math.min(fK.lat,fA.ne.lat);var fF=new cy(new e7(fJ,fI),new e7(fC,fB));fF.pointBottomLeft=new e7(fJ,fI);fF.pointBottomRight=new e7(fC,fI);fF.pointTopLeft=new e7(fJ,fB);fF.pointTopRight=new e7(fC,fB);fF.setMinMax();fF.makeNormalizedPoint(this._earth.getHeading());return fF}fD=fD||{};var fr=fD.margins||[0,0,0,0];var fP=this.pixelToPoint({x:fr[3],y:this.height-fr[2]},fD);var fT=this.pixelToPoint({x:this.width-fr[1],y:fr[0]},fD);var fH=typeof fD.heading==="number"?fD.heading:(this._heading%360);var fp=typeof fD.tilt==="number"?fD.tilt:this._tilt;var fz=this._webglMapCamera;if((fH===0&&fp===0)||!fz){this._bounds.setSouthWest(fP);this._bounds.setNorthEast(fT);this._bounds.pointBottomLeft=fP;this._bounds.pointBottomRight=new e7(fT.lng,fP.lat);this._bounds.pointTopRight=fT;this._bounds.pointTopLeft=new e7(fP.lng,fT.lat);this._bounds.setMinMax();this._bounds.makeNormalizedPoint(fH);return this._bounds}var fG=this.pixelToPoint({x:fr[3],y:fr[0]},fD);var fq=fz.getPosition();var fV=Math.sqrt(Math.pow(fG.lng-fq[0],2)+Math.pow(fG.lat-fq[1],2));var fQ=this.getZoomUnits();var fX=fV/fQ;var fN=fz._frustumSideLen;var fv=fz._fovy;if(fX>fN||(90-fp)ft){ft=fM[fR].lng}if(fM[fR].latfy){fy=fM[fR].lat}}this._bounds.setSouthWest(new e7(fS,fY));this._bounds.setNorthEast(new e7(ft,fy));this._bounds.pointTopLeft=fG;this._bounds.pointTopRight=fT;this._bounds.pointBottomRight=fE;this._bounds.pointBottomLeft=fP;this._bounds.makeNormalizedPoint(fH);this._bounds.setMinMax();return this._bounds},isLoaded:function(){return !!this.loaded},_getBestLevel:function(i,fz){var fs=0;if(this._renderType==="webgl"&&!ea()){fs=100}var ft=fz.margins||[10,10,10,10];var fq=fz.zoomFactor||0;var fu=ft[1]+ft[3];var fr=ft[0]+ft[2];var e=this.getMinZoom();var fy=this.getMaxZoom();var fx=i.toSpan();var fw=fx.width/(this.width-fu-fs);var fv=fx.height/(this.height-fr-fs);var fp=18-c5(Math.max(fw,fv));if(fpfy){fp=fy}fp+=fq;if(this._renderType!=="webgl"){fp=Math.floor(fp)}return fp},getViewport:function(fD,fr){if(this.mapType===ez){fD=fD||[];var fs=[];for(var fE=0;fE=0;fE--){fu.extend(fD[fE])}if(fu.isEmpty()){return fA}}var fJ=fu.getCenter();if(fr.center){fJ=fr.center.clone();var fz=fu.getSouthWest();var ft=fu.getNorthEast();var fw=fJ.lng-fz.lng;var fx=ft.lng-fJ.lng;var fy=ft.lat-fJ.lat;var fv=fJ.lat-fz.lat;var fG=new e7(0,0);fG.lng=fw>fx?fJ.lng+fw:fJ.lng-fx;fG.lat=fv>fy?fJ.lat+fv:fJ.lat-fy;fu.extend(fG)}var e=this._getBestLevel(fu,fr);if(fr.margins){var fp=fr.margins;var fI=(fp[1]-fp[3])/2;var fB=(fp[0]-fp[2])/2;var fH=this.getZoomUnits(e);fJ.lng=fJ.lng+fH*fI;fJ.lat=fJ.lat+fH*fB}return{center:fJ,zoom:e}},setViewport:function(fq,fr){if(this.mapType===ez){var fv;if(fq&&fq.center){var fp=cU.convertMC2LL(fq.center);var ft=this._earth._getEarthZoomByImgZoom(fq.zoom,fp);fv={center:fp,zoom:ft}}else{fv=[];for(var fs=0;fsbY.MAX_DRAG_TILT_L2){i.setTilt(bY.MAX_DRAG_TILT_L2,{callback:function(){i._changeEarthMapType(e)}})}else{i._changeEarthMapType(e)}},_changeEarthMapType:function(fp){var fq=this;var ft=fq.tileMgr.tileLayers;if(this._mapTypeChangAni){this._mapTypeChangAni.stop()}var fs;if(this._earth){fs=this._earth.getEarthCanvas()}if(!this._earth){this.maskLayer.style.opacity=1;this.maskLayer.style.zIndex=999;this.maskLayer.style.background="#000"}this._mapTypeChangAni=new m({duration:400,render:function(e){if(!fq._earth){return}fs.style.opacity=e},finish:function(){for(var e=ft.length-1,fu=e;fu>=0;fu--){var fw=ft[fu].tilesDiv;if(fw){fw.style.visibility="hidden"}if(ft[fu]._isInnerLayer&&fq._renderType!=="webgl"){fq.removeTileLayer(ft[fu])}}fq._mapTypeChangAni=null;fq._mapTypeChanging=false;function fv(){var fA=fq.getZoom()-2;var fB=fq.getCenter();var fy=cU.convertMC2LL(fB);fq._earth=new aK.Earth(fq,{center:fy,zoom:fA,showRealSunlight:fq.config.showRealSunlight,showMilkyway:fq.config.showMilkyway,earthBackground:fq.config.earthBackground});fq._proxyEarthEvents();var fx=fq.mapType;fq.mapType=fp;var fz=new aD("onmaptypechange");fz.zoomLevel=this.zoomLevel;fz.mapType=fp;fz.exMapType=fx;fq.dispatchEvent(fz);fq._setMapTypeStatus(fp);y.extend(fq,aK.EarthView.prototype);if(!fq._navigationCtrl&&fq.config.showControls){fq._navigationCtrl=new dj(fq)}}if(!fq._earth){if(aK["FeatureStyle"+fq.config.style]){fv()}else{fq.loadMapStyleFiles(function(){fv()})}}if(parseInt(fq.maskLayer.style.opacity,10)===1){setTimeout(function(){fq.maskLayer.style.zIndex=9;fq.maskLayer.style.opacity=0},1000)}}});if(!this._earth){return}var i=this.mapType;this.mapType=fp;var fr=new aD("onmaptypechange");fr.zoomLevel=this.zoomLevel;fr.mapType=fp;fr.exMapType=i;this.dispatchEvent(fr);fq._setMapTypeStatus(fp);y.extend(fq,aK.EarthView.prototype)},getMapStyleId:function(){if(typeof this.config.style==="string"){return this.config.style}return this.config.mapStyleId||"custom"},_setMapTypeStatus:function(fp){var fu=arguments[1];if(fp===ez){var fs=this._earth.getEarthCanvas();if(fs){fs.style.display=""}var fv={noAnimation:true};this._earth.setCenter(cU.convertMC2LL(this.centerPoint),fv);this._earth.setImageZoom(this.zoomLevel,fv);this._earth.setTilt(this.getTilt(),fv);this._earth.setHeading(this.getHeading(),fv)}else{if(this.preMapType===ez&&this._earth){var ft=this._earth;var fq=ft.getMapZoom();var fr=ft._imageRawZoom||fq;var i=fr-fq;var e=ft.getCenter();if(this._renderType==="webgl"){this._tilt=ft.getTilt();if(this.zoomLevel>7){this._heading=ft.getHeading();fu&&fu(e,fq);return}if(ft.getHeading()!==0){ft.setTilt(this.getTilt());ft.setHeading(this.getHeading(),{callback:function(){fu&&fu(e,fq)}})}else{fu&&fu(e,fq)}return}if(i<0.1&&ft.getTilt()===0&&ft.getHeading()===0){fu&&fu(e,fq);return}ft.setTilt(0);ft.setHeading(0);ft.setZoom(ft.getZoom()-i,{callback:function(){fu&&fu(e,fq)}})}}},_proxyEarthEvents:function(){var fs=this;var ft=this._earth;var e=false;ft.on("tilesload",function(i){fs.fire(i)});ft.on("centerandzoom",function(i){fs.dispatchEvent(new aD("onmoveend"));fs.dispatchEvent(new aD("onzoomend"))});function fr(i){fs.fire(i)}var fp=["zoomstart","zoomend","tilesload","sunlighttime_change","sunlighttime_clear","centerandzoom","animation_start","animation_stop","movestart","moveend","moving","dragstart","dragend","dragging"];for(var fq=0;fq=19){return bY.MAX_DRAG_TILT}else{if(e<=18){if(e=this._enableTiltZoom-2){return(1-(this._enableTiltZoom-e)/2)*bY.MAX_DRAG_TILT_L2}return 0}return bY.MAX_DRAG_TILT_L2}else{return(bY.MAX_DRAG_TILT-bY.MAX_DRAG_TILT_L2)*(e-18)+bY.MAX_DRAG_TILT_L2}}},worldSize:function(i){var e=i||this.zoomLevel;return bY.WORLD_SIZE_MC/this.getZoomUnits(e)},setTrafficOn:function(){this.addTileLayer(bm)},setTrafficOff:function(){this.removeTileLayer(bm)},showOverlayContainer:function(){this.setDisplayOptions({overlay:true})},hideOverlayContainer:function(){this.setDisplayOptions({overlay:false})},addLabelsToMapTile:function(fp){for(var e=0;e"-1"){e1.load(fy)}else{aK.customStyleInfo.xhr=ew.post(e,ft,window[fx])}})}else{e1.load(fy)}}},_setTextRenderType:function(){if(this.config.textRenderType!==null){return}if(ea()){this.config.textRenderType="canvas"}else{if(typeof this.config.style==="string"){this.config.textRenderType="image"}else{this.config.textRenderType="canvas"}}if(dk.isOffline||dk.isWgs84){this.config.textRenderType="canvas"}},setCustomStyle:function(e){this._customStyle=e;this.fire(new aD("onstyle_willchange"));var i=this;this.loadMapStyleFiles(function(){i.fire(new aD("onstyle_changed"))})},capture:function(e){if(!this._webglMapScene||!this._webglMapScene._painter){return}e=e||{};var i=this._webglMapScene._painter._canvas;var fq=e.quality||0.8;var fp=i.toDataURL("image/jpeg",fq);if(e.callback){e.callback(fp)}},destroy:function(){this._destroyed=true;this.fire(new aD("ondestroy"))},setMapStyleV2:function(e){this._setTextRenderType("canvas");this.setOptions({style:e})},startViewAnimation:function(fp){var e=fp._options.delay;var i=this;setTimeout(function(){fp._start(i)},e)},cancelViewAnimation:function(e){e._cancel(this)},pauseViewAnimation:function(e){e._pause(this)},continueViewAnimation:function(e){e._continue(this)},});var cr=null;function cD(fq,i){var e="//api.map.baidu.com/custom/v2/mapstyle?ak=49tGfOjwBKkG9zG76wgcpIbce4VZdbv6&callback=Bcb&";if(fq.styleJson){e+="styles="+encodeURIComponent(cZ(fq.styleJson))}else{if(fq.style){e+="customid="+fq.style}}var fp=this;window.Bcb=function(fr){cr=fr;i&&i()};e1.load(e)}aK.setMapStyle=cD;function cZ(fp,fz){var fA={featureType:"t",elementType:"e",visibility:"v",color:"c",lightness:"l",saturation:"s",weight:"w",level:"z",hue:"h",fontsize:"f"};var fB={all:"all",geometry:"g","geometry.fill":"g.f","geometry.stroke":"g.s",labels:"l","labels.text.fill":"l.t.f","labels.text.stroke":"l.t.s","labels.text":"l.t","labels.icon":"l.i"};var fC=[];var fu=false;var fw=false;var e=false;var fv=false;for(var fq=0,fy;fy=fp[fq];fq++){var fr={};y.extend(fr,fy);var ft=fr.stylers;delete fr.stylers;y.extend(fr,ft);var fs=[];for(var fx in fA){if(fr[fx]){if(fx==="elementType"){fs.push(fA[fx]+":"+fB[fr[fx]])}else{switch(fr[fx]){case"poilabel":fr[fx]="poi";break;case"districtlabel":fr[fx]="label";break}fs.push(fA[fx]+":"+fr[fx])}}}if(fs.length>2){fC.push(fs.join("|"))}}return fC.join(",")}var b0={NORMAL:"B_NORMAL_MAP",EARTH:"B_EARTH_MAP",SATELLITE:"B_STREET_MAP"};aK.MapTypeId=b0;var C="B_NORMAL_MAP";var bU="B_SATELLITE_MAP";var cF="B_STREET_MAP";var ez="B_EARTH_MAP";window.BMAPGL_NORMAL_MAP=C;window.BMAPGL_SATELLITE_MAP=bU;window.BMAPGL_HYBRID_MAP=cF;window.BMAPGL_EARTH_MAP=ez;window.BMAP_COORD_MERCATOR=1;window.BMAP_SYS_DRAWER=0;window.BMAP_SVG_DRAWER=1;window.BMAP_VML_DRAWER=2;window.BMAP_CANVAS_DRAWER=3;var f={getStyleUrl:function(fp,fr,fq,e){if(fp&&fp.styleJson){fp=fp.styleJson}this.styleJson=fp;var i=ds.apiHost+"/custom/v2/mapstyle?ak="+fr+"&callback="+fq+"&";i+="is_all=true&is_new=1&";i+="styles="+encodeURIComponent(this.styleJson2styleStringV2(fp,e));return i},styleJson2styleStringV2:function(fq,fB){var fC={featureType:"t",elementType:"e",visibility:"v",color:"c",lightness:"l",saturation:"s",weight:"w",level:"z",hue:"h",fontsize:"f"};var fD={all:"all",geometry:"g","geometry.fill":"g.f","geometry.stroke":"g.s",labels:"l","labels.text.fill":"l.t.f","labels.text.stroke":"l.t.s","labels.text":"l.t","labels.icon":"l.i"};var fE=[];var fw=false;var fy=false;var fp=false;var fx=false;var e=false;aK.customStyleInfo.zoomFrontStyle[fB]={};var fr=false;for(var fs=0;!!fq[fs];fs++){var fA=fq[fs];if(this.isOnlyZoomStyler(fA)){continue}aK.customStyleInfo.zoomRegion=this.getZoomRegion(fA,aK.customStyleInfo.zoomRegion);if(!this.isSelectZoom(fA,fB)){continue}if((fA.featureType==="land"||fA.featureType==="all"||fA.featureType==="background")&&typeof fA.elementType==="string"&&(fA.elementType==="geometry"||fA.elementType==="geometry.fill"||fA.elementType==="all")&&fA.stylers&&!fr){if(fA.stylers["color"]){aK.customStyleInfo.zoomFrontStyle[fB]["bmapLandColor"]=fA.stylers["color"];aK.customStyleInfo.zoomFrontStyle[fB].landColor=true;aK.bmapLandColor=fA.stylers["color"];fw=true}if(fA.stylers["visibility"]&&fA.stylers["visibility"]==="off"){aK.customStyleInfo.zoomFrontStyle[fB]["bmapLandColor"]="#00000000";aK.customStyleInfo.zoomFrontStyle[fB].landColor=true;aK.bmapLandColor="#00000000";fw=true}if(fA.featureType==="land"){fr=true}}if(fA.featureType==="railway"&&typeof fA.elementType==="string"&&fA.stylers){if(fA.stylers["color"]){if(fA.elementType==="geometry"){aK.bmapRailwayFillColor=fA.stylers["color"];fy=true;aK.bmapRailwayStrokeColor=fA.stylers["color"];fp=true;aK.customStyleInfo.zoomFrontStyle[fB]["bmapRailwayFillColor"]=fA.stylers["color"];aK.customStyleInfo.zoomFrontStyle[fB]["bmapRailwayStrokeColor"]=fA.stylers["color"];aK.customStyleInfo.zoomFrontStyle[fB].railwayFillColor=true;aK.customStyleInfo.zoomFrontStyle[fB].railwayStrokeColor=true}if(fA.elementType==="geometry.fill"){aK.bmapRailwayFillColor=fA.stylers["color"];fy=true;aK.customStyleInfo.zoomFrontStyle[fB]["bmapRailwayFillColor"]=fA.stylers["color"];aK.customStyleInfo.zoomFrontStyle[fB].railwayFillColor=true}if(fA.elementType==="geometry.stroke"){aK.bmapRailwayStrokeColor=fA.stylers["color"];fp=true;aK.customStyleInfo.zoomFrontStyle[fB]["bmapRailwayStrokeColor"]=fA.stylers["color"];aK.customStyleInfo.zoomFrontStyle[fB].railwayStrokeColor=true}}if(fA.stylers["visibility"]){aK.bmapRailwayVisibility=fA.stylers["visibility"];fx=true;aK.customStyleInfo.zoomFrontStyle[fB]["bmapRailwayVisibility"]=fA.stylers["visibility"];aK.customStyleInfo.zoomFrontStyle[fB].railwayVisibility=true}}if(fA.featureType==="roadarrow"&&fA.elementType==="labels.icon"&&fA.stylers){aK.bmapRoadarrowVisibility=fA.stylers["visibility"];aK.customStyleInfo.zoomFrontStyle[fB]["bmapRoadarrowVisibility"]=fA.stylers["visibility"];aK.customStyleInfo.zoomFrontStyle[fB].roadarrowVisibility=true;e=true}var ft={};y.extend(ft,fA);var fv=ft.stylers;delete ft.stylers;y.extend(ft,fv);var fu=[];for(var fz in fC){if(ft[fz]){if(this.isEditorZoomKeys(fz)){continue}if(fz==="elementType"){fu.push(fC[fz]+":"+fD[ft[fz]])}else{switch(ft[fz]){case"poilabel":ft[fz]="poi";break;case"districtlabel":ft[fz]="label";break}fu.push(fC[fz]+":"+ft[fz])}}}if(fu.length>2){fE.push(fu.join("|"))}}if(!aK.customStyleInfo.zoomFrontStyle[fB].landColor&&aK.customStyleInfo.zoomFrontStyle[fB]["bmapLandColor"]){delete aK.customStyleInfo.zoomFrontStyle[fB]["bmapLandColor"]}if(!aK.customStyleInfo.zoomFrontStyle[fB].railwayFillColor&&aK.customStyleInfo.zoomFrontStyle[fB]["bmapRailwayFillColor"]){delete aK.customStyleInfo.zoomFrontStyle[fB]["bmapRailwayFillColor"]}if(!aK.customStyleInfo.zoomFrontStyle[fB].railwayStrokeColor&&aK.customStyleInfo.zoomFrontStyle[fB]["bmapRailwayStrokeColor"]){delete aK.customStyleInfo.zoomFrontStyle[fB]["bmapRailwayStrokeColor"]}if(!aK.customStyleInfo.zoomFrontStyle[fB].railwayVisibility&&aK.customStyleInfo.zoomFrontStyle[fB]["bmapRailwayVisibility"]){delete aK.customStyleInfo.zoomFrontStyle[fB]["bmapRailwayVisibility"]}if(!aK.customStyleInfo.zoomFrontStyle[fB].roadarrowVisibility&&aK.customStyleInfo.zoomFrontStyle[fB]["bmapRoadarrowVisibility"]){delete aK.customStyleInfo.zoomFrontStyle[fB]["bmapRoadarrowVisibility"]}return fE.join(",")},isOnlyZoomStyler:function(e){var i={};y.extend(i,e.stylers);delete i.curZoomRegionId;delete i.curZoomRegion;delete i.level;if(y.isEmptyObject(i)){return true}else{return false}},isSelectZoom:function(i,e){var fp=i.stylers["level"];if(fp===undefined){return true}else{if(fp===e+""){return true}else{return false}}},isEditorZoomKeys:function(e){var i={curZoomRegionId:true,curZoomRegion:true};if(i[e]){return true}else{return false}},getZoomRegion:function(e,i){var fq=e.stylers["level"];var fp={};y.extend(fp,i);if(fq===undefined){return fp}else{fp[parseInt(fq,10)]=true;return fp}},onStyleDataBack:function(fr,fw,fv,e,ft){if(fr.status!==0){return}if(fr.data.style.length===3){if(!aK.customStyleInfo.baseFs){aK.customStyleInfo.baseFs=fr.data.style}aK.StyleBody=fr.data.style[2]}else{aK.StyleBody=fr.data.style}var fu=aK.customStyleInfo.baseFs;if(!y.isEmptyObject(aK.customStyleInfo.zoomRegion)){this.updateZoomFeatureStyle(aK.StyleBody,fw);this.updateFrontFeatureStyle(fw);var fp=this.calcuOtherZoomRegion(aK.customStyleInfo.zoomRegion,fw);for(var fs in fp){var fq={};y.extend(fq,e);this.getOtherZoomStyles(fs,ft,fq)}}else{aK["FeatureStyle"+fv]=fu;this.updateFrontFeatureStyle(fw)}},updateZoomFeatureStyle:function(fs,fr){aK.customStyleInfo.zoomStyleBody[fr]=fs;if(!aK.customStyleInfo.zoomRegion[fr]){var fq=3;var e=21;for(var fp=fq;fp<=e;fp++){if(!aK.customStyleInfo.zoomRegion[fp]){aK.customStyleInfo.zoomStyleBody[fp]=fs}}}},getOtherZoomStyles:function(fs,ft,fr){var fq=this;var fp=fs;var e=(Math.random()*100000).toFixed(0);window["_cbk"+e]=function(fu){if(fu.data.style.length===3){fu=fu.data.style[2]}else{fu=fu.data.style}fq.updateZoomFeatureStyle(fu,fp);fq.updateFrontFeatureStyle(fp);delete window["_cbk"+e]};var i=ds.apiHost+"/custom/v2/mapstyle?ak="+ft+"&callback=_cbk"+e+"&";i+="is_all=true&is_new=1&";if(fr.styleJson){i+="styles="+encodeURIComponent(this.styleJson2styleStringV2(fr.styleJson,fp))}else{if(fr.styleId){i+="styles="+encodeURIComponent(this.styleJson2styleStringV2(fq.styleJson,fp))}}e1.load(i)},updateFrontFeatureStyle:function(fr){if(!aK.customStyleInfo.zoomRegion[fr]){var fq=3;var e=21;for(var fp=fq;fp<=e;fp++){if(!aK.customStyleInfo.zoomRegion[fp]){if(!aK.customStyleInfo.zoomFrontStyle[fp]){aK.customStyleInfo.zoomFrontStyle[fp]={}}if(!aK.customStyleInfo.zoomFrontStyle[fr]){continue}aK.customStyleInfo.zoomFrontStyle[fp]["bmapLandColor"]=aK.customStyleInfo.zoomFrontStyle[fr]["bmapLandColor"];aK.customStyleInfo.zoomFrontStyle[fp]["bmapRailwayFillColor"]=aK.customStyleInfo.zoomFrontStyle[fr]["bmapRailwayFillColor"];aK.customStyleInfo.zoomFrontStyle[fp]["bmapRailwayStrokeColor"]=aK.customStyleInfo.zoomFrontStyle[fr]["bmapRailwayStrokeColor"]}}}},calcuOtherZoomRegion:function(ft,fs){var fp={};y.extend(fp,ft);if(fp[fs]){var fr=3;var e=21;for(var fq=fr;fq<=e;fq++){if(!fp[fq]){fp[fq]=true;break}}delete fp[fs]}else{}return fp}};function a6(i,e,fq,fp){this.cx=3*i;this.bx=3*(fq-i)-this.cx;this.ax=1-this.cx-this.bx;this.cy=3*e;this.by=3*(fp-e)-this.cy;this.ay=1-this.cy-this.by;this.p1x=i;this.p1y=fp;this.p2x=fq;this.p2y=fp}a6.prototype.sampleCurveX=function(e){return((this.ax*e+this.bx)*e+this.cx)*e};a6.prototype.sampleCurveY=function(e){return((this.ay*e+this.by)*e+this.cy)*e};a6.prototype.sampleCurveDerivativeX=function(e){return(3*this.ax*e+2*this.bx)*e+this.cx};a6.prototype.solveCurveX=function(e,fv){if(typeof fv==="undefined"){fv=0.000001}var fu;var ft;var fr;var fp;var fq;for(fr=e,fq=0;fq<8;fq++){fp=this.sampleCurveX(fr)-e;if(Math.abs(fp)ft){return ft}while(fufp){fu=fr}else{ft=fr}fr=(ft-fu)*0.5+fu}return fr};a6.prototype.solve=function(e,i){return this.sampleCurveY(this.solveCurveX(e,i))};var bs={};function m(fp){var e={duration:1000,fps:30,delay:0,transition:bs.linear,dropLastAnimation:false};if(fp){for(var fq in fp){e[fq]=fp[fq]}}if(fp.beginTime){this._beginTime=fp.beginTime}this._callbacks=[];this._options=e;if(e.delay){var fr=this;setTimeout(function(){fr._doStart()},e.delay)}else{this._doStart()}this._pauseTime=0}m.INFINITE="INFINITE";m.prototype._doStart=function(){if(this._isPausing){var e=performance.now()||new Date().getTime();this._pauseTime+=e-this._isPausing;this._isPausing=undefined}if(window.requestAnimationFrame){var i=this;i._timer=window.requestAnimationFrame(function(fp){i._loop(fp)})}else{this._beginTime=new Date().getTime();if(this._options.duration===m.INFINITE){this._endTime=null}else{this._endTime=this._beginTime+this._options.duration}this._loop()}};m.prototype._loop=function(fq){var ft=this;fq=fq||new Date().getTime();fq=fq-this._pauseTime;if(!this._beginTime){this._beginTime=fq}if(!this._endTime&&typeof this._options.duration==="number"){this._endTime=this._beginTime+this._options.duration}if(ft._endTime!==null&&fq>=ft._endTime){if(ft._options.dropLastAnimation===false){ft._options.render(ft._options.transition(1),1,fq)}if(typeof ft._options.finish==="function"){ft._options.finish(fq)}for(var fs=0,e=ft._callbacks.length;fs=fr.percentage&&fq0){i.unselectable="on";i.selectstart=function(){return false};i.onmousedown=function(fp){fp.preventDefault();return false}}else{var e=b3(i);e.MozUserSelect="none";e.WebkitUserSelect="none";i.addEventListener("mousedown",function(fp){fp.preventDefault()},false)}}function eU(e){return e&&e.parentNode&&e.parentNode.nodeType!==11}function ct(i,e){i.insertAdjacentHTML("beforeEnd",e);return i.lastChild}function fe(fp,i){var fq=document.createElement("div");fq.innerHTML=i;var e=fq.childNodes[0];return fp.parentNode.insertBefore(e,fp)}function j(i){i=i||window.event;i.stopPropagation?i.stopPropagation():i.cancelBubble=true}function a8(i){i=i||window.event;i.preventDefault?i.preventDefault():i.returnValue=false;return false}function b1(i){j(i);return a8(i)}function dU(){var e=document.documentElement;var i=document.body;if(e&&(e.scrollTop||e.scrollLeft)){return[e.scrollTop,e.scrollLeft]}else{if(i){return[i.scrollTop,i.scrollLeft]}else{return[0,0]}}}function dI(fr){if(!fr){return}fr.onload=fr.onerror=null;var fp=fr.attributes,fq,e,fs;if(fp){e=fp.length;for(fq=0;fq>4);fw=((fv&15)<<4)|(ft>>2);fu=((ft&3)<<6)|fs;fp=fp+String.fromCharCode(fy);if(ft!==64){fp=fp+String.fromCharCode(fw)}if(fs!==64){fp=fp+String.fromCharCode(fu)}fy=fw=fu="";fx=fv=ft=fs=""}while(fq-1||e.indexOf("iPad")>-1){return true}return false}function c4(){var e=navigator.userAgent;if(e.indexOf("Android")>-1){return true}return false}function bL(){var e=navigator.userAgent;return e.indexOf("baiduboxapp")>-1}function cu(e){return e*Math.PI/180}function b4(e){return e/Math.PI*180}function cw(e,fr){var fq=Math.pow(10,fr);if(typeof e==="number"){return Math.round(e*fq)/fq}for(var fp=0;fpe){fp=e}}return fp}function d6(e,i){while(e<0){e+=i}return e%i}function cJ(i,e){return(i>=0&&e>=0)||(i<0&&e<0)}function az(i){if(i._gl){return i._gl}var e={alpha:true,antialias:false,failIfMajorPerformanceCaveat:false,preserveDrawingBuffer:false,stencil:false};var fp=i.getContext("webgl",e)||i.getContext("experimental-webgl",e);i._gl=fp;return fp}function c9(fq,fp){for(var e=0;efq||fp.lati){return false}return true}function ev(fu,ft,fs,fq){var fr=et(fs,fq,fu);var fp=et(fs,fq,ft);var i=et(fu,ft,fs);var e=et(fu,ft,fq);if(fr*fp<0&&i*e<0){return true}else{if(fr===0&&bo(fs,fq,fu)){return true}else{if(fp===0&&bo(fs,fq,ft)){return true}else{if(i===0&&bo(fu,ft,fs)){return true}else{if(e===0&&bo(fu,ft,fq)){return true}else{return false}}}}}}function fc(fp,i){var e=i.parentNode;if(e.lastChild===i){e.appendChild(fp)}else{e.insertBefore(fp,i.nextSibling)}}function fg(fw,fx){if(fx===0){return fw}var fv=0;var ft=0;if(!fw){throw"异常"}if(fw.length===0){return[]}for(var fr=1,fp=fw.length-1;frfv){ft=fr;fv=fu}}var e=[];if(fv>=fx){var fz=fw.slice(0,ft);var fy=fw.slice(ft,fw.length);var fs=fg(fz,fx);var fq=fg(fy,fx);for(var fr=0,fp=fs.length;fr=0){fq=Math.floor(fp/65536)*65536;i=fq;e=fp-fq}else{fq=Math.floor(-fp/65536)*65536;i=-fq;e=fp+fq}return[i,e]}function B(e){if(e.lng>=0&&e.lat>=0){return new e7(e.lng-10000000,e.lat-6000000)}if(e.lng>=0&&e.lat<0){return new e7(e.lng-10000000,e.lat+6000000)}if(e.lng<0&&e.lat>=0){return new e7(e.lng+10000000,e.lat-6000000)}if(e.lng<0&&e.lat<0){return new e7(e.lng+10000000,e.lat+6000000)}}var dO=null;if(window.performance&&window.performance.now){dO=function(){return performance.now()}}else{if(Date.now){dO=function(){return Date.now()}}else{dO=function(){return(new Date).getTime()}}}function a1(fq,e,i){var fp="mouseWheel";if(y.Platform.macintosh){if(!isNaN(fq)&&(fq<10||fq!==120)&&(e%1===0&&e<5)){fp="padScroll"}if(y.Browser.firefox&&(e%1===0&&e<5&&i===0)){fp="padScroll"}}if(y.Browser.safari&&fq===12){fp="mouseWheel"}return fp}function b5(fz,fu){var fy=fz[0];var fx=fz[1];var fq=false;for(var ft=0,fs=fu.length-2;ftfx)!==(fp>fx))&&(fy<(fv-fw)*(fx-fr)/(fp-fr)+fw);if(e){fq=!fq}fs=ft}return fq}function bC(fp,e,i,fq){fq=fq||0.4;if(fp>i){fp=Math.pow(fp-i+1,fq)+i-1}else{if(fpi-gu?gu:gv},e.offset=function(i,gu){return gt(i=new Date(+i),null==gu?1:Math.floor(gu)),i},e.range=function(gv,i,gu){var gw=[];if(gv=e.ceil(gv),gu=null==gu?1:Math.floor(gu),!(i>gv&&gu>0)){return gw}do{gw.push(new Date(+gv))}while(gt(gv,gu),gs(gv),i>gv);return gw},e.filter=function(i){return gk(function(gu){for(;gs(gu),!i(gu);){gu.setTime(gu-1)}},function(gu,gv){for(;--gv>=0;){for(;gt(gu,1),!i(gu);){}}})},gq&&(e.count=function(i,gu){return f4.setTime(+i),f8.setTime(+gu),gs(f4),gs(f8),Math.floor(gq(f4,f8))},e.every=function(i){return i=Math.floor(i),isFinite(i)&&i>0?i>1?e.filter(gr?function(gu){return gr(gu)%i===0}:function(gu){return e.count(0,gu)%i===0}):e:null}),e}function f9(e){return gk(function(i){i.setDate(i.getDate()-(i.getDay()+7-e)%7),i.setHours(0,0,0,0)},function(i,gq){i.setDate(i.getDate()+7*gq)},function(i,gq){return(gq-i-(gq.getTimezoneOffset()-i.getTimezoneOffset())*f3)/gh})}function f1(e){return gk(function(i){i.setUTCDate(i.getUTCDate()-(i.getUTCDay()+7-e)%7),i.setUTCHours(0,0,0,0)},function(i,gq){i.setUTCDate(i.getUTCDate()+7*gq)},function(i,gq){return(gq-i)/gh})}var f4=new Date,f8=new Date,gf=gk(function(){},function(i,gq){i.setTime(+i+gq)},function(i,gq){return gq-i});gf.every=function(e){return e=Math.floor(e),isFinite(e)&&e>0?e>1?gk(function(i){i.setTime(Math.floor(i/e)*e)},function(i,gq){i.setTime(+i+gq*e)},function(i,gq){return(gq-i)/e}):gf:null};var go=gf.range,gm=1000,f3=60000,gj=3600000,gb=86400000,gh=604800000,fv=gk(function(e){e.setTime(Math.floor(e/gm)*gm)},function(i,gq){i.setTime(+i+gq*gm)},function(i,gq){return(gq-i)/gm},function(e){return e.getUTCSeconds()}),gl=fv.range,ga=gk(function(e){e.setTime(Math.floor(e/f3)*f3)},function(i,gq){i.setTime(+i+gq*f3)},function(i,gq){return(gq-i)/f3},function(e){return e.getMinutes()}),fD=ga.range,fX=gk(function(i){var gq=i.getTimezoneOffset()*f3%gj;0>gq&&(gq+=gj),i.setTime(Math.floor((+i-gq)/gj)*gj+gq)},function(i,gq){i.setTime(+i+gq*gj)},function(i,gq){return(gq-i)/gj},function(e){return e.getHours()}),gg=fX.range,fN=gk(function(e){e.setHours(0,0,0,0)},function(i,gq){i.setDate(i.getDate()+gq)},function(i,gq){return(gq-i-(gq.getTimezoneOffset()-i.getTimezoneOffset())*f3)/gb},function(e){return e.getDate()-1}),fu=fN.range,fK=f9(0),fM=f9(1),fq=f9(2),fI=f9(3),fx=f9(4),f0=f9(5),f7=f9(6),fs=fK.range,fZ=fM.range,fB=fq.range,fW=fI.range,gc=fx.range,fY=f0.range,gn=f7.range,ge=gk(function(e){e.setDate(1),e.setHours(0,0,0,0)},function(i,gq){i.setMonth(i.getMonth()+gq)},function(i,gq){return gq.getMonth()-i.getMonth()+12*(gq.getFullYear()-i.getFullYear())},function(e){return e.getMonth()}),gp=ge.range,fH=gk(function(e){e.setMonth(0,1),e.setHours(0,0,0,0)},function(i,gq){i.setFullYear(i.getFullYear()+gq)},function(i,gq){return gq.getFullYear()-i.getFullYear()},function(e){return e.getFullYear()});fH.every=function(e){return isFinite(e=Math.floor(e))&&e>0?gk(function(i){i.setFullYear(Math.floor(i.getFullYear()/e)*e),i.setMonth(0,1),i.setHours(0,0,0,0)},function(i,gq){i.setFullYear(i.getFullYear()+gq*e)}):null};var fA=fH.range,f5=gk(function(e){e.setUTCSeconds(0,0)},function(i,gq){i.setTime(+i+gq*f3)},function(i,gq){return(gq-i)/f3},function(e){return e.getUTCMinutes()}),fP=f5.range,fO=gk(function(e){e.setUTCMinutes(0,0,0)},function(i,gq){i.setTime(+i+gq*gj)},function(i,gq){return(gq-i)/gj},function(e){return e.getUTCHours()}),fL=fO.range,fJ=gk(function(e){e.setUTCHours(0,0,0,0)},function(i,gq){i.setUTCDate(i.getUTCDate()+gq)},function(i,gq){return(gq-i)/gb},function(e){return e.getUTCDate()-1}),fG=fJ.range,fF=f1(0),fE=f1(1),fC=f1(2),fz=f1(3),fy=f1(4),ft=f1(5),fr=f1(6),fp=fF.range,fV=fE.range,gi=fC.range,f6=fz.range,gd=fy.range,fU=ft.range,fT=fr.range,fS=gk(function(e){e.setUTCDate(1),e.setUTCHours(0,0,0,0)},function(i,gq){i.setUTCMonth(i.getUTCMonth()+gq)},function(i,gq){return gq.getUTCMonth()-i.getUTCMonth()+12*(gq.getUTCFullYear()-i.getUTCFullYear())},function(e){return e.getUTCMonth()}),fR=fS.range,fw=gk(function(e){e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)},function(i,gq){i.setUTCFullYear(i.getUTCFullYear()+gq)},function(i,gq){return gq.getUTCFullYear()-i.getUTCFullYear()},function(e){return e.getUTCFullYear()});fw.every=function(e){return isFinite(e=Math.floor(e))&&e>0?gk(function(i){i.setUTCFullYear(Math.floor(i.getUTCFullYear()/e)*e),i.setUTCMonth(0,1),i.setUTCHours(0,0,0,0)},function(i,gq){i.setUTCFullYear(i.getUTCFullYear()+gq*e)}):null};var fQ=fw.range;f2.timeInterval=gk,f2.timeMillisecond=gf,f2.timeMilliseconds=go,f2.utcMillisecond=gf,f2.utcMilliseconds=go,f2.timeSecond=fv,f2.timeSeconds=gl,f2.utcSecond=fv,f2.utcSeconds=gl,f2.timeMinute=ga,f2.timeMinutes=fD,f2.timeHour=fX,f2.timeHours=gg,f2.timeDay=fN,f2.timeDays=fu,f2.timeWeek=fK,f2.timeWeeks=fs,f2.timeSunday=fK,f2.timeSundays=fs,f2.timeMonday=fM,f2.timeMondays=fZ,f2.timeTuesday=fq,f2.timeTuesdays=fB,f2.timeWednesday=fI,f2.timeWednesdays=fW,f2.timeThursday=fx,f2.timeThursdays=gc,f2.timeFriday=f0,f2.timeFridays=fY,f2.timeSaturday=f7,f2.timeSaturdays=gn,f2.timeMonth=ge,f2.timeMonths=gp,f2.timeYear=fH,f2.timeYears=fA,f2.utcMinute=f5,f2.utcMinutes=fP,f2.utcHour=fO,f2.utcHours=fL,f2.utcDay=fJ,f2.utcDays=fG,f2.utcWeek=fF,f2.utcWeeks=fp,f2.utcSunday=fF,f2.utcSundays=fp,f2.utcMonday=fE,f2.utcMondays=fV,f2.utcTuesday=fC,f2.utcTuesdays=gi,f2.utcWednesday=fz,f2.utcWednesdays=f6,f2.utcThursday=fy,f2.utcThursdays=gd,f2.utcFriday=ft,f2.utcFridays=fU,f2.utcSaturday=fr,f2.utcSaturdays=fT,f2.utcMonth=fS,f2.utcMonths=fR,f2.utcYear=fw,f2.utcYears=fQ,Object.defineProperty(f2,"__esModule",{value:!0})});function em(e){this._elemType=e;this._objCollection={}}em.prototype.get=function(){var i=null;for(var e in this._objCollection){if(this._objCollection[e]&&this._objCollection[e]._free===true){this._objCollection[e]._free=false;return this._objCollection[e]}}i=J(this._elemType);e=aK.getGUID("obj_pool_");this._objCollection[e]=i;return i};em.prototype.free=function(e){if(!e){return}e._free=true;if(e.tagName.toLowerCase()==="img"){e.src="";e.crossOrigin=null;e.onload=e.onerror=null}};em.prototype.clear=function(){for(var e in this._objCollection){if(this._objCollection[e]&&this._objCollection[e].tagName.toLowerCase==="img"){this._objCollection[e].onload=this._objCollection[e].onerror=null}}this._objCollection={}};var ew={get:function(i,fr,e,fp){var fq=new XMLHttpRequest();fq.open("GET",i,true);fq.timeout=10000;fq.ontimeout=function(){fp&&fp()};fq.onreadystatechange=function(fs){if(this.readyState===4){if(this.status===200){fr&&fr(fq.responseText)}else{e&&e()}}};fq.send()},post:function(i,fs,fr,e,fp){var fq=new XMLHttpRequest();fq.open("POST",i,true);fq.setRequestHeader("Content-type","application/x-www-form-urlencoded");fq.timeout=10000;fq.ontimeout=function(){fp&&fp()};fq.onreadystatechange=function(ft){if(this.readyState===4){if(this.status===200){fr&&fr(fq.responseText,fs)}else{e&&e()}}};fq.send(fs);return fq}};var e1=(function(e){function i(fs,fp,fr){var fq=J("script",{src:fs,type:"text/javascript",charset:"utf-8"});if(fq.addEventListener){fq.addEventListener("load",function(fu){var ft=fu.target;ft.parentNode.removeChild(ft);fp&&fp()},false);fq.addEventListener("error",function(ft){fr&&fr(null)},false)}else{if(fq.attachEvent){fq.attachEvent("onreadystatechange",function(fu){var ft=window.event.srcElement;if(ft&&(ft.readyState==="loaded"||ft.readyState==="complete")){ft.parentNode.removeChild(ft)}fp&&fp()})}}e.getElementsByTagName("head")[0].appendChild(fq)}return{load:function(ft,fp,fq){if(typeof ft==="string"){i(ft,fp,fq)}else{if(ft.length>0){var fs=ft.length;for(var fr=0;fr-1){return{col:fq,row:fw,zoom:fv,useZoom:fp}}else{var ft=b7.mapZoomBaseIndex[fv];if(dk.isWgs84){ft=b7.mapZoomBaseIndex1[fv]}var fs=b7.baseScaleZoom[ft+1];if(!fs){return null}var fu=this.getFactorByZooms(fs,fv);var e=b7.baseZoomInfo[fs];return{col:Math.floor(fq/fu),row:Math.floor(fw/fu),zoom:fs,useZoom:e[e.length-1]}}return null}if(fv-1-1){return[{col:fr,row:ft,zoom:e,useZoom:fp}]}else{var fE=0;var fB=e;while(fEfA){return null}var fz=Math.pow(2,fG);var i=fr*fz;var fy=ft*fz;var fv=e+fG;var fx=[];for(var fD=0;fD<2;fD++){var fs=i+fD;for(var fC=0;fC<2;fC++){var fu=fy+fC;fx.push({col:fs,row:fu,zoom:fv,useZoom:fv})}}return fx},getFactorByZooms:function(i,fq){var fp=b7.mapZoomBaseIndex[i];var fr=b7.mapZoomBaseIndex[fq];if(dk.isWgs84){fp=b7.mapZoomBaseIndex1[i];fr=b7.mapZoomBaseIndex1[fq]}var e=b7.baseScaleZoomMercatorSize[fp];var fs=b7.baseScaleZoomMercatorSize[fr];return e/fs}};if(dk.isWgs84){b7.prototype.getZoomUnits=function(e){return 2*Math.PI*6378137/256/Math.pow(2,e)};b7.mapZoomBaseIndex=[0,0,8,7,7,6,6,5,5,4,3,3,3,2,2,1,1,0,0,0,0];b7.mapZoomBaseIndex1={16:0,14:1,13:2,10:3,9:4,7:5,5:6,3:7,2:8,};b7.baseScaleZoom=[16,14,13,10,9,7,5,3,2];b7.baseScaleZoomMercatorSize=[b7.prototype.getZoomUnits(16)*256,b7.prototype.getZoomUnits(14)*256,b7.prototype.getZoomUnits(13)*256,b7.prototype.getZoomUnits(10)*256,b7.prototype.getZoomUnits(9)*256,b7.prototype.getZoomUnits(7)*256,b7.prototype.getZoomUnits(5)*256,b7.prototype.getZoomUnits(3)*256,b7.prototype.getZoomUnits(2)*256,];b7.mapZoomBaseZoomMapping=[0,0,2,3,3,5,5,7,7,9,10,10,10,13,13,14,14,16,16,16,16];b7.mapZoomStartZoomMapping=[0,0,2,3,3,5,5,7,7,9,10,10,10,13,13,15,15,17,17,17,17];b7.mapZoomTileSize=[0,0,256,256,512,256,512,256,512,256,256,512,1024,256,512,512,1024,512,1024,2048,4096];b7.mapZoomTileSize=[0,0,256,256,512,256,512,256,512,256,256,512,1024,256,256,512,256,512,1024,2048,4096];b7.baseZoomInfo={"2":[2],"3":[3,4],"5":[5,6],"7":[7,8],"9":[9],"10":[10,11,12],"13":[13,14],"14":[15,16],"16":[17,18,19,20]}}var aC={};var S=["swiftshader","microsoft basic render driver"];var br=["intel","nvidia","amd","apple","geforce"];function cg(e){e=e.toLowerCase();if(S.indexOf(e)>=0){return true}if(e.indexOf("mobile")>=0){return true}return false}function dP(fp){fp=fp.toLowerCase();for(var e=0;e=0){return true}}return false}function cE(e){if(!e){return false}if(cg(e)){return false}if(dP(e)){return true}return false}aC.ifEnableEarth=function(i){var e=aC.ifEnableEarth;if(!i&&typeof e._enable==="boolean"){return e._enable}if(aC.ifSupportWebGL()){e._enable=true;return true}e._enable=false;return false};aC.ifEnableWebGLMap=function(i){var e=aC.ifEnableWebGLMap;if(!i&&typeof e._enable==="boolean"){return e._enable}if(aC.ifSupportWebGL()){if(ch.inMapHost){e._enable=true;return true}else{if(window.Blob||window.BlobBuilder||window.WebKitBlobBuilder||window.MozBlobBuilder){e._enable=true;return true}else{e._enable=false;return false}}}e._enable=false;return false};aC.params={};aC.ifSupportWebGL=function(){var i=aC.ifSupportWebGL;if(typeof i._supportWebGL==="boolean"){return i._supportWebGL}if(!window.WebGLRenderingContext){i._supportWebGL=false;return false}var fp=document.createElement("canvas");fp.width=300;fp.height=150;var fr=null;var fx={alpha:false,antialias:false,failIfMajorPerformanceCaveat:true,preserveDrawingBuffer:false,stencil:false};try{fr=fp.getContext("webgl",fx)||fp.getContext("experimental-webgl",fx)}catch(ft){i._supportWebGL=false}if(fr===null){i._supportWebGL=false}else{i._supportWebGL=true;var fv=fr.getExtension("WEBGL_debug_renderer_info");if(fv){var fu=fr.getParameter(fv.UNMASKED_RENDERER_WEBGL);if(cE(fu)===true){i._supportWebGL=true}var fw=fr.getParameter(fv.UNMASKED_VENDOR_WEBGL);i._renderer=fu;i._vendor=fw}if(!fv&&y.Browser.firefox){i._supportWebGL=true}if(!fv&&y.Platform.macintosh){i._supportWebGL=true}if(fr.drawingBufferWidth!==fp.width||fr.drawingBufferHeight!==fp.height){i._supportWebGL=false}if(fr.getParameter(fr.MAX_VERTEX_TEXTURE_IMAGE_UNITS)<4){i._supportWebGL=false}var fq=fr.getParameter(fr.MAX_TEXTURE_SIZE);aC.params.maxTextureSize=fq;if(fq<4096){i._supportWebGL=false}var fs=fr.getParameter(fr.MAX_TEXTURE_IMAGE_UNITS);if(fs<8){i._supportWebGL=false}if(!fr.getShaderPrecisionFormat||fr.getShaderPrecisionFormat(fr.FRAGMENT_SHADER,fr.HIGH_FLOAT).precision<23){i._supportWebGL=false}}return i._supportWebGL};aC.ifSupportCanvas2d=function(){var fr=aC.ifSupportCanvas2d;if(typeof fr.supportCanvas2d==="boolean"){return fr.supportCanvas2d}var fp=document.createElement("canvas");var i=null;try{i=fp.getContext("2d")}catch(fq){fr.supportCanvas2d=false}if(i===null){fr.supportCanvas2d=false}else{fr.supportCanvas2d=true}return fr.supportCanvas2d};aC.ifEnableCanvas2dMap=function(){var i=navigator.userAgent;var e=0;var fq=0;var fr=0;if(/macintosh/ig.test(i)){var fp=0;if(/(\d+\.\d)?(?:\.\d)?\s+safari\/?(\d+\.\d+)?/i.test(i)&&!/chrome/i.test(i)){fp=parseInt((RegExp["\x241"]||RegExp["\x242"]),10)}if(fp>0){return false}return true}if(/windows nt (\d+\.\d)/ig.test(i)){fq=parseFloat(RegExp.$1);if(fq>=6.1){if(/chrome\/(\d+\.\d)/i.test(i)){e=parseFloat(RegExp.$1);if(e>=31){return true}}if(/MSIE (\d+(\.\d+)?)/.test(i)){fr=parseFloat(RegExp.$1);if(fr>=10){return true}}if(/Firefox/.test(i)){return true}if(/rv:11.0/ig.test(i)){return true}if(/edge/ig.test(i)){return true}}}return false};aC.ifSupportCSS3=function(fu,i){var ft=document.createElement("div");var fs="Webkit Moz O ms".split(" ");var e=fs.length;var fp="";var fq=ft.style;if(fu in fq){fp=fu}fu=fu.replace(/^[a-z]/,function(fv){return fv.toUpperCase()});while(e--){var fr=fs[e]+fu;if(fr in fq){fp=fr;break}}if(i){return fp}else{return fp.length>0?true:false}};aC.isModernBrowser=aC.ifSupportCanvas2d()&&aC.ifSupportCSS3("transform");function dn(i,e){this._size=i;this._curSize=0;this._cache={};this._least=null;this._most=null;this._options={clearCallback:null,removeOldCallback:null};e=e||{};for(var fp in e){this._options[fp]=e[fp]}this._getDataTimes=0;this._hitTimes=0}dn.prototype.setData=function(fq,fs){var i=this._cache;var fp=this._size;if(fp===0){return}var e=this._curSize;if(e===fp){this._removeOld()}var fr;if(!i[fq]){fr={key:fq,data:fs,older:null,newwer:null};i[fq]=fr;if(this._least===null){this._least=fr}if(this._most===null){this._most=fr}this._curSize++}else{fr=i[fq];fr.data=fs;if(this._most===fr){return}fr.older&&(fr.older.newer=fr.newer);fr.newer&&(fr.newer.older=fr.older);if(this._least===fr){this._least=fr.newer}}if(this._most&&this._most!==fr){this._most.newer=fr;fr.older=this._most;this._most=fr;fr.newer=null}};dn.prototype.getData=function(e){var i=this._cache[e];this._getDataTimes++;if(i){this._hitTimes++;var fp=i.data;if(this._most===i){return fp}i.older&&(i.older.newer=i.newer);i.newer&&(i.newer.older=i.older);if(this._least===i){this._least=i.newer}this._most.newer=i;i.older=this._most;i.newer=null;this._most=i;return fp}return null};dn.prototype.getAllData=function(){return this._cache};dn.prototype.getHitRate=function(){return this._hitTimes/this._getDataTimes};dn.prototype.removeData=function(i){var e=this._cache;var fp=e[i];if(!fp){return}if(this._options.clearCallback){this._options.clearCallback(fp.data,fp.key)}fp.older&&(fp.older.newer=fp.newer);fp.newer&&(fp.newer.older=fp.older);if(this._least===fp){this._least=fp.newer}if(this._most===fp){this._most=fp.older}delete e[i];this._curSize--};dn.prototype._removeOld=function(){var e=this._cache;var fq=Math.round(this._size*0.6);var fp=0;while(this._least&&fp')}else{var i='
';if(e&&e.config.autoSafeArea&&aP()){this._safeAreaContainer=ct(this._map.container,i);this._safeAreaContainer.style.position="absolute";this._safeAreaContainer.style.bottom="env(safe-area-inset-bottom)";this._container=ct(this._safeAreaContainer,i)}else{this._container=ct(this._map.container,i)}}if(this._visible===false){this._container.style.display="none"}return this._container},_setPosition:function(){this.setAnchor(this._opts.anchor)},setAnchor:function(fq){if(this.anchorFixed||typeof fq!=="number"||isNaN(fq)||fqBMAP_ANCHOR_BOTTOM_RIGHT){fq=this.defaultAnchor}this._opts.offset=this._opts.offset||this.defaultOffset;var fp=this._opts.anchor;this._opts.anchor=fq;if(!this._container){return}var fs=this._container;var e=this._opts.offset.width;var fr=this._opts.offset.height;fs.style.left=fs.style.top=fs.style.right=fs.style.bottom="auto";switch(fq){case BMAP_ANCHOR_TOP_LEFT:fs.style.top=fr+"px";fs.style.left=e+"px";break;case BMAP_ANCHOR_TOP_RIGHT:fs.style.top=fr+"px";fs.style.right=e+"px";break;case BMAP_ANCHOR_BOTTOM_LEFT:fs.style.bottom=fr+"px";fs.style.left=e+"px";break;case BMAP_ANCHOR_BOTTOM_RIGHT:fs.style.bottom=fr+"px";fs.style.right=e+"px";break;default:break}var i=["TL","TR","BL","BR"];y.rc(this._container,"anchor"+i[fp]);y.ac(this._container,"anchor"+i[fq])},getAnchor:function(){return this._opts.anchor},setOffset:function(e){if(!e){return}this._opts=this._opts||{};this._opts.offset=new cK(e.width,e.height);if(!this._container){return}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=""}this.dispatchEvent(new aD("onshow"))},hide:function(){if(this._visible===false){return}this._visible=false;if(this._container){this._container.style.display="none"}this.dispatchEvent(new aD("onhide"))},isPrintable:function(){return !!this._opts.printable},isVisible:function(){if(!this._container&&!this._map){return false}return !!this._visible},_asyncLoadCode:function(){var e=this;cL.load("control",function(){if(e._asyncDraw){e._asyncDraw()}})}});var ff={TOP_LEFT:0,TOP_RIGHT:1,BOTTOM_LEFT:2,BOTTOM_RIGHT:3};aK.ControlAnchor=ff;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 cs(e){aB.call(this);e=e||{};this._opts={printable:false};y.extend(this._opts,e);this._copyrightCollection=[];this.defaultAnchor=BMAP_ANCHOR_BOTTOM_LEFT;this.defaultOffset=new cK(5,2);this.setAnchor(e.anchor);this._canShow=true;this.sateMapStyle=false;this.blockInfoWindow=false;this._asyncLoadCode()}cs.inherits(aB,"CopyrightControl");y.extend(cs.prototype,{initialize:function(e){this._map=e;return this._container},addCopyright:function(fq){var e={minZoom:0,bounds:null,content:"",mapType:""};for(var fp in fq){e[fp]=fq[fp]}if(this._map){var ft=e.minZoom;if(ft===-1||ftthis._map.getMaxZoom()){e.minZoom=this._map.getMinZoom()}if(e.mapType!==""&&!bg[e.mapType]){e.mapType=C}}var fr=this.getCopyright(fq.id);if(fr){for(var fs in e){fr[fs]=e[fs]}}else{this._copyrightCollection.push(e)}},getCopyright:function(fq){for(var fp=0,e=this._copyrightCollection.length;fp=BMAP_NAVIGATION_CONTROL_LARGE&&e<=BMAP_NAVIGATION_CONTROL_ANIM){this._opts.type=e}else{this._opts.type=BMAP_NAVIGATION_CONTROL_LARGE}},getType:function(){return this._opts.type}});function aV(i){aB.call(this);i=i||{};this._opts={printable:false};this.defaultAnchor=BMAP_ANCHOR_TOP_RIGHT;this.defaultOffset=new cK(10,10);this.setAnchor(i.anchor);this._opts=y.extend(y.extend(this._opts,{offset:this.defaultOffset,enableSwitch:true}),i);var e=this;cL.load("control",function(){e._asyncDraw()})}aV.inherits(aB,"MapTypeControl");y.extend(aV.prototype,{initialize:function(e){this._map=e;return this._container},showStreetLayer:function(e){this._map.showStreetLayer(e)}});function bA(e){aB.call(this);e=e||{};this._opts={};this._opts=y.extend(this._opts,e);this._zoomInDisabled=false;this._zoomOutDisabled=false;this._zoomInTapped=false;this._zoomOutTapped=false;this.defaultAnchor=ff.BOTTOM_RIGHT;this.defaultOffset=new cK(10,50);this.setAnchor(e.anchor);this._asyncLoadCode()}bA.inherits(aB,"ZoomControl");y.extend(bA.prototype,{initialize:function(e){this._map=e;return this._container}});function aT(e){aB.call(this);e=e||{};this._opts={autoZoom:true,autoViewport:true,onSuccess:null,onFail:null,showTips:true,enableHighAccuracy:true,timeout:5000};this._opts=y.extend(this._opts,e);this.defaultAnchor=ff.BOTTOM_LEFT;this.defaultOffset=new cK(10,50);this.watchPosition=this._opts.watchPosition||false;this.useCompass=this._opts.useCompass||false;this.locMarker=null;this.locLevel=16;this.setAnchor(this._opts.anchor);this.onLocationStart=e.onLocationStart||null;this._asyncLoadCode()}aT.inherits(aB,"LocationControl");y.extend(aT.prototype,{initialize:function(e){this._map=e;return this._container},startLocation:function(){this._startLocationCalled=true},stopLocationTrace:function(){},setOptions:function(e){e=e||{};y.extend(this._opts,e)},showLocationAt:function(e){this._userSetLocation=e}});function R(e){aB.call(this);e=e||{};this._opts={};this._opts=y.extend(this._opts,e);this.defaultAnchor=ff.BOTTOM_LEFT;this.defaultOffset=new cK(10,5);this.setAnchor(e.anchor)}R.inherits(aB,"LogoControl");y.extend(R.prototype,{initialize:function(i){this._map=i;var e=this._container=document.createElement("div");e.innerHTML='';i.getContainer().appendChild(e);return e}});function ex(e,i){this._map=e;this._indoorInfo=i;this._visible=true;this._adjustVisible=true;this._isMobile=ea();this._sizeConfig={FLOOR_BTN_HEIGHT:this._isMobile?35:26,SWITCH_ARROW_HEIGHT:this._isMobile?20:15};this._init()}ex.prototype._init=function(){this._render();this._bindDom();this._bind();this._adjustDisplayHeight();var e=new aD("onindoor_bar_show");e.uid=this._indoorInfo.uid;this._map.dispatchEvent(e)};ex.prototype._render=function(){if(!this._indoorInfo){return}var fu=this._isMobile;var e=this._div=J("div");y.ac(e,"floor-select-container");fu&&y.ac(e,"mobile");fu&&y.ac(e,"all-border-radius");var i=this._btnTop=J("button");y.ac(i,"floor-switch-top");y.ac(i,"top-border-radius");var fs=J("div");y.ac(fs,"floor-switch-top-icon");i.appendChild(fs);var fr=this._btnBottom=J("button");var fp=J("div");y.ac(fp,"floor-switch-bottom-icon");fr.appendChild(fp);y.ac(fr,"floor-switch-bottom");y.ac(fr,"bottom-border-radius");var fq=this._floorsContainer=J("div");y.ac(fq,"floors-container");fq.appendChild(this._createFloorsDom());this._div.appendChild(i);this._div.appendChild(fq);this._div.appendChild(fr);var fv=0;if(this._btnTop.style.display===""){fv=2*this._sizeConfig.SWITCH_ARROW_HEIGHT}this._div.style.height=parseInt(this._floorsContainer.style.height,10)+fv+"px";this._map.getContainer().appendChild(this._div);if(!fu){var ft=this;setTimeout(function(){ft._div.style.right="20px"},20)}};ex.prototype._createFloorsDom=function(){if(!this._indoorInfo){return}var fp=this._ol=J("ol");var fs=this._indoorInfo.currentFloor;for(var fr=this._indoorInfo.floors.length-1;fr>=0;fr--){var ft=this._indoorInfo.floors[fr].floorName;var e=J("li");var fq=J("button");y.ac(fq,"btn-select-floor");if(fr===fs){y.ac(fq,"selected")}fq.setAttribute("data-floor",fr);fq.innerHTML=ft;e.appendChild(fq);fp.appendChild(e)}return fp};ex.prototype._updateUI=function(){if(!this._ol){this._render();this._bind();this._adjustDisplayHeight();return}this._ol=null;this._ol=this._createFloorsDom();this._floorsContainer.innerHTML="";this._floorsContainer.appendChild(this._ol);this._adjustDisplayHeight()};ex.prototype._bindDom=function(){var e=this;y.on(this._floorsContainer,"click",function(fq){var fp=fq.target||fq.srcElement;if(fp.tagName.toLowerCase()==="button"){e._map.showIndoor(e._indoorInfo.uid,parseInt(fp.getAttribute("data-floor"),10));var i=new aD("onindoor_bar_click");i.uid=e._indoorInfo.uid;e._map.dispatchEvent(i)}});y.on(this._floorsContainer,"mouseover",function(fp){var i=fp.target;if(i.tagName.toLowerCase()==="button"){y.ac(i,"hover")}});y.on(this._floorsContainer,"mouseout",function(fp){var i=fp.target;if(i.tagName.toLowerCase()==="button"){y.rc(i,"hover")}});y.on(this._floorsContainer,"touchstart",function(fp){var i=fp.target;if(i.tagName.toLowerCase()==="button"){y.ac(i,"onmousedown")}});y.on(this._floorsContainer,"touchend",function(fp){var i=fp.target;if(i.tagName.toLowerCase()==="button"){y.rc(i,"onmousedown")}});y.on(this._btnTop,"mouseover",function(i){if(this._disable){return}y.ac(this,"hover")});y.on(this._btnTop,"mouseout",function(i){y.rc(this,"hover")});y.on(this._btnBottom,"mouseover",function(i){if(this._disable){return}y.ac(this,"hover")});y.on(this._btnBottom,"mouseout",function(i){y.rc(this,"hover")});y.on(this._btnTop,"touchstart",function(i){if(this.className.indexOf("disable")>-1){return}y.ac(this,"onmousedown")});y.on(this._btnTop,"touchend",function(i){y.rc(this,"onmousedown")});y.on(this._btnBottom,"touchstart",function(i){if(this.className.indexOf("disable")>-1){return}y.ac(this,"onmousedown")});y.on(this._btnBottom,"touchend",function(i){y.rc(this,"onmousedown")});y.on(this._btnTop,"click",function(i){e._setBarSliderTop(parseInt(e._ol.style.top,10)+26)});y.on(this._btnBottom,"click",function(i){e._setBarSliderTop(parseInt(e._ol.style.top,10)-26)});y.on(this._div,"mousemove",j);y.on(this._div,"wheel",b1);y.on(this._div,"mousewheel",b1);this._map.addEventListener("resize",function(){e._adjustDisplayHeight()})};ex.prototype._adjustDisplayHeight=function(){if(!this._indoorInfo){return}var fs=this._map.getSize().height;var ft=this._sizeConfig.FLOOR_BTN_HEIGHT;var fu=fs-291-100;if(this._isMobile){fu=fs-12-108-this._map.config.bottomOffset}var e=this._indoorInfo.floors.length;var fp=e*ft;var fq=e;var fw=0;var fx=this._floorsContainer.children[0];if(fp>fu){this._showArrow=true;y.rc(fx.children[0].children[0],"top-border-radius");y.rc(fx.children[e-1].children[0],"bottom-border-radius")}else{this._showArrow=false;y.ac(fx.children[0].children[0],"top-border-radius");y.ac(fx.children[e-1].children[0],"bottom-border-radius")}while(fp>fu){if(fq===0){break}fq--;fw=2*this._sizeConfig.SWITCH_ARROW_HEIGHT;fp=fq*ft+fw}this._currentDisplayHeight=fp;if(fq<3){this._setAdjustVisbile(false)}else{this._setAdjustVisbile(true)}this._floorsContainer.style.height=fq*ft+"px";var fr=this._indoorInfo.currentFloor;var i=e-fr;var fv=fr-1;this._div.style.height=parseInt(this._floorsContainer.style.height,10)+fw+"px";var fy=-(e-(fr+Math.round(fq/2)))*ft;this._setBarSliderTop(fy);if(fq=i*fp){fq=e-i*fp;y.ac(this._btnBottom,"disable");y.rc(this._btnBottom,"hover");this._btnBottom._disable=true}else{y.rc(this._btnBottom,"disable");this._btnBottom._disable=false}if(fq>=0){fq=0;y.ac(this._btnTop,"disable");y.rc(this._btnTop,"hover");this._btnTop._disable=true}else{y.rc(this._btnTop,"disable");this._btnTop._disable=false}this._ol.style.top=fq+"px"};ex.prototype._setAdjustVisbile=function(e){if(this._adjustVisible===e){return}this._adjustVisible=e;if(e&&this._visible){this._div.style.right="20px"}else{this._div.style.right="-30px"}};ex.prototype._bind=function(){var i=this._map;var e=this;i.on("indoor_status_changed",function(fu){if(e._visible===false){return}var fp=e._ol;var fs=fu.uid;if(!fs){return}var ft=fu.floor;for(var fr=0;fr=1.5?2:1;this._imgPath=ds.imgPath+"earth-navi-control-pc4"+(this._imgRatio===2?"-2x.png":".png");this._enabled=true;var e=this;this._setHeadingOptions={callback:function(){e._target.setLock(false)}};this._init()}y.extend(fh.prototype,{_init:function(){this._createDom();this._render();this._bindDom();this._bind();this._updateUI();this._checkEnable()},_checkEnable:function(){if(this._target.getZoom()>=this._target._enableHeadingZoom){this.enable()}else{this.disable()}},_createDom:function(){var i=this._div=J("div");var e=i.style;e.position="absolute";e.zIndex=5;e.top="0";e.left="0";e.width="52px";e.height="54px";e.background="url("+this._imgPath+") no-repeat";e.backgroundSize="266px auto";this._rotateCCW=this._createButton();this._rotateCCW.title="逆时针转动";e=this._rotateCCW.style;e.left="2px";e.top="5px";e.zIndex="1";e.width="15px";e.height="42px";e.backgroundPosition="-75px -5px";this._rotateCW=this._createButton();this._rotateCW.title="顺时针转动";e=this._rotateCW.style;e.right="2px";e.top="5px";e.zIndex="1";e.width="15px";e.height="42px";e.backgroundPosition="-75px -5px";e.WebkitTransform=e.transform="scaleX(-1)";this._compass=this._createButton();this._compass.title="恢复正北方向";e=this._compass.style;e.left="19px";e.top="4px";e.width="14px";e.height="44px";e.backgroundPosition="-56px -4px";e.WebkitTransform=e.transform="rotate(0deg)";this._div.appendChild(this._rotateCCW);this._div.appendChild(this._compass);this._div.appendChild(this._rotateCW);this._domRendered=true},_createButton:function(){var e=J("button");var i=e.style;i.position="absolute";i.outline="none";i.border="none";i.background="url("+this._imgPath+") no-repeat";i.backgroundSize="266px auto";i.cursor="pointer";return e},_render:function(){this._outContainer.appendChild(this._div)},enable:function(){this._enabled=true;if(this._domRendered){this._rotateCCW.style.cursor="pointer";this._rotateCCW.style.opacity=1;this._rotateCW.style.cursor="pointer";this._rotateCW.style.opacity=1;this._compass.style.cursor="pointer";this._compass.style.opacity=1}},disable:function(){this._enabled=false;if(this._domRendered){this._rotateCCW.style.cursor="";this._rotateCCW.style.opacity=0.4;this._rotateCW.style.cursor="";this._rotateCW.style.opacity=0.4;this._compass.style.cursor="";this._compass.style.opacity=0.4}},_bindDom:function(){c9(this._div,["mousedown","click","dblclick"]);var i=this._map;var e=this;this._rotateCW.addEventListener("click",function(){if(e._isOperating||e._enabled===false){return}if(e._target.getLock()){return}if(e._target.getHeading()===360){e._target.setHeading(0)}e._target.setLock(true);e._target.setHeading(e._target.getHeading()+90,e._setHeadingOptions);i.fire(new aD("onrotatecwclick"))},false);this._rotateCCW.addEventListener("click",function(){if(e._isOperating||e._enabled===false){return}if(e._target.getLock()){return}if(e._target.getHeading()===-360){e._target.setHeading(0)}e._target.setLock(true);e._target.setHeading(e._target.getHeading()-90,e._setHeadingOptions);i.fire(new aD("onrotateccwclick"))},false);this._rotateCW.addEventListener("mouseover",function(){if(e._enabled===false){return}this.style.backgroundPosition="-89px -5px"},false);this._rotateCW.addEventListener("mouseout",function(){if(e._enabled===false){return}this.style.backgroundPosition="-75px -5px"},false);this._rotateCCW.addEventListener("mouseover",function(){if(e._enabled===false){return}this.style.backgroundPosition="-89px -5px"},false);this._rotateCCW.addEventListener("mouseout",function(){if(e._enabled===false){return}this.style.backgroundPosition="-75px -5px"},false);this._compass.addEventListener("click",function(){if(e._isOperating||e._enabled===false){return}if(e._target.getLock()){return}e._target.setLock(true);var fp=false;if(e._target.getTilt()!==0){fp=true;e._target.setTilt(0,e._setHeadingOptions)}if(e._target.getHeading()%360!==0){fp=true;e._target.resetHeading(e._setHeadingOptions)}if(!fp){e._target.setLock(false)}i.fire(new aD("oncompassclick"))},false)},_bind:function(){var e=this;this._bindTarget(this._target);if(this._map._renderType==="webgl"){this._map.addEventListener("maptypechange",function(i){if(this.mapType==="B_EARTH_MAP"){e._target=e._map._earth}else{e._target=e._map}e._bindTarget(e._target);e._checkEnable()})}},_bindTarget:function(i){if(i===this._map&&this._mapBinded){return}if(i===this._map._earth&&this._earthBinded){return}var e=this;i.addEventListener("heading_changed",function(fp){e._updateUI()});i.addEventListener("animation_start",function(fp){e._isOperating=true});i.addEventListener("animation_end",function(fp){e._isOperating=false});i.on("load",function(){e._checkEnable()});i.on("zoom_changed",function(){e._checkEnable()});if(i===this._map){this._mapBinded=true}else{this._earthBinded=true}},_updateUI:function(){var e=this._target.getHeading();var i=this._compass.style;i.WebkitTransform=i.transform="rotate("+e+"deg)"},hide:function(){this._div.style.display="none"},show:function(){this._div.style.display="block"}});function cY(fp,i){this._map=fp;this._target=fp;var fq=fp.temp.originMapType||fp.mapType;if(fq==="B_EARTH_MAP"&&fp._earth){this._target=fp._earth}this._outContainer=i||fp.getContainer();this._imgRatio=aA()>=1.5?2:1;this._imgPath=ds.imgPath+"gl-navi-control-pc4"+(this._imgRatio===2?"-2x.png":".png");this._enabled=true;var e=this;this._setTiltOptions={callback:function(){e._target.setLock(false)}};this._init()}y.extend(cY.prototype,{_init:function(){this._createDom();this._render();this._bindDom();this._bind();this._checkEnable()},_checkEnable:function(){if(this._target.getZoom()>=this._target._enableTiltZoom){this.enable()}else{this.disable()}},_createDom:function(){var e=this._div=J("button");e.title="倾斜";var i=e.style;i.position="absolute";i.zIndex=5;i.outline="none";i.border="none";i.cursor="pointer";i.width="26px";i.height="26px";i.top="56px";i.right="13px";i.background="url("+this._imgPath+") no-repeat #fff";i.backgroundSize="266px auto";i.backgroundPosition="-110px 1px";i.boxShadow="1px 2px 1px rgba(0, 0, 0, 0.15)"},enable:function(){this._enabled=true;if(this._div){this._div.style.cursor="pointer"}this._updateUI()},disable:function(){this._enabled=false;if(this._div){this._div.style.cursor=""}this._updateUI()},_render:function(){this._outContainer.appendChild(this._div)},_bindDom:function(){var e=this;this._div.addEventListener("mousedown",function(fq){if(!e._enabled){return}if(e._target.getLock()){return}var i=e._target.getTilt();var fp;if(i===e._map.getCurrentMaxTilt()){fp="out"}else{if(i===0){fp="in"}else{fp=e._preTrend?e._preTrend:"in"}}e._curTrend=fp;e._clickTimer=setTimeout(function(){e._map.fire(new aD("ontiltmsdown"));e._tiltAni=new m({duration:9999999,render:function(fr){i=e._target.getTilt();if(fp==="in"&&i0){e._target.setTilt(i-1,{noAnimation:true})}}},finish:function(){e._tiltAni=null}});e._clickTimer=null},200);fq.stopPropagation()},false);this._div.addEventListener("mouseup",function(i){if(!e._enabled){return}if(e._tiltAni){e._tiltAni.stop()}e._preTrend=e._curTrend},false);this._div.addEventListener("click",function(fq){if(!e._enabled){return}if(!e._clickTimer){return}if(e._target.getLock()){return}clearTimeout(e._clickTimer);e._map.fire(new aD("ontiltclick"));var i=e._target.getTilt();e._target.setLock(true);fq.stopPropagation();var fp=e._map.getCurrentMaxTilt();if(e._curTrend==="in"){e._target.setTilt(fp,e._setTiltOptions)}else{if(e._curTrend==="out"){e._target.setTilt(0,e._setTiltOptions)}else{if(i0){i=78}if(this._mouseOver){e=52}if(this._enabled===false){fq=26;e=0;i=0}var fr="-"+(110+i+fq+e)+"px 1px";this._div&&(this._div.style.backgroundPosition=fr);if(this._enabled){if(fp>0){this._div&&(this._div.title="恢复")}else{this._div&&(this._div.title="倾斜")}}else{this._div&&(this._div.title="请放大地图后操作")}},hide:function(){this._div.style.display="none"},show:function(){this._div.style.display="block"}});function bn(i){cN.call(this);this._opts={container:null,cursor:"default"};this._opts=y.extend(this._opts,i);this._type="contextmenu";this._map=null;this._container;this._left=0;this._top=0;this._items=[];this._rItems=[];this._dividers=[];this._enable=true;this.curPixel=null;this.curPoint=null;this._isOpen=false;var e=this;cL.load("menu",function(){e._draw()})}bn.inherits(cN,"ContextMenu");y.extend(bn.prototype,{initialize:function(e){this._map=e},remove:function(){this._map=null},addItem:function(fr,e){if(!fr||fr._type!="menuitem"||fr._text==""||fr._width<=0){return}for(var fq=0,fp=this._items.length;fqthis._items.length-1){e=-1}fr._insertIndex=e;if(e===-1){this._items.push(fr);this._rItems.push(fr)}else{this._items.splice(e,0,fr);this._rItems.splice(e,0,fr)}},removeItem:function(fq){if(!fq||fq._type!="menuitem"){return}for(var fp=0,e=this._items.length;fpthis._items.length-1){e=-1}var i={_type:"divider",_dIndex:this._dividers.length,_insertIndex:e};this._dividers.push({dom:null});if(e===-1){this._items.push(i)}else{this._items.splice(e,0,i)}},removeSeparator:function(fp){if(!this._dividers[fp]){return}for(var fq=0,e=this._items.length;fqfp){this._items[fq]._dIndex--}}this._dividers.splice(fp,1)},getDom:function(){return this._container},show:function(){if(this._isOpen==true){return}this._isOpen=true},hide:function(){if(this._isOpen==false){return}this._isOpen=false},setCursor:function(e){if(!e){return}this._opts.cursor=e},getItem:function(e){return this._rItems[e]},enable:function(){this._enable=true},disable:function(){this._enable=false},showAt:function(){}});function dM(fp,fq,i){if(!fp||!fq||typeof fq!="function"){return}cN.call(this);this._opts={width:100,id:""};i=i||{};this._opts.width=(i.width*1)?i.width:100;this._opts.id=i.id?i.id:"";this._text=fp+"";this._callback=fq;this._map=null;this._type="menuitem";this._contextmenu=null;this._container=null;this._enabled=true;var e=this;cL.load("menu",function(){e._draw()})}dM.inherits(cN,"MenuItem");y.extend(dM.prototype,{initialize:function(e,i){this._map=e;this._contextmenu=i},remove:function(){this._contextmenu=null;this._map=null},setText:function(e){if(!e){return}this._text=e+""},getDom:function(){return this._container},enable:function(){this._enabled=true},disable:function(){this._enabled=false}});function cy(e,i){this.setSouthWest(e);this.setNorthEast(i)}y.extend(cy.prototype,{isEmpty:function(){return this.sw===null&&this.ne===null},equals:function(e){if(!e||e.isEmpty()||this.isEmpty()){return false}return this.sw.equals(e.sw)&&this.ne.equals(e.ne)},containsBounds:function(e){if(!e||e.isEmpty()||this.isEmpty()){return false}return(e.sw.lng>this.sw.lng&&e.ne.lngthis.sw.lat&&e.ne.latMath.max(this.sw.lng,this.ne.lng)||Math.max(fp.sw.lat,fp.ne.lat)Math.max(this.sw.lat,this.ne.lat)){return null}var fr=Math.max(this.sw.lng,fp.sw.lng);var i=Math.min(this.ne.lng,fp.ne.lng);var fq=Math.max(this.sw.lat,fp.sw.lat);var e=Math.min(this.ne.lat,fp.ne.lat);return new cy(new e7(fr,fq),new e7(i,e))},setMinMax:function(){this.minX=this.sw?this.sw.lng:null;this.minY=this.sw?this.sw.lat:null;this.maxX=this.ne?this.ne.lng:null;this.maxY=this.ne?this.ne.lat:null},containsPoint:function(e){if(!e){return}return(e.lng>=this.sw.lng&&e.lng<=this.ne.lng&&e.lat>=this.sw.lat&&e.lat<=this.ne.lat)},extend:function(e){if(!e){return}var i=e.lng;var fp=e.lat;if(!this.sw){this.sw=e.clone()}if(!this.ne){this.ne=e.clone()}if(this.sw.lng>i){this.sw.lng=i}if(this.ne.lngfp){this.sw.lat=fp}if(this.ne.lat=0&&e<90||e>=270&&e<360){if(this.normalizedTopRight.lng=this.MCBAND[fs]){ft=this.MC2LL[fs];break}}var fu=this.convertor(e,ft);return new bV(fu.lat,fu.lng)},convertLL2MC:function(e){if(!e){return new e7(0,0)}var fq=e.lat;var fs=e.lng;fs=this.getLoop(e.lng,-180,180);fq=dQ(fq,-85,85);if(dk.isWgs84){var fw={};var fx=6378137;fw.lng=fs*Math.PI/180*fx;var fu=fq*Math.PI/180;fw.lat=fx/2*Math.log((1+Math.sin(fu))/(1-Math.sin(fu)));var fy=new e7(fw.lng,fw.lat);fy.latLng=e.clone();return fy}var fr;for(var fp=0;fp=this.LLBAND[fp]){fr=this.LL2MC[fp];break}}if(!fr){for(fp=0;fpe){fp-=e-i}while(fp90){i=90}}while(e<-180){e+=360}while(e>180){e-=360}this.lat=i||0;this.lng=e||0}y.extend(bV.prototype,{equals:function(e){return(this.lat===e.lat&&this.lng===e.lng)},clone:function(){return new bV(this.lat,this.lng)},getLngSpan:function(e){var i=this.lng;var fp=Math.abs(e-i);if(fp>180){fp=360-fp}return fp},sub:function(e){return new bV(this.lat-e.lat,this.lng-e.lng)},toString:function(){return this.lat+", "+this.lng}});function c7(e,i){if(e&&!i){i=e}this._sw=this._ne=null;this._swLng=this._swLat=null;this._neLng=this._neLat=null;if(e){this._sw=new bV(e.lat,e.lng);this._ne=new bV(i.lat,i.lng);this._swLng=e.lng;this._swLat=e.lat;this._neLng=i.lng;this._neLat=i.lat}}y.extend(c7.prototype,{isEmpty:function(){return !this._sw||!this._ne},equals:function(e){if(this.isEmpty()){return false}return this.getSouthWest().equals(e.getSouthWest())&&this.getNorthEast().equals(e.getNorthEast())},getSouthWest:function(){return this._sw},getNorthEast:function(){return this._ne},containsBounds:function(e){if(this.isEmpty()||e.isEmpty()){return false}return(e._swLng>this._swLng&&e._neLngthis._swLat&&e._neLatMath.max(this._swLng,this._neLng)||Math.max(fp._swLat,fp._neLat)Math.max(this._swLat,this._neLat)){return false}var fr=Math.max(this._swLng,fp._swLng);var i=Math.min(this._neLng,fp._neLng);var fq=Math.max(this._swLat,fp._swLat);var e=Math.min(this._neLat,fp._neLat);this._sw=new bV(fq,fr);this._ne=new bV(e,i);this._swLng=fr;this._swLat=fq;this._neLng=i;this._neLat=e;return true},containsPoint:function(e){if(this.isEmpty()){return false}return(e.lng>=this._swLng&&e.lng<=this._neLng&&e.lat>=this._swLat&&e.lat<=this._neLat)},extend:function(e){var i=e.lng;var fp=e.lat;if(!this._sw){this._sw=new bV(0,0)}if(!this._ne){this._ne=new bV(0,0)}if(!this._swLng||this._swLng>i){this._sw.lng=this._swLng=i}if(!this._neLng||this._neLngfp){this._sw.lat=this._swLat=fp}if(!this._neLat||this._neLate.lat){this._swLat=e.lat}if(this._swLng>e.lng){this._swLng=e.lng}if(this._neLat",_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(i){if(!this._map){this._map=i}if(!this._map){return}var e=this._maskElement=ct(this._map.container,this._html);y.on(e,"mouseup",function(fp){if(fp.button==2){b1(fp)}});y.on(e,"contextmenu",b1);e.style.display="none"},getDrawPoint:function(fq,ft,fr){fq=window.event||fq;var i=fq.offsetX||fq.layerX||0;var fs=parseInt(fq.offsetY)||parseInt(fq.layerY)||0;var fp=fq.target||fq.srcElement;if(fp!=cR.getDom(this._map)&&ft==true){while(fp&&fp!=this._map.container){if(!(fp.clientWidth==0&&fp.clientHeight==0&&fp.offsetParent&&fp.offsetParent.nodeName.toLowerCase()=="td")){i+=fp.offsetLeft;fs+=fp.offsetTop}fp=fp.offsetParent}}if(fp!=cR.getDom(this._map)&&fp!=this._map.container){return}if(typeof i==="undefined"||typeof fs==="undefined"){return}if(isNaN(i)||isNaN(fs)){return}if(fr){i=i+fr.x;fs=fs+fr.y}return this._map.pixelToPoint(new cS(i,fs))},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 aJ(){this._type="overlay"}aJ.inherits(y.BaseClass,"Overlay");aJ.getZIndex=function(i,e){i=i*1;if(!i){return 0}if(e){i=cU.convertMC2LL(new e7(0,i)).lat}return(i*-100000)<<1};y.extend(aJ.prototype,{_i:function(e){this._map=e;if(!this.domElement&&a9(this.initialize)){this.domElement=this.initialize(e);if(this.domElement){this.domElement.style.WebkitUserSelect="none"}}this.draw()},initialize:function(e){throw"initialize方法未实现"},draw:function(){throw"draw方法未实现"},remove:function(){this._map=null;if(this.domElement&&this.domElement.parentNode){this.domElement.parentNode.removeChild(this.domElement)}this.domElement=null;this.dispatchEvent(new aD("onremove"))},hide:function(){this._visible=false;y.hide(this.domElement)},show:function(){this._visible=true;y.show(this.domElement)},getMap:function(){return this._map},dispose:function(){y.BaseClass.prototype.decontrol.call(this)}});function bM(){y.BaseClass.call(this);aJ.call(this);this._visible=true;this._visibleInternal=true;this.infoWindow=null;this._dblclickTime=0}bM.inherits(aJ,"OverlayInternal");y.extend(bM.prototype,{initialize:function(e){this.map=e;y.BaseClass.call(this,this.hashCode);return null},draw:function(){},remove:function(){this.map=null;this.decontrol();aJ.prototype.remove.call(this)},hide:function(){this._visible=false},show:function(){this._visible=true},getDom:function(){return this.domElement},getContainer:function(){return this.domElement},setClassName:function(){},setConfig:function(i){if(!i){return}for(var e in i){if(i.hasOwnProperty(e)){this._config[e]=i[e]}}},getPoint:function(fp,fq){if(!fp){return this.point}else{var e=fq?fq.width:0;var fr=fq?fq.height:0;if(this.map){var i=this.map.pointToPixel(this.point);if(this._config&&this._config.offset){i.x=i.x+this._config.offset.width+e;i.y=i.y+this._config.offset.height+fr}else{i.x=i.x+e;i.y=i.y+fr}return this.map.pixelToPoint(i)}}},setZIndex:function(e){this.zIndex=e},isVisible:function(){if(!this.domElement){return false}return !!this._visible},enableMassClear:function(){this._config.enableMassClear=true},disableMassClear:function(){this._config.enableMassClear=false},showInternal:function(){this._visibleInternal=true},hideInternal:function(e){this._visibleInternal=false;this._hideInternalReason=e}});function dl(e){this.map=e;this._overlays={};this._overlayArray=[];this._customOverlays=[];e._overlays=this._overlays;e._overlayArray=this._overlayArray;e._customOverlays=this._customOverlays;this._zoomingOrMoving=false;this._init()}dl.prototype._init=function(){if(this.map._renderType!=="webgl"){this._createOverlayContainers()}else{this._createWebGLOverlayContainers()}this._bind()};dl.prototype._createOverlayContainers=function(){var e=this.map;e.temp.overlayDiv=e.overlayDiv=this._createOverlayDiv(e.platform,200);e.temp.overlayDivEx=e.overlayDivEx=this._createOverlayDiv(e.platform,50);e._panes.floatPane=this._createOverlayDiv(e.temp.overlayDiv,800);e._panes.markerMouseTarget=this._createOverlayDiv(e.temp.overlayDiv,700);e._panes.floatShadow=this._createOverlayDiv(e.temp.overlayDiv,600);e._panes.labelPane=this._createOverlayDiv(e.temp.overlayDiv,500);e._panes.markerPane=this._createOverlayDiv(e.temp.overlayDiv,400);if(e.isCanvasMap()){e._panes.mapPane=this._createOverlayDiv(e.temp.overlayDivEx,50)}else{e._panes.mapPane=this._createOverlayDiv(e.temp.overlayDiv,200)}};dl.prototype._createWebGLOverlayContainers=function(){var e=this.map;e.temp.overlayDiv=e.overlayDiv=this._createOverlayDiv(e.platform,200);e._panes.floatPane=this._createOverlayDiv(e.temp.overlayDiv,800);e._panes.markerMouseTarget=this._createOverlayDiv(e.temp.overlayDiv,700);e._panes.floatShadow=this._createOverlayDiv(e.temp.overlayDiv,600);e._panes.labelPane=this._createOverlayDiv(e.temp.overlayDiv,500);e._panes.markerPane=this._createOverlayDiv(e.temp.overlayDiv,400)};dl.prototype._createOverlayDiv=function(e,fq){var fp=J("div");var i=fp.style;i.position="absolute";i.top=i.left=i.width=i.height="0";i.zIndex=fq;e.appendChild(fp);return fp};dl.prototype._bind=function(){var fr=this.map;var fq=this;function i(ft){fq.draw(ft)}if(fr._renderType!=="webgl"){fr.addEventListener("load",i);fr.addEventListener("moveend",i);fr.addEventListener("resize",i);fr.addEventListener("zoomend",i);fr.addEventListener("zooming_inner",i)}else{fr.on("update",i)}fr.addEventListener("zoomend",function(ft){if(this.mapType==="B_EARTH_MAP"){if(this._earth.getZoom()0;ft--){if(fq._customOverlays[ft].enableMassClear!==false){this.removeOverlay(fq._customOverlays[ft]);fq._customOverlays.splice(ft,1)}}});fr.addEventListener("infowindowopen",function(fu){var ft=this.infoWindow;if(ft){y.hide(ft.popDom);y.hide(ft.shadowDom)}});function fp(){if(this.getMapType()==="B_EARTH_MAP"||this._renderType==="webgl"){if(fq._zoomingOrMoving===false){this._panes.markerMouseTarget.style.display="none";fq._zoomingOrMoving=true}}}function e(fv){if(this.getMapType()==="B_EARTH_MAP"||this._renderType==="webgl"){if(fq._zoomingOrMoving===true){this._panes.markerMouseTarget.style.display="";fq._zoomingOrMoving=false;for(var fu=0;fu1){this._config.strokeOpacity=1}if(this._config.fillOpacity<0||this._config.fillOpacity>1){this._config.fillOpacity=1}if(this._config.strokeStyle!=="solid"&&this._config.strokeStyle!=="dashed"&&this._config.strokeStyle!=="dotted"){this._config.strokeStyle="solid"}this.domElement=null;this._bounds=new cy();this.points=[];this.greatCirclePoints=[];this._parseCache=[];this._holesCache=[];this._parseCacheGL=[];this._parseCacheGLRaw=[];this._areaCacheGL=[];this._strokeStyleInfoForGL=[[]];this._fillStyleInfoForGL="";this.vertexMarkers=[];this._temp={}}t.JOININDEX={miter:0,round:1,bevel:2};t.CAPINDEX={round:0,butt:1,square:2};t.inherits(bM,"Graph");t.getGraphPoints=function(i){var e=[];if(!i||i.length===0){return e}if(typeof i==="string"){var fp=i.split(";");y.each(fp,function(fr){var fq=fr.split(",");e.push(new e7(fq[0],fq[1]))})}if(i.constructor===Array&&i.length>0){e=i}return e};t.parseTolerance={0:[0.09,0.005,0.0001,0.00001],1:[9000,500,20,1]};y.extend(t.prototype,{initialize:function(e){this.map=e;return null},draw:function(){},setPoints:function(e){this._clearCache();this.points=t.getGraphPoints(e).slice(0);this._calcBounds()},setPath:function(e){this.setPoints(e)},_calcBounds:function(){if(!this.points){return}var e=this;e._bounds=new cy();if(!this.hasMultipleParts){y.each(this.points,function(i){e._bounds.extend(i)})}else{y.each(this.points,function(i){y.each(i,function(fp){e._bounds.extend(fp)})})}},getPoints:function(){return this.points},getPath:function(){return this.points},setPointAt:function(i,e){if(!e||!this.points[i]){return}this._clearCache();this.points[i]=new e7(e.lng,e.lat);this._calcBounds()},setOptions:function(i){i=i||{};for(var e in i){if(i.hasOwnProperty(e)){this._config[e]=i[e]}}},setStrokeColor:function(e){this._config.strokeColor=e},getStrokeColor:function(){return this._config.strokeColor},setStrokeLineCap:function(e){this._config.strokeLineCap=e},getStrokeLineCap:function(){return this._config.strokeLineCap},setStrokeLineJoin:function(e){this._config.strokeLineJoin=e},getStrokeLineJoin:function(){return this._config.strokeLineJoin},setStrokeWeight:function(e){if(e>0){this._config.strokeWeight=e}},getStrokeWeight:function(){return this._config.strokeWeight},setStrokeOpacity:function(e){if(!e||e>1||e<0){return}this._config.strokeOpacity=e},getStrokeOpacity:function(){return this._config.strokeOpacity},setFillOpacity:function(e){if(e>1||e<0){return}this._config.fillOpacity=e},getFillOpacity:function(){return this._config.fillOpacity},setStrokeStyle:function(e){if(e!=="solid"&&e!=="dashed"&&e!=="dotted"){return}this._config.strokeStyle=e},getStrokeStyle:function(){return this._config.strokeStyle},setFillColor:function(e){this._config.fillColor=e||""},getFillColor:function(){return this._config.fillColor},getBounds:function(){this._bounds.setMinMax();return this._bounds},remove:function(){if(this.map){this.map.removeEventListener("onmousemove",this._graphMouseEvent)}bM.prototype.remove.call(this);this._clearCache();var e=new aD("onlineupdate");e.action="remove";e.overlay=this;this.fire(e)},enableEditing:function(){this._config.enableEditing=true},disableEditing:function(){this._config.enableEditing=false},getLength:function(){if(typeof this._length==="number"){return this._length}if(typeof this._config.totalLength==="number"){this._length=this._config.totalLength;return this._length}var fp=0;if(this.points.length<=1){this._length=0;return fp}for(var e=0;e0){fr=this.greatCirclePoints}var fs=this.getParseTolerance(e.getZoom(),e.config.coordType);if(!this.hasMultipleParts){var fv=fg(fr,fs)}else{var fv=[];for(var fp=0;fp1&&this.srcSetObject["2x"]){return this.srcSetObject["2x"]}return this.imageUrl};eT.prototype.setPrintImageUrl=function(e){if(!e){return}this.printImageUrl=e};eT.prototype.setSize=function(e){if(!e){return}this.size=new cK(e.width,e.height);this._renderData=null};eT.prototype.setOffset=function(e){if(!e){return}this.anchor=this.offset=new cK(e.width,e.height);this._renderData=null};eT.prototype.setAnchor=function(e){this.setOffset(e)};eT.prototype.setImageOffset=function(e){if(!e){return}this.imageOffset=new cK(e.width,e.height);this._renderData=null};eT.prototype.setInfoWindowOffset=function(e){if(!e){return}this.infoWindowOffset=new cK(e.width,e.height)};eT.prototype.setImageSize=function(e){if(!e){return}this.imageSize=new cK(e.width,e.height)};eT.prototype.setImageSrcset=function(fp){var e="";if(!fp){return}for(var i in fp){if(fp.hasOwnProperty(i)){this.srcSetObject[i]=fp[i];e=fp[i]+" "+i+","}}this.srcSet=e};eT.prototype.toString=function(){return"Icon"};eT.prototype.generateRenderData=function(){var i=this.offset;var e=this.size;var fq=this.imageOffset;var fp=[];fp.push(-i.width,i.height-e.height,0);fp.push(e.width-i.width,i.height-e.height,0);fp.push(e.width-i.width,i.height,0);fp.push(-i.width,i.height-e.height,0);fp.push(e.width-i.width,i.height,0);fp.push(-i.width,i.height,0);return{vertex:fp}};eT.prototype.getRenderData=function(){if(!this._renderData){this._renderData=this.generateRenderData()}return this._renderData};function Y(fp,i){y.BaseClass.call(this);this.content=fp;this.map=null;this._config={width:0,height:0,maxWidth:600,offset:new cK(0,0),title:"",maxContent:"",enableMaximize:false,enableAutoPan:true,enableCloseOnClick:true,margin:[10,10,40,10],collisions:[[10,10],[10,10],[10,10],[10,10]],ifMaxScene:false,onClosing:function(){return true}};this.setConfig(i);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=ds.imgPath;this.overlay=null;var e=this;cL.load("infowindow",function(){e._draw()})}Y.inherits(y.BaseClass,"InfoWindow");y.extend(Y.prototype,{setWidth:function(e){e=e*1;if(!e&&e!=0||isNaN(e)||e<0){return}if(e!=0){if(e<220){e=220}if(e>730){e=730}}this._config.width=e},setHeight:function(e){e=e*1;if(!e&&e!=0||isNaN(e)||e<0){return}if(e!=0){if(e<60){e=60}if(e>650){e=650}}this._config.height=e},setMaxWidth:function(e){e=e*1;if(!e&&e!=0||isNaN(e)||e<0){return}if(e!=0){if(e<220){e=220}if(e>730){e=730}}this._config.maxWidth=e},setTitle:function(e){this._config.title=e||""},setContent:function(e){this.content=e||""},setMaxContent:function(e){this._config.maxContent=e||""},redraw:function(){},enableAutoPan:function(){this._config.enableAutoPan=true},disableAutoPan:function(){this._config.enableAutoPan=false},enableCloseOnClick:function(){this._config.enableCloseOnClick=true},disableCloseOnClick:function(){this._config.enableCloseOnClick=false},enableMaximize:function(){this._config.enableMaximize=true},disableMaximize:function(){this._config.enableMaximize=false},show:function(){this._visible=true},hide:function(){this._visible=false},close:function(){this.hide()},dispose:function(){y.BaseClass.prototype.decontrol.call(this)},maximize:function(){this.isWinMax=true},restore:function(){this.isWinMax=false},setConfig:function(i){if(!i){return}for(var e in i){if(typeof(this._config[e])==typeof(i[e])){this._config[e]=i[e]}}},isVisible:function(){return this.isOpen()},isOpen:function(){return false},getPoint:function(){if(this.overlay&&this.overlay.getPoint){return this.overlay.getPoint()}},getOffset:function(){return this._config.offset},dispose:function(){y.BaseClass.prototype.decontrol.call(this)},toString:function(){return"InfoWindow"}});bY.prototype.openInfoWindow=function(fq,e){if(!fq||fq.toString()!="InfoWindow"||!e||e.toString()!="Point"){return}var i=this.temp;if(!i.marker){var fp=new eT(ds.imgPath+"blank.gif",{width:1,height:1});i.marker=new cc(e,{icon:fp,width:1,height:1,offset:new cK(0,0),infoWindowOffset:new cK(0,0),clickable:false});i.marker._fromMap=1}else{i.marker.setPoint(e)}this.addOverlay(i.marker);i.marker.show();i.marker.openInfoWindow(fq)};bY.prototype.closeInfoWindow=function(){var e=this.temp.infoWin||this.temp._infoWin;if(e&&e.overlay){e.overlay.closeInfoWindow()}};bM.prototype.openInfoWindow=function(e){if(this.map){this.map.closeInfoWindow();e._visible=true;this.map.temp._infoWin=e;e.overlay=this;y.BaseClass.call(e,e.hashCode)}};bM.prototype.closeInfoWindow=function(){if(this.map&&this.map.temp._infoWin){this.map.temp._infoWin._visible=false;this.map.temp._infoWin.decontrol();this.map.temp._infoWin=null}};function ak(fp,i){bM.call(this);this.content=fp;this.map=null;this.domElement=null;this._config={width:0,offset:new cK(0,0),styles:{backgroundColor:"#fff",border:"1px solid #f00",padding:"1px",whiteSpace:"nowrap",fontSize:"12px",zIndex:"80",MozUserSelect:"none"},point:null,enableMassClear:true};i=i||{};this.setConfig(i);if(this._config.width<0){this._config.width=0}this.point=this._config.point;var e=this;cL.load("marker",function(){e._draw()})}ak.inherits(bM,"Label");y.extend(ak.prototype,{setPoint:function(e){if(e&&e.toString()==="Point"&&!this.getMarker()){this.point=this._config.point=new e7(e.lng,e.lat)}},setContent:function(e){this.content=e},setOpacity:function(e){if(e>=0&&e<=1){this._config.opacity=e}},setOffset:function(e){if(!e||e.toString()!=="Size"){return}this._config.offset=new cK(e.width,e.height)},getOffset:function(){return this._config.offset},setStyle:function(e){e=e||{};this._config.styles=y.extend(this._config.styles,e)},setStyles:function(e){this.setStyle(e)},setTitle:function(e){this._config.title=e||""},getTitle:function(){return this._config.title},setMarker:function(e){if(this._marker&&this._marker!==e){this._marker._config.label=null}this._marker=e;if(e){this.point=this._config.point=e.getPoint()}else{this.point=this._config.point=null}},getMarker:function(){return this._marker||null}});window.BMAP_ANIMATION_DROP=1;window.BMAP_ANIMATION_BOUNCE=2;function cc(e,i){bM.call(this);i=i||{};this.point=e;this.latLng=cU.convertMC2LL(e);this._rotation=0;this.map=null;this._animation=null;this.domElement=null;this.iconDom=null;this.infoWindowDom=null;this.siblingElement=null;this.textureCoord=null;this.textureCoordGLMap=null;this.collisionDetectionFailed=false;this._config={offset:new cK(0,0),opacity:1,icon:null,title:"",infoWindow:null,label:null,baseZIndex:0,clickable:true,zIndexFixed:false,isTop:false,enableMassClear:true,enableDragging:false,raiseOnDrag:false,restrictDraggingArea:false,startAnimation:"",enableCollisionDetection:false,rank:0,enableDraggingMap:false};this.setConfig(i);if(!i.icon){this._config.icon=new eT(ds.imgPath+"marker_red.png",new cK(23,25),{offset:new cK(10,25),infoWindowOffset:new cK(10,0)})}this._isDragging=false;var fp=this;cL.load("marker",function(){fp._draw()})}cc.TOP_ZINDEX=aJ.getZIndex(-90)+1000000;cc.DRAG_ZINDEX=cc.TOP_ZINDEX+1000000;cc._injectMethond=function(e){y.extend(cc.prototype,e)};cc.inherits(bM,"Marker");y.extend(cc.prototype,{setIcon:function(e){if(e){this._config.icon=e;this.textureCoord=this.textureCoordGLMap=null}},getIcon:function(){return this._config.icon},setLabel:function(e){if(!e){return}this._config.label=e;e._config.enableMassClear=this._config.enableMassClear;e.setPoint(this.point)},getLabel:function(){return this._config.label},enableDragging:function(){this._config.enableDragging=true},disableDragging:function(){this._config.enableDragging=false},setPoint:function(e){if(e){this.point=this._config.point=new e7(e.lng,e.lat);this.latLng=cU.convertMC2LL(e)}},setPosition:function(e){this.setPoint(e)},getPosition:function(){return this.getPoint()},setTop:function(i,e){this._config.isTop=!!i;if(i){this._addi=e||0}},setTitle:function(e){this._config.title=e||""},getTitle:function(){return this._config.title},setOffset:function(e){if(e){this._config.offset=e}},getOffset:function(){return this._config.offset},setAnimation:function(e){this._animation=e},setRank:function(e){this._config.rank=e},getRank:function(){return this._config.rank},setRotation:function(e){while(e<0){e+=360}this._rotation=e%360},getRotation:function(){return this._rotation}});function a(fp,e){t.call(this,e);this.setPoints(fp);var i=this;cL.load("poly",function(){i._draw()})}a.inherits(t,"Polyline");function dF(e,fp){t.call(this,fp);this._normalizedBounds=new cy();this.setPoints(e);var i=this;cL.load("poly",function(){i._draw()})}dF.inherits(a,"PolylineMultipart");y.extend(dF.prototype,{setPoints:function(e){if(!e){return}this._clearCache();this.points=this._unifyArgs(e);this._calcBounds()},_unifyArgs:function(fp){var e=[];var i=[];if(fp.constructor===Array){if(fp[0].constructor===e7){i.push(fp)}else{i=fp}}else{if(typeof fp==="string"){i.push(fp)}}y.each(i,function(fq){e.push(t.getGraphPoints(fq))});return e},setPointAt:function(i,e,fp){fp=fp||0;if(!e||!this.points[fp]||!this.points[fp][i]){return}this._clearCache();this.points[fp][i]=new e7(e.lng,e.lat);this._calcBounds()},getBounds:function(e){if(!e){this._bounds.setMinMax();return this._bounds}this._normalizedBounds.setMinMax();return this._normalizedBounds},_calcBounds:function(){if(!this.points){return}var e=this;e._bounds.setNorthEast(null);e._bounds.setSouthWest(null);if(e.greatCirclePoints&&e.greatCirclePoints.length>0){y.each(e.greatCirclePoints,function(i){e._bounds.extend(i)})}else{y.each(e.points,function(i){y.each(i,function(fp){e._bounds.extend(fp)})})}e._normalizedBounds.setSouthWest(e._bounds.getSouthWest());e._normalizedBounds.setNorthEast(e._bounds.getNorthEast());if(e._normalizedBounds.sw.lng<-bY.WORLD_SIZE_MC_HALF||e._normalizedBounds.ne.lng>bY.WORLD_SIZE_MC_HALF){e._normalizedBounds.sw.lng=-bY.WORLD_SIZE_MC_HALF;e._normalizedBounds.ne.lng=bY.WORLD_SIZE_MC_HALF}}});function an(fp,e){t.call(this,e);e=e||{};if(typeof e.fillOpacity==="number"){this._config.fillOpacity=e.fillOpacity}else{this._config.fillOpacity=0.6}dQ(this._config.fillOpacity,0,1);if(e.fillColor===""){this._config.fillColor=""}else{this._config.fillColor=e.fillColor?e.fillColor:"#fff"}this._parseFillCacheWebGL=[];this.setPoints(fp,e);var i=this;cL.load("poly",function(){i._draw()})}an.inherits(t,"Polygon");y.extend(an.prototype,{setPoints:function(fs){var fq=[];if(typeof fs==="string"||fs[0] instanceof e7||this instanceof ed||fs.length===0){var e=this._processSinglePointArray(fs);this._userPoints=e.userPoints;fq=e.innerPoints;this.hasMultipleParts=false}else{this._userPoints=[];for(var fr=0;fr1&&!innerPoints[0].equals(innerPoints[innerPoints.length-1])){innerPoints.push(new e7(innerPoints[0].lng,innerPoints[0].lat))}return{userPoints:i,innerPoints:innerPoints}},setPointAt:function(i,e){if(!this._userPoints[i]){return}this._userPoints[i]=new e7(e.lng,e.lat);this.points[i]=new e7(e.lng,e.lat);if(i===0&&!this.points[0].equals(this.points[this.points.length-1])){this.points[this.points.length-1]=new e7(e.lng,e.lat)}this._calcBounds()},getPoints:function(){var e=this._userPoints;if(e.length===0){e=this.points}return e},getPath:function(){return this.getPoints()}});function ed(i,e,fp){this.point=i;this.radius=Math.abs(e);an.call(this,[],fp)}ed.parseTolerance={0:[0.01,0.0001,0.00001,0.000004],1:[1000,10,1,0.4]};ed.inherits(an,"Circle");y.extend(ed.prototype,{initialize:function(e){this.map=e;this.points=this._getPerimeterPoints(this.point,this.radius);this._calcBounds();return null},getPoint:function(){return this.point},setPoint:function(e){if(!e){return}this.point=e},setCenter:function(e){var i=arguments[1];this.setPoint(e,i)},setRadius:function(e){this.radius=Math.abs(e)},getCenter:function(){return this.point},getRadius:function(){return this.radius},_getPerimeterPoints:function(e,fx){if(!e||!fx||!this.map){return[]}var fp=this.map;var fu=e.lng;var fs=e.lat;var fD=cU.convertMC2LL(e);fu=fD.lng;fs=fD.lat;var fE=[];var fz=fx/cU.EARTHRADIUS;var fw=(Math.PI/180)*fs;var fC=(Math.PI/180)*fu;for(var fv=0;fv<360;fv+=9){var ft=(Math.PI/180)*fv;var fA=Math.asin(Math.sin(fw)*Math.cos(fz)+Math.cos(fw)*Math.sin(fz)*Math.cos(ft));var fy=Math.atan2(Math.sin(ft)*Math.sin(fz)*Math.cos(fw),Math.cos(fz)-Math.sin(fw)*Math.sin(fA));var fB=((fC-fy+Math.PI)%(2*Math.PI))-Math.PI;var fr=new bV(fA*(180/Math.PI),fB*(180/Math.PI));fE.push(cU.convertLL2MC(fr))}var fq=fE[0];fE.push(new e7(fq.lng,fq.lat));if(fq){this._radiusMercator=Math.sqrt(Math.pow(fq.lng-this.point.lng,2)+Math.pow(fq.lat-this.point.lat,2))}else{this._radiusMercator=this.radius}return fE}});var aU={};function fi(fp,i){y.BaseClass.call(this);this.content=fp;this.map=null;this._config={width:0,height:0,maxWidth:600,offset:new cK(0,0),title:"",maxContent:"",enableMaximize:false,enableAutoPan:true,enableCloseOnClick:true,margin:[10,10,40,10],collisions:[[10,10],[10,10],[10,10],[10,10]],ifMaxScene:false,onClosing:function(){return true}};this.setConfig(i);if(this._config.width<50){this._config.width=50}if(this._config.width>730){this._config.width=730}if(this._config.height!=0){if(this._config.height<50){this._config.height=50}if(this._config.height>650){this._config.height=650}}if(this._config.maxWidth!==0){if(this._config.maxWidth<50){this._config.maxWidth=50}if(this._config.maxWidth>730){this._config.maxWidth=730}}this.isWinMax=false;this.IMG_PATH=ds.imgPath;this.overlay=null;var e=this;cL.load("simpleInfowindow",function(){e._draw()})}fi.inherits(y.BaseClass,"SimpleInfoWindow");y.extend(fi.prototype,{setWidth:function(e){e=e*1;if(!e&&e!=0||isNaN(e)||e<0){return}if(e!=0){if(e<50){e=50}if(e>730){e=730}}this._config.width=e},setHeight:function(e){e=e*1;e-=10;if(!e&&e!=0||isNaN(e)||e<0){return}if(e!=0){if(e<50){e=50}if(e>650){e=650}}this._config.height=e},setMaxWidth:function(e){e=e*1;if(!e&&e!=0||isNaN(e)||e<0){return}if(e!=0){if(e<50){e=50}if(e>730){e=730}}this._config.maxWidth=e},setTitle:function(e){this._config.title=e||""},setContent:function(e){this.content=e||""},setMaxContent:function(e){this._config.maxContent=e||""},redraw:function(){},enableAutoPan:function(){this._config.enableAutoPan=true},disableAutoPan:function(){this._config.enableAutoPan=false},enableCloseOnClick:function(){this._config.enableCloseOnClick=true},disableCloseOnClick:function(){this._config.enableCloseOnClick=false},enableMaximize:function(){this._config.enableMaximize=true},disableMaximize:function(){this._config.enableMaximize=false},show:function(){this._visible=true},hide:function(){this._visible=false},close:function(){this.hide()},dispose:function(){y.BaseClass.prototype.decontrol.call(this)},maximize:function(){this.isWinMax=true},restore:function(){this.isWinMax=false},setConfig:function(i){if(!i){return}for(var e in i){if(typeof(this._config[e])==typeof(i[e])){this._config[e]=i[e]}}},isVisible:function(){return this.isOpen()},isOpen:function(){return false},getPoint:function(){if(this.overlay&&this.overlay.getPoint){return this.overlay.getPoint()}},getOffset:function(){return this._config.offset},dispose:function(){y.BaseClass.prototype.decontrol.call(this)},toString:function(){return"SimpleInfoWindow"}});bY.prototype.openSimpleInfoWindow=function(fq,e){if(!fq||fq.toString()!="SimpleInfoWindow"||!e||e.toString()!="Point"){return}var i=this.temp;if(!i.marker){var fp=new eT(ds.imgPath+"blank.gif",{width:1,height:1});i.marker=new cc(e,{icon:fp,width:1,height:1,offset:new cK(0,0),infoWindowOffset:new cK(0,0),clickable:false});i.marker._fromMap=1}else{i.marker.setPoint(e)}this.addOverlay(i.marker);i.marker.show();i.marker.openSimpleInfoWindow(fq)};bY.prototype.closeSimpleInfoWindow=function(){var e=this.temp.infoWin||this.temp._infoWin;if(e&&e.overlay){e.overlay.closeSimpleInfoWindow()}};bM.prototype.openSimpleInfoWindow=function(e){if(this.map){this.map.closeSimpleInfoWindow();e._visible=true;this.map.temp._infoWin=e;e.overlay=this;y.BaseClass.call(e,e.hashCode)}};bM.prototype.closeSimpleInfoWindow=function(){if(this.map&&this.map.temp._infoWin){this.map.temp._infoWin._visible=false;this.map.temp._infoWin.decontrol();this.map.temp._infoWin=null}};function cS(e,i){e=isNaN(e)?0:e;i=isNaN(i)?0:i;this.x=e;this.y=i}cS.prototype.equals=function(e){if(!e){return false}return e.x===this.x&&e.y===this.y};cS.prototype.clone=function(){return new cS(this.x,this.y)};cS.prototype.toString=function(){return"Pixel"};function cK(i,e){if(typeof i!=="number"){this.width=parseFloat(i)}else{this.width=i}if(typeof e!=="number"){this.height=parseFloat(e)}else{this.height=e}}cK.prototype.equals=function(e){return !!(e&&this.width===e.width&&this.height===e.height)};cK.prototype.toString=function(){return"Size"};var a0={B_NORMAL_MAP:{tileUrls:cX(ds.tileDomain,ds.rasterTilePath),vectorTileUrls:cX(ds.tileDomain,ds.vectorTilePath),tileSize:256,baseUnits:256,zoomLevelMin:3,zoomLevelMax:19,minDataZoom:3,maxDataZoom:19,minZoom:3,maxZoom:19,webgl:{minZoom:3,maxZoom:25},zoomLevelBase:18,errorUrl:ds.imgPath+"bg.png",bounds:new cy(new e7(-21364736,-11708041.66),new e7(23855104,12474104.17)),imgExtend:"png"},B_SATELLITE_MAP:{tileUrls:["https://maponline0.bdimg.com/starpic/?qt=satepc&","https://maponline1.bdimg.com/starpic/?qt=satepc&","https://maponline2.bdimg.com/starpic/?qt=satepc&","https://maponline3.bdimg.com/starpic/?qt=satepc&"],tileSize:256,baseUnits:256,zoomLevelMin:3,zoomLevelMax:19,minDataZoom:3,maxDataZoom:19,minZoom:3,maxZoom:19,zoomLevelBase:18,errorUrl:ds.imgPath+"bg.png",bounds:new cy(new e7(-21364736,-10616832),new e7(23855104,15859712)),imgExtend:"png"},B_STREET_MAP:{tileUrls:cX(ds.tileDomain,ds.rasterTilePath),tileSize:256,baseUnits:256,zoomLevelMin:3,zoomLevelMax:19,minDataZoom:3,maxDataZoom:19,minZoom:3,maxZoom:19,zoomLevelBase:18,errorUrl:ds.imgPath+"bg.png",bounds:new cy(new e7(-21364736,-10616832),new e7(23855104,15859712)),imgExtend:"png"},BMAP_CUSTOM_LAYER:{tileUrls:[""],tileSize:256,baseUnits:256,zoomLevelMin:1,zoomLevelMax:19,minDataZoom:3,maxDataZoom:19,minZoom:3,maxZoom:19,zoomLevelBase:18,errorUrl:ds.imgPath+"blank.gif",bounds:new cy(new e7(-21364736,-10616832),new e7(23855104,15859712)),imgExtend:"png"},B_EARTH_MAP:{tileUrls:[""],tileSize:256,baseUnits:256,zoomLevelMin:3,zoomLevelMax:19,minDataZoom:3,maxDataZoom:19,minZoom:3,maxZoom:19,webgl:{minZoom:3,maxZoom:21},zoomLevelBase:18,errorUrl:ds.imgPath+"blank.gif",bounds:new cy(new e7(-21364736,-10616832),new e7(23855104,15859712)),imgExtend:"png"}};var bg=a0;function a7(fv,i,fr,fp,fq){this.mgr=fv;this.position=fr;this._cbks=[];this.name=fv.getTileName(fp,fq,fv.map.config.style);this.info=fp;this._transparentPng=fq.isTransparentPng();var fw=J("img");b9(fw);fw.galleryImg=false;var fu=fw.style;fu.position="absolute";fu.width=fv.tileSize+"px";fu.height=fv.tileSize+"px";fu.left=fr[0]+"px";fu.top=fr[1]+"px";this.img=fw;this.src=i;if(O&&fr._offsetX===0){fu.opacity=0;fu.willChange="opacity"}var ft=this;this.img.onload=function(fE){if(!ft.mgr){return}var fz=ft.mgr;var fx=fz.bufferTiles;if(fz.bufferNumber>0){fx[ft.name]=ft;fx.push(ft.name)}var fB=fx.length-fz.bufferNumber;for(var fC=0;fB>0&&fC0&&this._transparentPng){this.img.src=ds.imgPath+"blank.gif"}else{this.img.src=this.src}};a7.prototype._callCbks=function(){var fp=this;for(var e=0;e8);function dz(e){this.tileLayers=[];this.map=e;this.bufferNumber=300;this.mapTiles=[];this.bufferTiles=[];this.config=bg[this.map.mapType];this.errorUrl=this.config.errorUrl;this.tileSize=this.config.tileSize;this.baseUnits=this.config.baseUnits;this.baseZoomLevel=this.config.zoomLevelBase;this.tileURLs=this.config.tileUrls;this.imgNumber=0;this.numLoading=0;this.temp={}}aK.register(function(i){if(i._renderType==="webgl"){return}var e=i.tileMgr=new dz(i);i.addEventListener("mousewheel",function(fp){e.mouseWheel(fp)});i.addEventListener("dblclick",function(fp){e.dblClick(fp)});i.addEventListener("rightdblclick",function(fp){e.dblClick(fp)});i.addEventListener("minuspress",function(fp){e.keypress(fp)});i.addEventListener("pluspress",function(fp){e.keypress(fp)});i.addEventListener("load",function(fp){if(this.mapType===ez){return}e.loadTiles()});i.addEventListener("zoomstartcode",function(fp){if(this.mapType===ez){return}e._zoom(fp)});i.addEventListener("moving",function(fp){if(this.mapType===ez){return}e.moveGridTiles()});i.addEventListener("resize",function(fp){if(this.mapType===ez){return}e.resizeMap(fp)});i.addEventListener("addtilelayer",function(fp){e.addTileLayer(fp)});i.addEventListener("removetilelayer",function(fp){e.removeTileLayer(fp)})});y.extend(dz.prototype,{addTileLayer:function(fq){var fp=this;var i=fq.target;fp.tileLayers.push(i);if(fp.map.loaded){fp.moveGridTiles()}},removeTileLayer:function(fx){var fy=this;var fv=fx.target;var ft=fv.mapType;var fs=fy.mapTiles;var fA=fy.bufferTiles;for(var fp in fA){var fq=fp.split("-")[1];if(fq==ft){delete fA[fp]}}for(var fp in fs){var fq=fp.split("-")[1];if(fq==ft){delete fs[fp]}}if(fy.zoomsDiv&&fy.zoomsDiv.parentNode){fy.zoomsDiv.parentNode.removeChild(fy.zoomsDiv);fy.zoomsDiv.innerHTML=""}var fr=fy.map;if(fr.deepZoom){var fz=fr.deepZoom.preDeepZoomDiv;if(fz&&fz.parentNode){fz.parentNode.removeChild(fz)}}for(var fw=0,fu=fy.tileLayers.length;fw=1.5?2:1;this.normalUdt=af("ditu","normal").udt;this.numLoading=0;this.useThumbData=false;if(this.baseLayer){this.useThumbData=true}if(typeof this.opts.customLayer==="boolean"){this.customLayer=this.opts.customLayer}else{this.customLayer=true}}bJ.inherits(cN,"TileLayer");y.extend(bJ.prototype,{isTransparentPng:function(){return this.transparentPng},getTilesUrl:function(fx,e){var fp=bg[this.mapType];if(typeof fp!=="object"){return null}var fq=fx.x;var fy=fx.y;if(this.mapType!==bU){var fy=cH.calcLoopParam(fy,e).col}var i="";if(this.opts.tileUrlTemplate){i=this.opts.tileUrlTemplate;i=i.replace(/\{X\}/,fy);i=i.replace(/\{Y\}/,fq);i=i.replace(/\{Z\}/,e)}else{if(this.mapType===C){var fw=this.isCanvasMap?0:1;var fs=fp.tileUrls[Math.abs(fy+fq)%fp.tileUrls.length];if(window.offLineIPAddress){fs=window.offLineIPAddress+"tile5/"}var fr=this.map.config.style;i=fs+"?qt=vtile&x="+fq+"&y="+fy+"&z="+e+(fr==="default"?"":("&styleId="+ds.mapStyleNameIdPair[fr]))+"&styles=pl&udt="+this.normalUdt+"&scaler="+this.scaler+"&showtext="+fw;i=i.replace(/-(\d+)/gi,"M$1")}if(this.mapType===bU){var ft=af("ditu","satellite");var fv=ft.ver;var fu=ft.udt;i=fp.tileUrls[Math.abs(fy+fq)%fp.tileUrls.length]+"u=x="+fq+";y="+fy+";z="+e+";v="+fv+";type=sate&fm=46&udt="+fu;i=i.replace(/-(\d+)/gi,"M$1")}}return i},initialize:function(fr){this.map=fr;if(fr._renderType==="webgl"){var fq=null;if(this.customLayer!==false){fq=this.getTilesUrl}y.extend(this,dZ);this.labelProcessor=new b8(this);this.callbackDataQueue=[];if(fq){this.getTilesUrl=fq}var e=this;fr.on("indoor_data_refresh",function(fs){if(!e.baseLayer){return}e._refreshIndoorData(fs.uid,fs.floor)});fr.on("custom_labels_ready",function(fs){if(!e.baseLayer){return}e.clearAllCollisionsCache();e._doWorkAfterLabelImageLoad(fs.virtualTile,fs.labelCanvas,null,fs.imgKey)});fr.on("glmoduleloaded",function(){if(!e.baseLayer){return}e.updateAllIconsTextureCoords()})}if(!fr.temp.layerZIndex){fr.temp.layerZIndex=0}this.zIndex=this.zIndex||0;if(this.baseLayer){this.zIndex=0}if(!fr.temp.layid){fr.temp.layid=0}if(!this.opts.mapType){this.mapType="BMAP_CUSTOM_LAYER_"+fr.temp.layid;fr.temp.layid++}else{this.mapType=this.opts.mapType}var i=bg[this.mapType];if(!i){bg[this.mapType]={tileUrls:[],tileSize:256,baseUnits:256,zoomLevelMin:1,zoomLevelMax:19,minZoom:3,maxZoom:19,minDataZoom:3,maxDataZoom:19,zoomLevelBase:18,errorUrl:ds.imgPath+"/blank.gif",bounds:new cy(new e7(-21364736,-10616832),new e7(23855104,15859712)),imgExtend:"png"}}if(fr._renderType!=="webgl"){var fp=ct(fr.platform,'
');fp.style.display="";fp.style.left=Math.ceil(-fr.offsetX+fr.width/2)+"px";fp.style.top=Math.ceil(-fr.offsetY+fr.height/2)+"px";this.tilesDiv=fp}this.isCanvasMap=fr.isCanvasMap();this.lastZoom=fr.getZoom()},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 bW(i,e,fp){this.bounds=i;this.content=e;this.mapType=fp}bW.inherits(cN,"Copyright");var en={get:function(e){if(!en.singleton){en.singleton=new U(e)}return en.singleton}};function U(i){this._map=i;this._tileMgr=i.tileMgr;this._animationDiv=null;this._preAnimationDiv=null;this._animation=null;this._baseLayerDiv=null;this._transformStyleName=aC.ifSupportCSS3("transform",true);this._transformOriginStyleName=aC.ifSupportCSS3("transformOrigin",true);this._preZoomTimes=1;this._preRenderTick=1;this._enableCanvas2dMap=!!(i.getRenderType()==="canvas");this._isIE9=!!(y.Browser.ie===9);var e=this;i.addEventListener("maptypechange",function(){e.hide()});i.addEventListener("load",function(){e.hide()})}y.extend(U.prototype,{prepareLayer:function(){var fq=this._map;var e=this._tileMgr;this._canvas2dMapMgr=fq.canvas2dMapMgr;var fp=this._baseLayerDiv=e.tilesDiv;if(!this._animationDiv){var i=this._preAnimationDiv;if(i){i.parentNode&&i.parentNode.removeChild(i);this._preAnimationDiv=null}this._preAnimationDiv=this._animationDiv=fp.cloneNode(true);fq.platform.insertBefore(this._animationDiv,fq.platform.firstChild)}this.show()},prepareAniParam:function(){var fq=this._animationDiv;if(!fq){return}var e=fq.children.length;var fp;this._zoomAniInfo=[];for(var fr=e-1;fr>-1;fr--){var fs={};fp=fq.children[fr].style;fs.top=parseInt(fp.top,10);fs.left=parseInt(fp.left,10);this._zoomAniInfo[fr]=fs}},prepareLabelLayer:function(){var fr=this._map;if(this._enableCanvas2dMap&&fr.canvas2dMapMgr){if(this.touchZoomLabelCanvas){this.touchZoomLabelCanvas.parentNode.removeChild(this.touchZoomLabelCanvas)}var i=fr.canvas2dMapMgr._labelCanvas;this.touchZoomLabelCanvas=i.cloneNode(false);var e=this.touchZoomLabelCanvas.getContext("2d");e.drawImage(i,0,0);fr.platform.insertBefore(this.touchZoomLabelCanvas,fr.platform.firstChild);var fq=parseInt(i.style.left,10);var fp=parseInt(i.style.top,10);this.touchZoomLabelCanvas.style.zIndex=9;this.touchZoomLabelCanvas.style[this._transformOriginStyleName]=(this._fixPosition.x-(fr.offsetX+fq))+"px "+(this._fixPosition.y-(fr.offsetY+fp))+"px";i.style.visibility="hidden"}},show:function(){if(this._animationDiv){this._animationDiv.style.visibility=""}},showLabel:function(){var i=this._map;if(this._enableCanvas2dMap&&i.canvas2dMapMgr){var e=i.canvas2dMapMgr._labelCanvas;if(e){e.style.visibility=""}if(this.touchZoomLabelCanvas){this.touchZoomLabelCanvas.style.zIndex=-2;this.touchZoomLabelCanvas.style.visibility="hidden"}}},hide:function(){if(this._animationDiv){this._animationDiv.style.visibility="hidden"}if(this._preAnimationDiv){this._preAnimationDiv.style.visibility="hidden"}},hideNonAnimationLayers:function(){var fq=this._map;if(fq.getRenderType()==="dom"){if(fq.overlayDiv){fq.overlayDiv.style.visibility="hidden"}if(fq.overlayDivEx){fq.overlayDivEx.style.visibility="hidden"}}var fs=fq.tileMgr.tileLayers;var fr;for(var fp=0,e=fs.length;fp-1;fz--){var fx=this._zoomAniInfo[fz];fy=fq.children[fz].style;var fr=fx.left-fu.x;var fp=fx.top-fu.y;fx.dx=fr*e-fr;fx.dy=fp*e-fp;fx.preDx=fr-fr;fx.preDy=fp-fp;fG=fx.preDx+(fx.dx-fx.preDx);fv=fx.preDy+(fx.dy-fx.preDy)+fw;fy.left=fx.left+fG+"px";fy.top=fx.top+fv+"px";fy.width=fy.height=256*e+"px"}if(this._enableCanvas2dMap){var fF=!fE._isIE9?"translate3d(0px, "+fw+"px, 0) scale("+e+")":"translate(0px, "+fw+"px) scale("+e+")";this.touchZoomLabelCanvas.style[fB]=fF}},setZoomFinish:function(){this._animationDiv=null},startAnimation:function(ft){this.prepareLayer();this.hideNonAnimationLayers();var fM=this._map;if(this.touchZoomLabelCanvas){this.touchZoomLabelCanvas.style.display="none"}ft=ft||{};var fK=ft.zoomCount||0;var fy=ft.fixPosition;var fI=ft.fixMCPosition;var fw=ft.pixOffset;this._zoomCount=fK;var fq=fM.getZoom();var fL=fq+fK;var e=fM.config.enableContinuousZoom;var fC=0.5;var fx=5;var fp=Math.pow(2,fK);var fO=this._baseLayerDiv;var fz={x:fy.x-parseInt(fO.style.left,10)-fM.offsetX,y:fy.y-parseInt(fO.style.top,10)-fM.offsetY};var fu=this._animationDiv;var fG=fu.children.length;var fQ=this._preZoomTimes;var fJ=[];var fH=this._transformStyleName;var fv=this._transformOriginStyleName;for(var fF=fG-1;fF>-1;fF--){var fD={};var fE=fu.children[fF].style;fD.top=parseInt(fE.top,10);fD.left=parseInt(fE.left,10);var fs=fD.left-fz.x;var fr=fD.top-fz.y;fD.dx=fs*fp-fs;fD.dy=fr*fp-fr;fD.preDx=fs*fQ-fs;fD.preDy=fr*fQ-fr;fJ[fF]=fD}var fN=this;var fB;var fP;var fA;this._zoomAni=new m({fps:60,duration:e?500:1,transition:function(i){i=i*fx/(2*fC);return fx*i-fC*i*i},render:function(fZ){fZ=fZ*(4*fC)/(fx*fx);fB=fQ+fZ*(fp-fQ);var fS=fq+c5(fB);var fX=null;var fW=0;var f0=0;if(ft.onAnimationBeforeLooping){var f1=ft.onAnimationBeforeLooping(fZ,fS);fX=f1.loopingCenter;fW=f1.yDiff;f0=f1.totalYDiff}for(var fT=fJ.length-1;fT>-1;fT--){var fU=fJ[fT];if(fu.children[fT]){var fY=fu.children[fT].style;fP=fU.preDx+(fU.dx-fU.preDx)*fZ-fw.width*fZ;fA=fU.preDy+(fU.dy-fU.preDy)*fZ-fw.height*fZ+fW;fY.left=fU.left+fP+"px";fY.top=fU.top+fA+"px";fY.height=fY.width=256*fB+"px"}}var fR=fw.width*fZ;var fV=fw.height*fZ;if(fM.isRestrict){fN._enableCanvas2dMap&&fN._canvas2dMapMgr.clearLabel()}else{fN._enableCanvas2dMap&&fN._canvas2dMapMgr.drawLabel(fB,fy,fq,fL,fK,fZ,fR,fV,f0,fW)}fN._preZoomTimes=fB;fN._preRenderTick=fZ;ft.onAnimationLooping&&ft.onAnimationLooping(fZ,fS,fX)},finish:function(){fN._preZoomTimes=1;fN._zoomAni=null;fN._animationDiv=null;ft.onAnimationFinish&&ft.onAnimationFinish();fN.showNonAnimationLayers()}});return this._zoomAni},stopAnimation:function(){if(this._zoomAni){this._zoomAni.stop();this._zoomAni=null}}});function c(e){this._initVars(e);this._initColorCanvas();this._bindEvent(e)}y.extend(c.prototype,{_initVars:function(e){this._map=e._map;this._canvas2dMapMgr=e;this._labelCtx=e._labelCtx;this.ratio=this._map.config.ratio;this.sizeRatio=this.ratio>1?2:1;this.RANK1=1000000;this.RANK2=2000000;this.RANK3=3000000;this.RANK4=4000000;this.RANK5=5000000},_initColorCanvas:function(){var i=256,fp=J("canvas"),e=fp.style;e.width=i+"px";e.height=i+"px";fp.width=i;fp.height=i;this._colorCvsSize=i;this._colorCvs=fp;this._colorCtx=fp.getContext("2d")},getLabelImageData:function(fD){var fC=fD.textImg;var fp=fD.textPos;var fA=this.ratio;var fy=this.sizeRatio/fA;var fr=this._colorCtx;var fv=this._colorCvsSize;fr.clearRect(0,0,fv,fv);var fx=0;var e=0;var fu=0;for(var fw=0;fwfx){fx=fp[fw].width;e=fw;fu=fp[fw].drawX}}fx/=fy;var fz=0;for(var fw=0,ft=fp.length;fwfx){fx=fB.width/fy}fz+=fB.height/fy+2*fA}var fq=fr.getImageData(0,0,fx,fz);var fs=fr.getImageData(0,0,fx,fz);return[fq,fs]},_bindEvent:function(i){var e=this,fp=i._map;fp.addEventListener("onspotmouseover",function(ft){if(!this.isCanvasMap()||!this.temp.isPermitSpotOver){return}if(ft.spots.length>0){var fs=ft.spots[0].userdata.uid;var fr=ft.spots[0].userdata.name;var fq=e.findLabelByUid(fs,fr);fq&&e._toHighLightColor(fq)}});fp.addEventListener("onspotmouseout",function(ft){if(!this.isCanvasMap()||!this.temp.isPermitSpotOver){return}if(ft.spots.length>0){var fs=ft.spots[0].userdata.uid;var fr=ft.spots[0].userdata.name;var fq=e.findLabelByUid(fs,fr);fq&&e._toDefaultColor(fq)}});fp.addEventListener("onspotclick",function(ft){if(!this.isCanvasMap()||!this.temp.isPermitSpotOver){return}if(ft.spots&&ft.spots.length>0){var fs=ft.spots[0].userdata.uid;var fr=ft.spots[0].userdata.name;var fq=e.findLabelByUid(fs,fr);fq&&e._changeBaseMapState(fq)}else{e._recoverNormalState()}});fp.on("spot_status_reset",function(){e._recoverNormalState()});fp.on("spot_highlight",function(fr){var fq=e.findLabelByUid(fr.uid);fq&&e._changeBaseMapState(fq)})},_getTextBound:function(fB){if(!fB.textPos){return null}var fz=this.ratio;var fx=this.sizeRatio/fz;var fp=fB.textPos;var fA=fB.baseDrawX;var fy=fB.baseDrawY;var fv=fA*fz+(fp[0].drawX-fA)/fx;var ft=fy*fz+(fp[0].drawY-fy)/fx;var fr=fv+fp[0].width/fx;var e=ft+fp[0].height/fx;for(var fw=0,fu=fp.length;fwfr){fr=fs+fC.width}if(fq+fC.height>e){e=fq+fC.height}}return[fv,ft,fr,e]},_toHighLightColor:function(fp){if(fp._tempRank&&fp._tempRank==this.RANK5){return}var fu=this._getTextBound(fp);if(!fu){return}var fq=Math.round(fu[0]);var i=Math.round(fu[1]);var e=this.getLabelImageData(fp);var fs=e[0];var fr=e[1];var ft=this._canvas2dMapMgr.getFilterImageData(fs,this.RANK5);fp._oldImgData=fr;this._labelCtx.putImageData(ft,fq,i)},_toDefaultColor:function(e){if(e._tempRank&&e._tempRank==this.RANK5){return}if(e._oldImgData){var i=this.sizeRatio;var fp=this._getTextBound(e);if(!fp){return}this._labelCtx.putImageData(e._oldImgData,Math.round(fp[0]),Math.round(fp[1]));e._oldImgData=null}},_changeBaseMapState:function(fq){var fp=this._canvas2dMapMgr;var i=fq.guid;var e=fq.guidExt;var fr={guid:i,name:fq.name,guidExt:e};fp._labelStrategy.setStrategyInfo(fr);fp._loadData()},_recoverNormalState:function(){var e=this._canvas2dMapMgr;e._labelStrategy.setStrategyInfo(null);e._loadData()},findLabelByUid:function(fs,fq){var fu=this._canvas2dMapMgr,e=fu._computedLabel;for(var fr=0,fp=e.length;frgu){gu=gx.drawX+gx.width}if(gx.drawY+gx.height>gt){gt=gx.drawY+gx.height}}}}}else{fy.tileX=fq;fy.tileY=fp;fF=fq+fy.minXOriginal;fD=fp+fy.minYOriginal;gu=fq+fy.maxXOriginal;gt=fp+fy.maxYOriginal}if(fF!=undefined){var gm=gj+(fF-gj)/gc;var gl=gi+(fD-gi)/gc;var fY=gj+(gu-gj)/gc;var fW=gi+(gt-gi)/gc;fy.minX=gm;fy.minY=gl;fy.maxX=fY;fy.maxY=fW;var gq=(gm+fY)/2,gp=(gl+fW)/2,f7=fE+(gq-gn/2)*fI,f5=fC+(f6/2-gp)*fI;fy.geoX=f7;fy.geoY=f5;f0.push(fy)}}}if(gB){for(var fX=0,fT=gB.length;fXgu){gu=fN+go.width}if(fB+go.height>gt){gt=fB+go.height}if(fH.length===2){var fM=fH[1];var fK=gj+fM.destX;var fA=gi+fM.destY;if(fAgu){gu=fK+fM.width}if(fA+fM.height>gt){gt=fA+fM.height}}gf._tempBounds=[fF,fD,gu,gt];var f4=fz.iconPos;var ft=f4.geoX;var fr=f4.geoY;var gj=(ft-fE)/fI+gn/2;var gi=(fC-fr)/fI+f6/2;var fF=gj+f4.destX;var fD=gi+f4.destY;var gu=fF+f4.width;var gt=fD+f4.height;fz.textPos=fz.textPos||fz._textPos;var fH=fz.textPos;var go=fH[0];var fN=gj+go.destX;var fB=gi+go.destY;if(fNgt){gt=fB+go.height}if(fH.length===2){var fM=fH[1];var fK=gj+fM.destX;var fA=gi+fM.destY;if(fKgt){gt=fA+fM.height}}fz._tempBounds=[fF,fD,gu,gt]}for(var fX=0,fT=gB.length;fXgz[2]||gv[3]gz[3])){fG++;if(f1.textPos){f1._textPos=f1.textPos;delete f1.textPos}}var gz=gA._tempBounds;if(!(gv[2]gz[2]||gv[3]gz[3])){fG++;if(gA.textPos){gA._textPos=gA.textPos;delete gA.textPos}}if(fG>=2){if(gr.textPos){gr._textPos=gr.textPos;delete gr.textPos}}}}for(var fX=0,fT=gB.length;fXgu){gu=go.drawX+go.width}if(go.drawY+go.height>gt){gt=go.drawY+go.height}if(fH.length===2){var fM=fH[1];fM.drawX=gj+fM.destX;fM.drawY=gi+fM.destY;if(fM.drawXgu){gu=fM.drawX+fM.width}if(fM.drawY+fM.height>gt){gt=fM.drawY+fM.height}}}var gm=gj+(fF-gj)/gc;var gl=gi+(fD-gi)/gc;var fY=gj+(gu-gj)/gc;var fW=gi+(gt-gi)/gc;f2.minX=gm;f2.minY=gl;f2.maxX=fY;f2.maxY=fW;var ge=(gm+fY)/2;var gd=(gl+fW)/2;var fu=fE+(ge-gn/2)*fI;var fs=fC+(f6/2-gd)*fI;f2.geoX=fu;f2.geoY=fs;f0.push(f2)}}var gg=this._strategyInfo;if(gg){var fZ=gg.guid;var f8=gg.name;var fP=gg.guidExt;for(var fX=0,fT=f0.length;fXf3.maxX-fV||gr.maxY-fVf3.maxY-fV)){gr.arrIntersectIndex.push(fU)}}}for(var fX=0,fT=f0.length;fXfv){var fp=ft.splice(0,fs);for(var fw=0,fu=fp.length;fw0){this.isDrawText=true}},_loadLabelData:function(fz,fy,fx,fp,fA,e){var fs=fz.toString();var fq=fy.toString();var fu="cbk_"+fs.replace("-","_")+"_"+fq.replace("-","__")+"_"+Math.floor(fx);var fE=c3+"."+fu;var fD=this._labelDataUrls;var fw=Math.abs(fz+fy)%fD.length;var fJ=fD[fw];if(window.offLineIPAddress){fJ=window.offLineIPAddress+"pvd/"}var i=this.labelStyleParam;var fC="?qt=vtile";var fF="";if(this._map.config.style!=="default"){fF="&styleId="+ds.mapStyleNameIdPair[this._map.config.style]}var fB="x={x}&y={y}&z={z}&udt={udt}&v={v}&styles={styles}"+fF+"&textonly=1&textimg=1&scaler={scaler}&fn="+encodeURIComponent(fE);var fG=cH.calcLoopParam(fz,fx).col;var fv=this.ratio>1?2:1;var ft=fB.replace(/{x}/,fG).replace(/{y}/,fy).replace(/{z}/,Math.floor(fx)).replace(/{styles}/,i).replace(/{udt}/,this._udt).replace(/{v}/,this._version).replace(/{scaler}/,fv);var fr=fJ+fC+"¶m="+window.encodeURIComponent(el(ft));var fI=this;var fH=fI._map;aK[fu]=function(fK){fI._vectorDrawLib.parseLabelData(fK,fz,fy,fx,fp,fA,function(fP){var fM=fH.getCenter();var fQ=fH.getZoom();var fS="viewKey_"+Math.floor(fM.lng)+"_"+Math.floor(fM.lat)+"_"+fQ;fI._labelCount--;var fT=fI._getCache(fz,fy,fx,fp).updateLabelCounter;fI._labelCount-=fT;var fN=fI._curViewLabels;if(fS===e||(fI._labelCount<0&&fQ===fx)){fN.push(fP)}if(fS===e){fI.statResponseCount++}if(fI._labelCount<=0){var fL=(new Date()).getTime();fI.updateLabel();var fO=(new Date()).getTime();var fR=new aD("oncanvasmaploaded");fR.drawTime=fO-fL;if(fI.statResponseCount===fI.statRequestCount){fR.isAllLoadedDrawing=true}fH.dispatchEvent(fR)}fI._setCacheValue(fz,fy,fx,fp,fP);delete aK[fu]})};e1.load(fr)},drawLabel:function(fp,fq,fx,i,fv,fr,e,fs,fw,ft){var fu=this;if(!fu._computedLabel){return}if(fu._computedLabel._zoom!==fx){fu.clearLabel();return}fu._map.temp.isPermitSpotOver=false;fu.clearLabel();fu._vectorDrawLib.zoomingIconAndText(this._labelCtx,fu._computedLabel,fp,fq,i,fv,fr,e,fs,fw,ft)},_addSpotData:function(){this._spotData=[];var fx=this._map.getZoom();for(var fs=0,fr=this._computedLabel.length;fsfx)){continue}var ft=[];ft[0]=(fu.minX-fu.maxX)/2;ft[1]=(fu.minY-fu.maxY)/2;ft[2]=(fu.maxX-fu.minX)/2;ft[3]=(fu.maxY-fu.minY)/2;var fq=null;if(fu.iconPos){fq=new e7(fu.iconPos.geoX,fu.iconPos.geoY)}var fp=fu.name?fu.name.replace("\\\\","
"):"";if(fu.iconPos&&fu.iconPos.iconType.indexOf("ditie")>-1&&this._map.getZoom()>14){fp=""}var fw={n:fp,pt:new e7(fu.geoX,fu.geoY),userdata:{iconPoint:fq,uid:fu.guid,name:fp,type:fu.iconPos?fu.iconPos.iconType:"",iconImg:fu.iconImg,mapPoi:true,adver_log:fu.adver_log||""},bd:ft,tag:"MAP_SPOT_INFO"};this._spotData.push(fw)}var fv=new aD("onspotsdataready");fv.spots=this._spotData;this._map._spotDataOnCanvas=this._spotData;this._map.dispatchEvent(fv)},isClickableLabel:function(e){if(e.isDel||(!e.guid&&!e.name)){return false}return true},getFilterImageData:function(fp,ft){var fu=fp.data,fs=this._labelStrategy,ft=parseInt(ft);for(var fv=0,fr=fu.length;fv0&&!fy){continue}var fC=Math.round(fL[0]/100);var fB=Math.round(fL[1]/100);var fO={lng:fI+fC,lat:fH-(fF*fv-fB)};var ft=fC/fv;var fs=fF-fB/fv;var fG=fL[7]||"";var fT=fL[5];var fJ={type:"fixed",name:fG,textImg:fE,rank:fL[4],baseX:ft,baseY:fs,iconPos:null,textPos:null,guid:fL[3]||"",tracer:fP,direction:fT,startScale:3};if((fT!==cC&&fy||!fy)&&fS!==null){fJ.iconPos=this._getIconPosition(fS,fx,ft,fs,fO);if(fJ.iconPos){fp=fJ.iconPos.width;fD=fJ.iconPos.height}}if(fp===0){fJ.direction=cC}if(fy){fJ.textPos=this._getTextDrawData(fL,ft,fs,fp,fD)}if(fJ.textPos||fJ.iconPos){fK.push(fJ)}}}},_isVisible:function(e,i){var fq;if(!this._binaryCache[e]){fq=e.toString(2);if(fq.length<8){fq=new Array(8-fq.length+1).join("0")+fq}this._binaryCache[e]=fq}fq=this._binaryCache[e];var fp=D[i].start;return fq[i-fp]==="1"},_getIconPosition:function(fu,fs,fp,i,e){var fq=this._map.config.style;var fv=aK["iconSetInfo"+fq][fu];if(!fv){if(fu.charCodeAt(0)>=48&&fu.charCodeAt(0)<=57){fv=aK["iconSetInfo"+fq]["_"+fu]}}if(!fv){return null}var fr=fv[0];var ft=fv[1];fr=fr*fs;ft=ft*fs;return{srcX:0,srcY:0,destX:fp-fr/2,destY:i-ft/2,width:fr,height:ft,geoX:e.lng,geoY:e.lat,mcPt:e,iconType:fu}},_getTextDrawData:function(fB,fA,fz,fq,fx){var fG=fB[5];if(typeof fG!=="number"){fG=0}var fv=this.ratio;var fu=fv/2;fq*=fu;fx*=fu;var fw=fB[12];var fr=fw.length;var fJ=0;var fI=0;var fF=[];var fE=0;var fH=0;for(var fD=0;fD0&&e>0){fF.push({srcX:fs,srcY:i,destX:fJ,destY:fI,width:fp,height:e})}}if(fF.length>0){return fF}return null},_getLineLabelInfo:function(fy,fq,fr,fN,f0,fF,fL,fK,fM,fE){if(fy.length!==10){return}var fP=this.ratio;var fp=this.ratio;var fW=fy[7].length;var fG=fy[1];var fY=fy[3];var f4=fy[8];var fu=fy[4];var e=2;var fs=fu.slice(0,e);for(var f1=e;f1fC){fC=f8+ft}if(f7+fw>fB){fB=f7+fw}}fH.push({angle:fA,srcX:fv,srcY:fx,destX:f8,destY:f7,width:ft,height:fw})}var fX={type:"line",textImg:fq,rank:fG,baseX:fU,baseY:fS,arrWordPos:fH,minXOriginal:fQ,minYOriginal:fO,maxXOriginal:fC,maxYOriginal:fB,text:""};fE.push(fX)}},alterColor:function(ft,e,fs){var fp=this._colorCtx,i=this._canvas2dMapMgr;fp.clearRect(0,0,ft.width,ft.height);fp.drawImage(e,ft.srcX,ft.srcY,ft.width,ft.height,0,0,ft.width,ft.height);var fr=fp.getImageData(0,0,ft.width,ft.height),fq=i.getFilterImageData(fr,fs);fp.putImageData(fq,0,0)},drawIconAndText:function(fF,fE,e){var fw=this.ratio;var fu=this.sizeRatio/fw;var fy=2/fw;var fQ=this;for(var fI=0,fG=fE.length;fI10&&fL<350){fF.save();var fO=Math.round(fR+fK.width/2);var fN=Math.round(fP+fK.height/2);fF.translate(fO,fN);fF.rotate(-fL/180*Math.PI);fF.drawImage(fC,fK.srcX,fK.srcY,fK.width,fK.height,-Math.round(fK.width/2),-Math.round(fK.height/2),fK.width/fu,fK.height/fu);fF.restore()}else{fF.drawImage(fC,fK.srcX,fK.srcY,fK.width,fK.height,fR,fP,fK.width/fu,fK.height/fu)}}}}}},isCollide:function(fs,fB,fA,e,fu,fp,fw){for(var fr=0,fq=fp.length;frfv[1]+fv[3]+fz||fA+fufv[2]+fv[4]+fy)){return true}}}return false},zoomingIconAndText:function(fQ,fK,fq,fO,fP,gh,fX,fy,f3,fW,fH){var gi=this.ratio;var fz=this.sizeRatio/gi;var gj=2/gi;var gt=gi/2;var gd=fO.x;var gc=fO.y;var fR=2*gi;if(fH!==0){gc+=fW}var fC=undefined,fv=undefined,fs=undefined,fx=undefined,fG=undefined;var f2=gh>0?true:false;if(!f2){fC=[];var f6=1-fX}for(var gp=0,gn=fK.length;gp10&&fN<350){var gf=f8+gg.width/2;var ge=f7+gg.height/2;var fr=fN/180*Math.PI;var fU=Math.cos(fr);var fD=Math.sin(fr);var f5=fU;var fE=fU;var f4=fD;var fF=-fD;var fM=gf-gf*fU-ge*fD;var e=ge+gf*fD-ge*fU;fQ.save();fQ.transform(f5,fF,f4,fE,fM,e);fQ.drawImage(ft,gg.srcX,gg.srcY,fx,fG,fv,fs,fx/fz,fG/fz);fQ.restore()}else{fQ.drawImage(ft,gg.srcX,gg.srcY,fx,fG,fv,fs,fx/fz,fG/fz)}!f2&&fC.push([gp,fv,fs,fx,fG])}}fQ.restore()}}}});function eH(e){this.initVars(e)}y.extend(eH.prototype,{initVars:function(e){this._map=e._map;this._canvas2dMapMgr=e;this.base64Prefix="data:image/png;base64,";this.bizData=null;this.objTextsPng=null;this.arrIconsPng=null;this.bizLabels=null},proecessBizData:function(fs,fw){var fu=this;this.bizData=fs;this.objTextsPng=null;this.arrIconsPng=null;var fp=fs.textsPng;var fy=fs.iconsPng;if(!fp||!fy){return}var fv=new Image();fv.onload=function(){fu.objTextsPng=this;fu.calcIconAndTextInfo(fw);this.onload=null};fv.src=this.base64Prefix+fp;var fx=fy.length;var e=[];for(var fr=0;frfu.width||i>fu.height)&&(e>fu.width||fy>fu.height)){return false}return true},_setPlatformPosition:function(fx,fw,fz){fz=fz||{};if(fx===0&&fw===0&&!fz.point){return}if(isNaN(fz.initMapOffsetX)){fz.initMapOffsetX=this.offsetX}if(isNaN(fz.initMapOffsetY)){fz.initMapOffsetY=this.offsetY}var ft=cu(this._heading);if(this._tilt>0){fw=fw/Math.cos(cu(this._tilt))}var fy=fx*Math.cos(ft)+fw*Math.sin(ft);var fv=-fx*Math.sin(ft)+fw*Math.cos(ft);fy=fy+fz.initMapOffsetX;fv=fv+fz.initMapOffsetY;if(fz.point){var i=this.restrictCenter(fz.point);if(!i.equals(this.centerPoint)){this.centerPoint=i.clone();this.fire(new aD("oncenter_changed"))}}else{var fq=this.offsetX-fy;var e=this.offsetY-fv;var fu=this.centerPoint.lng;var fs=this.centerPoint.lat;var fr=new e7(fu,fs);var fp=this.getZoomUnits();this.centerPoint=this.restrictCenter(new e7(fr.lng+fq*fp,fr.lat-e*fp),fp);this.fire(new aD("oncenter_changed"))}this.offsetX=fy;this.offsetY=fv;this.dispatchEvent(new aD("onmoving"))},restrictCenter:function(fq,fr){if(this.config.restrictCenter===false){return fq}fr=fr||this.getZoomUnits();var fp=this.pixelToPoint(new cS(0,0),{center:fq});var i=this.pixelToPoint(new cS(0,this.height),{center:fq});if(this.zoomLevel<5){if(fp.lat>bY.MAX_LAT&&i.latbY.MAX_LAT){fq.lat=bY.MAX_LAT-this.height/2*fr}else{if(i.latfr){this._tilt=fr}if(fB){if(this._heading%360!==0||this._tilt>0){var i=this._webglMapCamera.fromScreenPixelToMC(fp.x,fp.y,{center:fu,zoom:this.zoomLevel});if(i){var fy=i.sub(ft);var fq=fu.sub(fy);this.centerPoint=this.restrictCenter(fq)}}else{var fv=this.getZoomUnits();var fq=new e7(fB.lng-fv*(fp.x-this.width/2),fB.lat+fv*(fp.y-this.height/2));this.centerPoint=this.restrictCenter(fq,fv)}this.fire(new aD("oncenter_changed"))}this._checkFireZoomend();return}this._animationInfo.zoom={current:this.zoomLevel,diff:e-this.zoomLevel,target:e};var fz=this;fC.callback=function(){fz._checkFireZoomend()};var fA=this._tilt;if(this.fixPoint||fA>bY.MAX_DRAG_TILT_L2){fC.renderCallback=function(){var fG=fz.getCurrentMaxTilt();if(fz._tilt>fG){fz._tilt=fG}var fH=fz.fixPixel;if(!fz.fixPixel||!fz.fixPoint){return}var fD=fz.fixPixel;var fN=fz.fixPoint;var fK=fz.fixCenter;var fI=fz.mousePosMCPoint;if(fz._heading%360!==0||fz._tilt>0){var fE=fz._webglMapCamera.fromScreenPixelToMC(fD.x,fD.y,{center:fK,zoom:fz.zoomLevel,tilt:fz._tilt});if(fE){var fM=fE.sub(fI);var fF=fK.sub(fM);fz.centerPoint=fz.restrictCenter(fF)}}else{var fJ=fD;var fL=fz.getZoomUnits();var fF=new e7(fN.lng-fL*(fJ.x-fz.width/2),fN.lat+fL*(fJ.y-fz.height/2));fz.centerPoint=fz.restrictCenter(fF,fL)}fz.fire(new aD("oncenter_changed"))}}if(fC.fromMouseWheel===true){this._startInfiniteZoomAnimation(fC);return}this._startAnimation(fC)},_checkFireZoomend:function(){var e=this;if(e.fireZoomendTimer){clearTimeout(e.fireZoomendTimer)}e.fireZoomendTimer=setTimeout(function(){if(e.zoomEventStatus==="zooming"){e.fire(new aD("onzoomend"));e.zoomEventStatus="idle"}e.fireZoomendTimer=null},150)},deepZoomMedia:function(e){var i=this;if(!i.temp.isStdCtrlBusy){i.temp.isStdCtrlBusy=true;i.deepZoomTo(i.zoomLevel+e);setTimeout(function(){i.temp.isStdCtrlBusy=false},400)}},deepZoomTo:function(e){this.zoomTo(e)},flyTo:function(fp,fT,fE){fE=fE||{};if(this.centerPoint.equals(fp)&&this.zoomLevel===fT&&typeof fE.heading!=="number"&&typeof fE.tilt!=="number"){return}var e=this.getHeading()%360;var fw=this.getTilt();var fC=0;var fG=0;var fz=this.getBounds().containsPoint(fp);if(typeof fE.heading==="number"){fC=fE.heading}else{if(fz){fC=e}}if(typeof fE.tilt==="number"){fG=fE.tilt}else{if(fz){fG=fw}}this._heading=e;var fQ=fC-e;var fM=fG-fw;var fA=this;var fs=this.zoomLevel;var ft=1.42;var fI=this.zoomScale(fT-fs);var fV=this.getZoomUnits();var fy=this.centerPoint.div(fV);var fW=fp.div(fV);var fP=this.worldSize();var fL=ft;var fK=Math.max(this.width,this.height);var fJ=fK/fI;var fx=fW.sub(fy).mag();var i=fL*fL;function fS(fY){var fX=(fJ*fJ-fK*fK+(fY?-1:1)*i*i*fx*fx)/(2*(fY?fJ:fK)*i*fx);return Math.log(Math.sqrt(fX*fX+1)-fX)}function fq(fX){return(Math.exp(fX)-Math.exp(-fX))/2}function fu(fX){return(Math.exp(fX)+Math.exp(-fX))/2}function fD(fX){return fq(fX)/fu(fX)}var fv=fS(0);var fN=function(fX){return(fu(fv)/fu(fv+fL*fX))};var fO=function(fX){return fK*((fu(fv)*fD(fv+fL*fX)-fq(fv))/i)/fx};var fr=(fS(1)-fv)/fL;if(Math.abs(fx)<0.000001||fr===Infinity||isNaN(fr)){if(Math.abs(fK-fJ)<0.000001){if(fE.noZoomAnimation!==true){this._animationInfo.zoom={current:this.zoomLevel,diff:fT-this.zoomLevel}}this._animationInfo.center={current:this.centerPoint,diff:fp.sub(this.centerPoint)};this._animationInfo.heading={current:e,diff:fC-e};this._animationInfo.tilt={current:fw,diff:fG-fw};this.setLock(true);this._startAnimation({callback:function(fX){fA.setLock(false);if(fE.callback){fE.callback(fX)}},duration:fE.duration});return}var fU=fJ5){fR=(fr-5)/2+fR}}var fF=fE.duration||1000*fr/fR;if(isNaN(fF)){var fH={};for(var fB in fE){fH[fB]=fE[fB];fH.noAnimation=true}this.centerAndZoom(fp,fT,fH);return}this.fire(new aD("onmovestart"));this.fire(new aD("onzoomstart"));this.setLock(true);this._startAnimation({duration:fF,renderCallback:function(fX,fY){var fZ=fX*fr;var f2=fO(fZ);if(fE.noZoomAnimation!==true){var f1=fs+fA.scaleZoom(1/fN(fZ));if(f1fA.getMaxZoom()){f1=fA.getMaxZoom()}if(f1!==fA.zoomLevel){fA.zoomLevel=f1;fA.fire(new aD("onzoom_changed"))}}fA.centerPoint=fy.add(fW.sub(fy).mult(f2)).mult(fV);fA.fire(new aD("oncenter_changed"));if(typeof fC==="number"){var f0=fX/0.7;if(f0>1){f0=1}fA.setHeading(e+fQ*fX,{noAnimation:true})}if(typeof fG==="number"){fA.setTilt(fw+fM*fX,{noAnimation:true})}},callback:function(fX,fY){fA.setLock(false);if(fY&&fY.stop===true){fA.fire(new aD("onmoveend"));if(fE.noZoomAnimation!==true){fA.fire(new aD("onzoomend"))}fE.callback&&fE.callback(fX);return}if(fT!==fA.zoomLevel&&fE.noZoomAnimation!==true){fA.zoomLevel=fT;fA.fire(new aD("onzoom_changed"))}fA.fire(new aD("onmoveend"));if(fE.noZoomAnimation!==true){fA.fire(new aD("onzoomend"))}fE.callback&&fE.callback(fX)}})},zoomScale:function(e){return Math.pow(2,e)},scaleZoom:function(e){return Math.log(e)/Math.LN2},panTo:function(i,fp){fp=fp||{};if(!i||i.equals(this.centerPoint)){fp.callback&&fp.callback();return}var fq=this.pointToPixel(i);var e=Math.round(this.width/2);var fs=Math.round(this.height/2);var fr=this._ifUseAnimation(i,this.zoomLevel);if(fp.noAnimation===true||fr===false){this._stopAllAnimations();this._panTo(e-fq.x,fs-fq.y,i);fp.callback&&fp.callback();return}this.flyTo(i,this.zoomLevel,fp)},_panTo:function(i,e,fq){var fp=this.temp;if(fp.operating===true){return}if(fp.dragAni){fp.dragAni.stop(false,{readyToMove:true});fp.dragAni=null}this.dispatchEvent(new aD("onmovestart"));this._setPlatformPosition(i,e,{point:fq});this.dispatchEvent(new aD("onmoveend"))},panBy:function(i,e,fp){i=Math.round(i)||0;e=Math.round(e)||0;fp=fp||{};if(Math.abs(i)<=this.width&&Math.abs(e)<=this.height&&fp.noAnimation!==true){this._panBy(i,e,fp)}else{this._panTo(i,e,fp.point);fp.callback&&fp.callback()}},_panBy:function(i,e,fr){if(this.temp.operating===true){return}fr=fr||{};this.dispatchEvent(new aD("onmovestart"));var fq=this;var fp=fq.temp;fp.pl=fq.offsetX;fp.pt=fq.offsetY;if(fp.tlPan){fp.tlPan.cancel()}if(fp.dragAni){fp.dragAni.stop(false,{readyToMove:true});fp.dragAni=null}fp.tlPan=new m({fps:fr.fps||fq.config.fps,duration:fr.duration||fq.config.actionDuration,transition:fr.transition||bs.easeInOutQuad,render:function(fs){this.terminative=fq.temp.operating;if(fq.temp.operating){return}fq._setPlatformPosition(i*fs,e*fs,{initMapOffsetX:fp.pl,initMapOffsetY:fp.pt})},finish:function(fs){fq.dispatchEvent(new aD("onmoveend"));fq.temp.tlPan=false;if(fq.temp.stopArrow===true){fq.temp.stopArrow=false;if(fq.temp.arrow!==0){fq._arrow()}}}})},_startAnimation:function(i){var fr=this._animationInfo;var fp=this;i=i||{};if(fp._ani){fp._ani.stop(!!i.goToEnd,{stopCurrentAnimation:i.stopCurrentAnimation})}if(fp._infiniteAni){fp._infiniteAni.stop();fp._infiniteAni=null}var fs=i.duration||500;var ft=i.transition||bs.ease;var e=new aD("onanimation_start");this.fire(e);if(i.unstopable){fr=this._animationInfoUnstopable}var fq=new m({duration:fs,transition:ft,render:function(fw,fv){for(var fu in fr){if(!fr.hasOwnProperty(fu)){continue}var fy=fr[fu].current;var fx=fr[fu].diff;fp._setValueTick(fu,fy,fx,fw)}if(i.renderCallback){i.renderCallback(fw,fv)}},finish:function(fu){fp.fire(new aD("onanimation_end"));if(i.unstopable){fp._animationInfoUnstopable={};fp._unstopableAni=null}else{fp._ani=null;fp._animationInfo={}}if(i.mapNeedCbk){i.mapNeedCbk()}if(i.callback){i.callback(fu)}},onStop:function(fu){fu=fu||{};fp.fire(new aD("onanimation_end"));if(fu.stopCurrentAnimation){fp._animationInfo={}}fp._ani=null;if(i.mapNeedCbk){i.mapNeedCbk()}if(i.callback){i.callback(null,{stop:true})}}});if(i.unstopable){fp._unstopableAni=fq}else{fp._ani=fq}},_stopAllAnimations:function(e){e=e||{};if(this._ani){this._ani.stop(!!e.goToEnd,{stopCurrentAnimation:e.stopCurrentAnimation});this._ani=null}if(this._infiniteAni){this._infiniteAni.stop();this._infiniteAni=null}},_startInfiniteZoomAnimation:function(e){var i=this;if(i._ani){i._ani.stop(!!e.goToEnd,{stopCurrentAnimation:e.stopCurrentAnimation})}if(i._infiniteAni){return}this.fire(new aD("onanimation_start"));i._infiniteAni=new m({duration:10000,transition:bs.linear,render:function(){var fp=i._animationInfo.zoom;if(Math.abs(fp.current-fp.target)<0.001){i._setValue("zoom",fp.target);i._infiniteAni.stop();return}fp.current+=(fp.target-fp.current)*0.35;i._setValue("zoom",fp.current);if(e.renderCallback){e.renderCallback()}},finish:function(){i._infiniteAni=null;i._animationInfo={};i.fire(new aD("onanimation_end"));if(e.callback){e.callback()}},onStop:function(){i._infiniteAni=null;i._animationInfo={};i.fire(new aD("onanimation_end"));if(e.callback){e.callback()}}})},_setValue:function(e,fp){if(e==="zoom"){this._preZoomLevel=this.zoomLevel;var i=this._getProperZoom(fp);fp=i.zoom;if(fp!==this.zoomLevel){this.zoomLevel=fp;if(fp<5){this.restrictCenter(this.centerPoint)}this.fire(new aD("on"+e+"_changed"))}return}else{if(e==="center"){this.centerPoint=fp}}this["_"+e]=fp;this.fire(new aD("on"+e+"_changed"))},_setValueTick:function(e,fr,fq,i){if(e==="center"){var fp=new e7(fr.lng+fq.lng*i,fr.lat+fq.lat*i);this._setValue(e,fp);return}if(e==="zoom"){this._setValue(e,Math.pow(fr,1-i)*Math.pow(fr+fq,i));return}this._setValue(e,fr+fq*i)},setHeading:function(fq,i){i=i||{};if(fq===this._heading){i.callback&&i.callback();return}var fp=d6(this._heading,360);var e=d6(fq,360);if(e===fp){this._heading=fq;i.callback&&i.callback();return}if(i.noAnimation){this._setValue("heading",fq);i.callback&&i.callback();return}if(i.unstopable){this._animationInfoUnstopable.heading={current:this._heading,diff:fq-this._heading}}else{this._animationInfo.heading={current:this._heading,diff:fq-this._heading}}this._startAnimation(i)},resetHeading:function(e){var i=this._heading;while(i<0){i+=360}i=i%360;if(i>180){i-=360}this._heading=i;e=e||{};e.unstopable=true;this.setHeading(0,e)},getHeading:function(){return this._heading},setTilt:function(e,i){i=i||{};if(e===this._tilt){i.callback&&i.callback();return}if(e>bY.MAX_TILT){e=bY.MAX_TILT}if(i&&i.noAnimation){this._setValue("tilt",e);i.callback&&i.callback();return}this._animationInfo.tilt={current:this._tilt,diff:e-this._tilt};this._startAnimation(i)},getTilt:function(){return this._tilt},getCenter:function(){return this.centerPoint},getZoom:function(){return this.zoomLevel},getCameraPosition:function(fp){fp=fp||{};var e=fp.center||this.centerPoint;var fq=fp.zoom||this.zoomLevel;var ft=typeof fp.heading==="number"?fp.heading:this._heading;var i=typeof fp.tilt==="number"?fp.tilt:this._tilt;var fs=this._webglMapCamera.generateMVMatrix(e,fq,ft,i);var fr=mat4.create(Float32Array);mat4.invert(fr,fs);return this._webglMapCamera.getPosition(fr)}});function dX(i){this._jobQueue=[];this._idleOnlyJobQueue=[];var e=this;this.isIdle=true;i.on("updateframe",function(fq){var fp=12-fq.frameTime;fp=fp<1?1:fp;e.isIdle=false;if(e.idleWorkTimer){clearInterval(e.idleWorkTimer);e.idleWorkTimer=null}e.runJobs(fp)});this._idleWorkerTicker=(function(fp){return function(){if(fp.isIdle){fp.runJobs();fp.runIdleOnlyJobs()}}})(this);i.on("mapglidle",function(){e.isIdle=true;e.runJobs();e.runIdleOnlyJobs();e.idleWorkTimer=setInterval(e._idleWorkerTicker,dX.MAX_IDLE_TIME)})}dX.MAX_IDLE_TIME=50;dX.MAX_FRAME_TIME=6;dX.prototype.runJobs=function(i){if(this._jobQueue.length===0){return}var fq=dO();var e=0;i=i||dX.MAX_FRAME_TIME;while(this._jobQueue.length&&e0){fy=1/Math.sqrt(fy);fB[0]=fA[0]*fy;fB[1]=fA[1]*fy}return fB};fw.dot=function(fz,fy){return fz[0]*fy[0]+fz[1]*fy[1]};fw.cross=function(fA,fz,fy){var fB=fz[0]*fy[1]-fz[1]*fy[0];fA[0]=fA[1]=0;fA[2]=fB;return fA};fw.lerp=function(fA,fz,fy,fB){var fD=fz[0],fC=fz[1];fA[0]=fD+fB*(fy[0]-fD);fA[1]=fC+fB*(fy[1]-fC);return fA};fw.random=function(fy,fA){fA=fA||1;var fz=fr()*2*Math.PI;fy[0]=Math.cos(fz)*fA;fy[1]=Math.sin(fz)*fA;return fy};fw.transformMat2=function(fB,fA,fz){var fy=fA[0],fC=fA[1];fB[0]=fz[0]*fy+fz[2]*fC;fB[1]=fz[1]*fy+fz[3]*fC;return fB};fw.transformMat2d=function(fB,fA,fz){var fy=fA[0],fC=fA[1];fB[0]=fz[0]*fy+fz[2]*fC+fz[4];fB[1]=fz[1]*fy+fz[3]*fC+fz[5];return fB};fw.transformMat3=function(fB,fA,fz){var fy=fA[0],fC=fA[1];fB[0]=fz[0]*fy+fz[3]*fC+fz[6];fB[1]=fz[1]*fy+fz[4]*fC+fz[7];return fB};fw.transformMat4=function(fB,fA,fz){var fy=fA[0],fC=fA[1];fB[0]=fz[0]*fy+fz[4]*fC+fz[12];fB[1]=fz[1]*fy+fz[5]*fC+fz[13];return fB};fw.rotate=function(fB,fz,fy,fF){var fE=fz[0]-fy[0];var fD=fz[1]-fy[1];var fA=Math.sin(fF);var fC=Math.cos(fF);fB[0]=fE*fC-fD*fA+fy[0];fB[1]=fE*fA+fD*fC+fy[1];return fB};fw.forEach=(function(){var fy=fw.create();return function(fB,fF,fG,fE,fD,fz){var fC,fA;if(!fF){fF=2}if(!fG){fG=0}if(fE){fA=Math.min((fE*fF)+fG,fB.length)}else{fA=fB.length}for(fC=fG;fC0){fy=1/Math.sqrt(fy);fB[0]=fA[0]*fy;fB[1]=fA[1]*fy;fB[2]=fA[2]*fy}return fB};fv.dot=function(fz,fy){return fz[0]*fy[0]+fz[1]*fy[1]+fz[2]*fy[2]};fv.cross=function(fz,fE,fD){var fy=fE[0],fG=fE[1],fF=fE[2],fC=fD[0],fB=fD[1],fA=fD[2];fz[0]=fG*fA-fF*fB;fz[1]=fF*fC-fy*fA;fz[2]=fy*fB-fG*fC;return fz};fv.lerp=function(fA,fz,fy,fB){var fE=fz[0],fD=fz[1],fC=fz[2];fA[0]=fE+fB*(fy[0]-fE);fA[1]=fD+fB*(fy[1]-fD);fA[2]=fC+fB*(fy[2]-fC);return fA};fv.random=function(fy,fC){fC=fC||1;var fA=fr()*2*Math.PI;var fB=(fr()*2)-1;var fz=Math.sqrt(1-fB*fB)*fC;fy[0]=Math.cos(fA)*fz;fy[1]=Math.sin(fA)*fz;fy[2]=fB*fC;return fy};fv.transformMat4=function(fB,fA,fz){var fy=fA[0],fD=fA[1],fC=fA[2];fB[0]=fz[0]*fy+fz[4]*fD+fz[8]*fC+fz[12];fB[1]=fz[1]*fy+fz[5]*fD+fz[9]*fC+fz[13];fB[2]=fz[2]*fy+fz[6]*fD+fz[10]*fC+fz[14];return fB};fv.transformMat3=function(fB,fA,fz){var fy=fA[0],fD=fA[1],fC=fA[2];fB[0]=fy*fz[0]+fD*fz[3]+fC*fz[6];fB[1]=fy*fz[1]+fD*fz[4]+fC*fz[7];fB[2]=fy*fz[2]+fD*fz[5]+fC*fz[8];return fB};fv.transformQuat=function(fE,fK,fy){var fL=fK[0],fJ=fK[1],fI=fK[2],fG=fy[0],fF=fy[1],fD=fy[2],fH=fy[3],fB=fH*fL+fF*fI-fD*fJ,fA=fH*fJ+fD*fL-fG*fI,fz=fH*fI+fG*fJ-fF*fL,fC=-fG*fL-fF*fJ-fD*fI;fE[0]=fB*fH+fC*-fG+fA*-fD-fz*-fF;fE[1]=fA*fH+fC*-fF+fz*-fG-fB*-fD;fE[2]=fz*fH+fC*-fD+fB*-fF-fA*-fG;return fE};fv.rotateX=function(fA,fz,fy,fD){var fC=[],fB=[];fC[0]=fz[0]-fy[0];fC[1]=fz[1]-fy[1];fC[2]=fz[2]-fy[2];fB[0]=fC[0];fB[1]=fC[1]*Math.cos(fD)-fC[2]*Math.sin(fD);fB[2]=fC[1]*Math.sin(fD)+fC[2]*Math.cos(fD);fA[0]=fB[0]+fy[0];fA[1]=fB[1]+fy[1];fA[2]=fB[2]+fy[2];return fA};fv.rotateY=function(fA,fz,fy,fD){var fC=[],fB=[];fC[0]=fz[0]-fy[0];fC[1]=fz[1]-fy[1];fC[2]=fz[2]-fy[2];fB[0]=fC[2]*Math.sin(fD)+fC[0]*Math.cos(fD);fB[1]=fC[1];fB[2]=fC[2]*Math.cos(fD)-fC[0]*Math.sin(fD);fA[0]=fB[0]+fy[0];fA[1]=fB[1]+fy[1];fA[2]=fB[2]+fy[2];return fA};fv.rotateZ=function(fA,fz,fy,fD){var fC=[],fB=[];fC[0]=fz[0]-fy[0];fC[1]=fz[1]-fy[1];fC[2]=fz[2]-fy[2];fB[0]=fC[0]*Math.cos(fD)-fC[1]*Math.sin(fD);fB[1]=fC[0]*Math.sin(fD)+fC[1]*Math.cos(fD);fB[2]=fC[2];fA[0]=fB[0]+fy[0];fA[1]=fB[1]+fy[1];fA[2]=fB[2]+fy[2];return fA};fv.forEach=(function(){var fy=fv.create();return function(fB,fF,fG,fE,fD,fz){var fC,fA;if(!fF){fF=3}if(!fG){fG=0}if(fE){fA=Math.min((fE*fF)+fG,fB.length)}else{fA=fB.length}for(fC=fG;fC0){fy=1/Math.sqrt(fy);fC[0]=fB[0]*fy;fC[1]=fB[1]*fy;fC[2]=fB[2]*fy;fC[3]=fB[3]*fy}return fC};fu.dot=function(fz,fy){return fz[0]*fy[0]+fz[1]*fy[1]+fz[2]*fy[2]+fz[3]*fy[3]};fu.lerp=function(fA,fz,fy,fB){var fE=fz[0],fD=fz[1],fC=fz[2],fF=fz[3];fA[0]=fE+fB*(fy[0]-fE);fA[1]=fD+fB*(fy[1]-fD);fA[2]=fC+fB*(fy[2]-fC);fA[3]=fF+fB*(fy[3]-fF);return fA};fu.random=function(fy,fz){fz=fz||1;fy[0]=fr();fy[1]=fr();fy[2]=fr();fy[3]=fr();fu.normalize(fy,fy);fu.scale(fy,fy,fz);return fy};fu.transformMat4=function(fC,fB,fz){var fy=fB[0],fE=fB[1],fD=fB[2],fA=fB[3];fC[0]=fz[0]*fy+fz[4]*fE+fz[8]*fD+fz[12]*fA;fC[1]=fz[1]*fy+fz[5]*fE+fz[9]*fD+fz[13]*fA;fC[2]=fz[2]*fy+fz[6]*fE+fz[10]*fD+fz[14]*fA;fC[3]=fz[3]*fy+fz[7]*fE+fz[11]*fD+fz[15]*fA;return fC};fu.transformQuat=function(fE,fK,fy){var fL=fK[0],fJ=fK[1],fI=fK[2],fG=fy[0],fF=fy[1],fD=fy[2],fH=fy[3],fB=fH*fL+fF*fI-fD*fJ,fA=fH*fJ+fD*fL-fG*fI,fz=fH*fI+fG*fJ-fF*fL,fC=-fG*fL-fF*fJ-fD*fI;fE[0]=fB*fH+fC*-fG+fA*-fD-fz*-fF;fE[1]=fA*fH+fC*-fF+fz*-fG-fB*-fD;fE[2]=fz*fH+fC*-fD+fB*-fF-fA*-fG;return fE};fu.forEach=(function(){var fy=fu.create();return function(fB,fF,fG,fE,fD,fz){var fC,fA;if(!fF){fF=4}if(!fG){fG=0}if(fE){fA=Math.min((fE*fF)+fG,fB.length)}else{fA=fB.length}for(fC=fG;fC0){fp[0].sort(function(fr,fq){return fr.tileInfo.useZoom-fq.tileInfo.useZoom})}}});var dC=(function(){var fA=new Int8Array(4);var fp=new Int32Array(fA.buffer,0,1);var fv=new Float32Array(fA.buffer,0,1);function fC(fJ){fp[0]=fJ;return fv[0]}function i(fJ){fv[0]=fJ;return fp[0]}function fw(fJ){var fL=(fJ[3]<<24|fJ[2]<<16|fJ[1]<<8|fJ[0]);var fK=fC(fL&4278190079);return fK}var fr=0;var fu=1;var fy=2;var fG=0;var fD=1;var fB=2;var fs=9;function fz(fJ,fK){var fL;if(fK%2===0){fL=[-fJ[1],fJ[0]]}else{fL=[fJ[1],-fJ[0]]}return fL}function e(fJ,fK,fL){var fM=fz(fJ,fK);var fN;if(fL===fu){return fM}else{if(fK===4||fK===5){fN=[fM[0]-fJ[0],fM[1]-fJ[1]]}else{fN=[fM[0]+fJ[0],fM[1]+fJ[1]]}if(fL===fr){vec2.normalize(fN,fN)}return fN}}function fF(fK,fJ){return Math.sqrt(Math.pow(fK[0]-fJ[0],2)+Math.pow(fK[1]-fJ[1],2))}function fq(fN,fM,fL,fJ){var fK=vec2.dot(fN,fM);if(fL===fB||fL===fD){if((fJ===0||fJ===1)&&fK>0){return true}else{if((fJ===2||fJ===3)&&fK<0){return true}}}if((fJ===0||fJ===1)&&fK<0){return true}else{if((fJ===2||fJ===3)&&fK>0){return true}}return false}function fx(fK,fP,fR){var fQ=fz(fK,fP);var fM;var fO=fK;var fN=fR;var fT=[];vec2.normalize(fT,[fO[0]+fN[0],fO[1]+fN[1]]);var fS=vec2.dot(fQ,[-fT[1],fT[0]]);if(Math.abs(fS)<0.1){fS=1}var fL=1/fS;fM=[-fT[1]*fL,fT[0]*fL];var fJ=vec2.dot(fK,fM);if(fJ<0){vec2.negate(fM,fM)}return{cos2:fJ,offset:fM}}function fI(fK,fP,fR,fJ){var fQ=fz(fK,fP);var fO;var fN;var fM;if(fP===0||fP===1){fO=fR;fN=fK}else{fO=fK;fN=fR}if(!fO||!fN){return fQ}var fT=[fO[0]+fN[0],fO[1]+fN[1]];if(fT[0]===0&&fT[1]===0){vec2.normalize(fT,fN)}else{vec2.normalize(fT,fT)}var fU=fq(fT,fQ,fJ,fP);if(fU){return fQ}var fS=vec2.dot(fQ,[-fT[1],fT[0]]);if(Math.abs(fS)<0.1){fS=1}var fL=1/fS;fM=[-fT[1]*fL,fT[0]*fL];return fM}function fH(fU,fV,fO,fN,fW,fT,fM,fP,fL,fS){var fR;var fK=0;var fJ=false;fR=fT.length/fs-1;ft(fV[0],fU[0],fO[0],fW,fN,4,fP,fL,undefined,fT,fS);fR++;fK++;ft(fV[0],fU[0],fO[0],fW,fN,5,fP,fL,undefined,fT,fS);fR++;fK++;for(var fQ=0;fQ0){fQ+=fF(fU[fP],fU[fP-1]);fN.push(fQ*10)}if(fP!==fU.length-1){var fM=[fU[fP+1][0]-fU[fP][0],fU[fP+1][1]-fU[fP][1]];var fW=[];if(fM[0]===0&&fM[1]===0){fW=[0,0]}else{vec2.normalize(fW,fM)}fT[fT.length]=[fW[0],fW[1]]}}return fH(fT,fU,fN,fL,fV,fR,fJ,fw(fO),fK,fS)},toTileSolidLineVertices:function(fN,fK){var fL=new Float32Array(fN.length/fs*5);var fJ=new Int16Array(fL.buffer);var fP=0;var fM=0;for(var fO=0;fO0){this.zoomState=1}else{if(e<0){this.zoomState=-1}}this.lastZoom=i;return this.zoomState},releaseOutViewTileData:function(e){var fr=this.map._workerMgr.releasePendingData(e);for(var fq=0,fp=fr.length;fq=0.5){fK=true}else{if(fy<0.5&&e>=0.5){fK=true}else{if(fy>=0.5&&e<0.5){fK=true}}}if(fK){this.cacheDataCollideLabels(0)}this.LAST_CALC_ZOOM=fw}else{if(this.tileLabels.length>0){this.cacheDataCollideLabels(y.Browser.ie?50:30)}}},loadVectorLayerData:function(fw){this.map.temp.isPermitSpotOver=false;var fv=this;function fu(i,fx){var fz=fv.tileCache.getData(fx);if(!fz){return}if(!i||i.error){var fy=new aD("ontileloaderror");i=i||{};fy.error=i.error||"";fy.message=i.message||"";fv.map.fire(fy);fz.status="init";fz.reloadTimer=setTimeout(function(){if(fz.retry<3){fz.retry++;fz.status="loading";fv.loadVectorTileData(i.tileInfo,fu)}else{fv.tileCache.removeData(fx)}},4000);fv.map._featureMgr.clearData(fv.drawIndex);fv._checkTilesLoaded();fv.getVectorLayerDataFromCache(fv.curViewTilesInfo,fv.getZoomState());return}if(fz.reloadTimer){clearTimeout(fz.reloadTimer);fz.reloadTimer=null}fv.callbackDataQueue.push([i,fx]);if(fv.processDataTimer){return}fv.processDataTimer=setTimeout(function(){while(fv.callbackDataQueue.length>0){var fA=fv.callbackDataQueue.shift();fv.vectorTileDataCbk(fA[0],fA[1]);fv._checkTilesLoaded()}fv.map._featureMgr.clearData(fv.drawIndex);fv.getVectorLayerDataFromCache(fv.curViewTilesInfo,fv.getZoomState());fv.processDataTimer=null},200)}for(var ft=0,fr=fw.length;ft65536){fB.renderData.base.push({type:"line",data:[dC.toTileSolidLineVertices(fH,4000),new Uint16Array(fK)]});fH=[];fK=[]}for(var fA=0;fA0){fs=fr.labelProcessor.collisionTest(fs,-1)}}else{if(ft||fu){if(this._collisionTimer){if(!ft){clearTimeout(this._collisionTimer)}else{if(Date.now()-fr.lastCollisionTestTime>500){fr.lastCollisionTestTime=Date.now()}else{clearTimeout(this._collisionTimer)}}}this._collisionTimer=setTimeout(function(){fs=fr.labelProcessor.collisionTest(fr.tileLabels);if(fs){i.setLabelData(fs)}fr.updateLabels();fr.map.dispatchEvent(new aD("onrefresh"));fr._collisionTimer=null},60);return}else{fs=fr.labelProcessor.getCachedLabels(fr.tileLabels)}}if(fs){i.setLabelData(fs)}fr.updateLabels();fr.map.dispatchEvent(new aD("onrefresh"))}if(!fp){clearTimeout(fr.cacheLabelTimer);fq()}else{if(fr.cacheLabelTimer){return}fr.cacheLabelTimer=setTimeout(function e(){fq()},fp)}},dataBackCollideLabels:function(){var i=this;if((i.tileLabels&&i.tileLabels.length===0)){return}var e;i.labelProcessor.calcLabelsCollision(i.tileLabels);e=i.labelProcessor.getCachedLabels(i.tileLabels);if(e){i.map._featureMgr.setLabelData(e)}i.updateLabels();i.map.dispatchEvent(new aD("onrefresh"));if(ea()){this.labelProcessor._refreshSpotData()}},updateLabels:function(fr){var fs=this.map;var i=fs._featureMgr;var fp=i.getLabelData();if(fp.length>0){var fq=fs.getZoom();if(fp.labelZoom-fq<3){this.labelProcessor.updateLabels(fp);var e=this.labelProcessor.fixDataFormat(fp);i.setOverlayData(e[0],2);i.setOverlayData(e[1],3);i.setOverlayData(e[2],4)}else{i.clearLabelOverlayData()}fs.temp.isPermitSpotOver=false;this.labelProcessor.curSpotAdded=false}},loadRasterLayerData:function(fq,fu){if(fu){for(var fs=0,fr=fq.length;fs9&&!e.guid){return false}if(e.zoom<=9&&!e.name&&!e.guid){return false}return true}};var bi=5;var cC=4;var e5=3;var dA=2;var fj=1;var cG=0;function s(e){this._ratio=aA();this._iconCache={};this._map=e;this._drawingCanvasPool=[];this._drawingCanvasHeight=4096}y.extend(s.prototype,{_loadIcons:function(i,fu){var fs=0;var fr=this;var fp=this._map.config.style;for(var ft in i){fs++;var e=new Image();e.id=ft;e.crossOrigin="anonymous";e.onload=function(){fr._iconCache[this.id].loaded=true;fs--;if(fs===0){fu()}this.onload=null};e.onerror=function(){fr._iconCache[this.id]=null;fs--;if(fs===0){fu()}this.onerror=null};var fq=ds.getImageFullUrl(fp,ft+".png");e.src=fq;this._iconCache[ft]={loaded:false,image:e}}},_getEmptyDrawingCanvas:function(){for(var fp=0;fp0){while(fs0){fs=0;while(fs0){fs=0;while(fs0){var fK=this;this._loadIcons(fB,function(){fJ=fK._drawEachTypeOfLabels(fD,fC,fL,fv,fu,fz,fH);fL=fJ.curStyleId;fv=fJ.curX;fu=fJ.curY;fz=fJ.curLineHeight;var i=fK._generateEachLabelCanvas(e,fu,fy,fE,fp,fI);fq(i[0],i[1])});return}var fw=this._generateEachLabelCanvas(e,fu,fy,fE,fp,fI);fq(fw[0],fw[1])},drawCustomLabelsOnCanvas:function(ft,fz){if(ft.length===0){fz();return}var fp=0;var e=(ft[0].style.fontSize+(ft[0].style.haloSize||0)*2)||0;var fq=e;var fv=this._getEmptyDrawingCanvas();var fA=fv.getContext("2d");fA.clearRect(0,0,fv.width,fv.height);var fw={};var fy=-1;for(var fr=0;frthis._drawingCanvasHeight){return{curX:fq,curY:fp,curLineHeight:fr,curStyleId:fx}}}return{curX:fq,curY:fp,curLineHeight:fr,curStyleId:fx}},_drawIndoorTextLabelOnCanvas:function(fr){var e=this._getEmptyDrawingCanvas();var fy=e.getContext("2d");fy.clearRect(0,0,e.width,e.height);var fG=0;var fx=null;var fw=0;var fu;var fD={};var fC=[];for(var fs in fr){if(fs==="tileInfo"){continue}var fq=fr[fs];var fB=fq.defaultFloor;var fv=fq.floors;for(var fA=0;fA2){f3=2}var fP=[];var fE=[];var fL=0;if(fq&&!fq[f5]){fq[f5]={}}var fz=fA+f3*2;var fQ=fz;if(ft.containDescendings){fQ+=4}if(f3===0){fQ+=2}if(ft.textOnIcon){fQ=Math.max(fQ,ft.iconSize[1])}if(f5!==i||fQ>fO){i=f5;fF.font=fA+"px sans-serif";if(fQ>fO){var fM=fQ-fO;fO+=fM;fG+=fM}if(f3>0){fF.lineWidth=f3*2;fF.strokeStyle=fs}fF.fillStyle=fX}if(ft.type==="line"){var fv=fN.split("");for(var f6=0;f6512){fH=0;fG+=fQ;fO=fQ}if(fG>this._drawingCanvasHeight){return{curX:fH,curY:fG,curLineHeight:fO,styleId:f5}}var f0=fH;if(f3>0){fp+=f3;f0-=Math.round(f3/2);fF.strokeText(fZ,fH,fG)}fF.fillText(fZ,fH,fG);var fW=[fp,fQ];fI=[Math.round(fW[0]/2),Math.round(fW[1]/2)];fR=[f0,fG-fQ];fq[f5][fZ]={displaySize:fI,curWordPosition:fR,totalHeight:fL};fH+=fp+2}fP.push(fI);fE.push(fR)}fL=Math.round(fP[0][1])}else{if(fq[f5][fN]){var fB=fq[f5][fN];fP=fB.textSize;fE=fB.labelImagePosition;fL=fB.totalHeight}else{var fC=fN.split("\\");if(fC.length>1&&ft.textOnIcon){var f7=0;var f4=0;var f8=[];var fJ=8;for(var f6=0;f6f7){f7=fy}f8.push(Math.round(fy/2));f4+=fQ}var fw=f7+2*fJ;var f2=f4+2*fJ;if(fH+fw>512){fH=0;fG+=fO}fG+=f4-fQ+2*fJ;var fV=fH;var fK=fG-f2;var e=Math.round(fw/2);var fD=this._iconCache[ft.icon].image;this.drawStretchedIcon(fF,fD,[fV,fK],fJ,f7,f4);for(var f6=0;f6512){fH=0;fG+=fQ;fO=fQ}if(fG>this._drawingCanvasHeight){return{curX:fH,curY:fG,curLineHeight:fO,styleId:f5}}var fV=fH;var fK=fG-fQ;var fU=fH;var fT=fG;if(ft.containDescendings){fT-=4}if(ft.textOnIcon){var fD=this._iconCache[ft.icon].image;var fS=ft.iconSize;if(ft.styleId===519){fF.drawImage(fD,0,0,fS[0],fS[1],fV,fK,fS[0],fS[1])}else{this.draw3StretchedIcon(fF,fD,[fV,fK],fr,fy,fS[1])}fU+=fr;if(ft.iconSize[1]>fz){fT-=(ft.iconSize[1]-fz)/2-1}fw+=1}if(f3>0){fw+=f3;fV-=Math.round(f3/2);fF.strokeText(fN,fU,fT)}fF.fillText(fN,fU,fT);var fu=[fw,fQ];var fI=[Math.round(fu[0]/2),Math.round(fu[1]/2)];fP.push(fI);fE.push([fV,fK]);fL+=Math.round(fI[1]);fH+=fw}}fq[f5][fN]={textSize:fP,labelImagePosition:fE,totalHeight:fL}}}ft.textSize=fP;ft.labelImagePosition=fE;ft.totalHeight=fL;return{curX:fH,curY:fG,curLineHeight:fO,styleId:f5}},drawStretchedIcon:function(e,fp,fq,ft,fu,i){var fs=fq[0];var fr=fq[1];e.drawImage(fp,0,0,ft,ft,fs,fr,ft,ft);e.drawImage(fp,ft,0,1,ft,fs+ft,fr,fu,ft);e.drawImage(fp,fp.width-ft,0,ft,ft,fs+fu+ft,fr,ft,ft);e.drawImage(fp,0,ft,ft,1,fs,fr+ft,ft,i);e.drawImage(fp,ft,ft,1,1,fs+ft,fr+ft,fu,i);e.drawImage(fp,fp.width-ft,ft,ft,1,fs+fu+ft,fr+ft,ft,i);e.drawImage(fp,0,fp.height-ft,ft,ft,fs,fr+i+ft,ft,ft);e.drawImage(fp,ft,fp.height-ft,1,ft,fs+ft,fr+i+ft,fu,ft);e.drawImage(fp,fp.width-ft,fp.height-ft,ft,ft,fs+fu+ft,fr+i+ft,ft,ft)},draw3StretchedIcon:function(e,i,fp,fs,fu,ft){var fr=fp[0];var fq=fp[1];e.drawImage(i,0,0,fs,i.height,fr,fq,fs,i.height);e.drawImage(i,fs,0,1,i.height,fr+fs,fq,fu,i.height);e.drawImage(i,i.width-fs,0,fs,i.height,fr+fs+fu,fq,fs,i.height)},_updateFixedLabelCoords:function(fr,fG){if(fG===0){return}var fB=[];var fN=[];var fO=0;var fE=fr.totalHeight;var fW=fr.textSize.length;var fs=fr.direction;if(typeof fs!=="number"){fs=0}for(var fP=0;fPfp){fp=fA}if(fye){e=fy}}}if(fw.custom&&fw.style.iconSize&&!fw.name){var fx=fw.style.iconSize;var fz=fw.direction;switch(fz){case cC:fs=-Math.round(fx[0]/2);fq=-Math.round(fx[1]/2);fp=Math.round(fx[0]/2);e=Math.round(fx[1]/2);break;case dA:fs=-Math.round(fx[0]/2);fq=0;fp=Math.round(fx[0]/2);e=fx[1];break}}if(fw.textPos){var ft=fw.textPos["vertex"];for(var fv=0,fr=ft.length;fvfp){fp=fA}if(fye){e=fy}}}fw.bds=[fs,fq,fp,e]},_updateLineLabelCoords:function(fH,fx){if(fx===0){return}var fq=fH.wordsInfo;var fE=fH.wordCount;if(!fH.labelImagePosition){return}var fz=fH.labelImagePosition.slice(0);if(fH.reverse){fz.reverse()}var fQ=1000;var fN=1000;var fO=-1000;var fM=-1000;for(var fI=0;fIfO){fO=fG}if(fsfM){fM=fu}}fH.bds=[fQ,fN,fO,fM]}});var bK={0:"00000000",16:"00010000",32:"00100000",48:"00110000",64:"01000000",96:"01100000"};function bt(fp,fq,fr){var e=fp.bds;if(!e){return false}var i=fp.tracer;var fu;if(i){if(!bK[i]){fu=i.toString(2);if(fu.length<8){fu=new Array(8-fu.length+1).join("0")+fu}bK[i]=fu}fu=bK[i];var ft=b7.mapZoomStartZoomMapping[fq];return fu[fq-ft]==="1"}var fs=fp.displayRange;if(fr>=fs[0]&&fr<=fs[1]){return true}return false}function b8(i,e){this.map=i.map;this.layer=i;e=e||[];this.allLabels=[];this._spotData=[];this._strategyInfo=null;this.RANK1=1000000;this.RANK2=2000000;this.RANK3=3000000;this.RANK4=4000000;this.RANK5=5000000;this._ratio=aA();this._useRound=true;this._sharpenRender=false;if(this._ratio>1.5){this._useRound=false;this._sharpenRender=true}this._mapIsMoving=false;this._onMapIdleCallback=e.onMapIdleCallback;this.map.temp.isPermitSpotOver=true;this.currentSelectedLabel=null;this.map._labelProcessor=this;this.iconCache={};this.fixedLabelData=[];this.lineLabelData=[];this.highlightLabelData=[];this._iconLoadTimer=null;this._labelTextCanvas=null;if(this.map.config.textRenderType==="canvas"){this._labelTextCanvas=this.map.tileMgr.getLabelTextCanvas()}this.bind()}y.extend(b8.prototype,{bind:function(){var fp=this.map;var i=this;fp.addEventListener("mapstatusbusy_inner",function(fq){i._mapIsMoving=true;if(i._ratio>1.5){i._sharpenRender=false}else{i._useRound=false}});fp.addEventListener("mapstatusidle_inner",function(fq){if(i._ratio>1.5){i._sharpenRender=true}else{i._useRound=true}i._mapIsMoving=false});fp.addEventListener("onspotmouseover",function(fs){if(!this.temp.isPermitSpotOver){return}if(fs.spots.length>0){var fr=fs.spots[0].userdata.uid;var ft=fs.spots[0].userdata.tilePosStr;var fq=i.getLabelByUid(fr,ft);fq&&fq.formatedData&&i._toHighlightColor(fq.formatedData)}});fp.addEventListener("onspotmouseout",function(fs){if(!this.temp.isPermitSpotOver){return}if(fs.spots.length>0){var fr=fs.spots[0].userdata.uid;var ft=fs.spots[0].userdata.tilePosStr;var fq=i.getLabelByUid(fr,ft);fq&&fq.formatedData&&i._toDefaultColor(fq.formatedData)}});fp.addEventListener("spotclick",function(fs){if(fs.spots&&fs.spots.length>0){if(fs.spots[0].userdata.zoom<10){return}var fr=fs.spots[0].userdata.uid;var ft=fs.spots[0].userdata.tilePosStr;if(i.currentSelectedLabel&&(i.currentSelectedLabel.uid!==fr||i.currentSelectedLabel.tilePosStr!==ft)){i._recoverNormalState()}var fq=i.getLabelByUid(fr,ft);fq&&i._changeBaseMapState(fq)}else{i._recoverNormalState()}});fp.on("spot_status_reset",function(){i._recoverNormalState()});fp.on("spot_highlight",function(fr){var fq=i.getLabelByUid(fr.uid,fr.tilePosStr);fq&&fq.formatedData&&i._toHighlightColor(fq.formatedData)});fp.addEventListener("mousemove",function(fq){if(i.curSpotAdded){return}if(this.currentOperation!==cA.idle||i._mapIsMoving===true){return}i._refreshSpotData();this.temp.isPermitSpotOver=true;i.curSpotAdded=true});if(ea()){function e(){i._refreshSpotData()}fp.addEventListener("mapstatusidle_inner",e)}fp.on("style_loaded",function(){if(i.map.config.textRenderType==="canvas"&&!i._labelTextCanvas){i._labelTextCanvas=i.map.tileMgr.getLabelTextCanvas()}})},getLabelByUid:function(ft,fu){var e=this.map._featureMgr.getResult().tileLabels;for(var fs=0;fs=0&&fU<45)||(fU>=315&&fU<360)){fV=f2;fT=f0;fB=fD;fA=fC}else{if(fU>=45&&fU<135){fV=f0;fT=-fD;fB=fC;fA=-f2}else{if(fU>=135&&fU<225){fV=-fD;fT=-fC;fB=-f2;fA=-f0}else{if(fU>=225&&fU<315){fV=-fC;fT=f2;fB=-f0;fA=fD}}}}fs._tempBds=[fK+fV,fI+fT,fK+fB,fI+fA];fZ.push(fs)}}var fW=this._strategyInfo;if(fW){var fz=fW.guid;var fH=fW.guidExt;var fp=false;for(var f6=0,f4=fZ.length;f60){fq=6}var fy=fF.getZoom();if(fy>=8&&fy<9){fy<8.5?(fq=6):(fq=3)}if(fF._displayOptions.labelMargin){fq=fF._displayOptions.labelMargin}var e=2;if(fy<6&&fy>=5){e=-1}for(var f6=0,f4=fZ.length;f6f7[2]+fq+e||fx[3]+fq+ef7[3]+fq+e)){fS._intersectIdx.push(f5)}}}for(var f6=0,f4=fZ.length;f6=0.5?e+0.5:e;return i},clearCollisionCache:function(e){if(!e){return}e.cacheState=null;e.unnecessaryCollisionTest=null},getCachedLabels:function(e){e=e||[];var fp=this.getZoomStep();var fr=[];var ft=false;for(var fq=0;fqe){fw.isDel=true}if(fw.isDel){continue}var fC=fw.pt;var fp=fw.iconPos;if(fp&&fp.texcoord){if(!fp.rtVertex){fp.rtVertex=[];var fE=fp.vertex;var ft=ag(fC.lng);var fB=ag(fC.lat);fp.rtVertex=[ft[0],fB[0],ft[1],fB[1],0,fE[0],fE[1],0,0,fp.texcoord[0],fp.texcoord[1],ft[0],fB[0],ft[1],fB[1],0,fE[2],fE[3],0,0,fp.texcoord[2],fp.texcoord[3],ft[0],fB[0],ft[1],fB[1],0,fE[4],fE[5],0,0,fp.texcoord[4],fp.texcoord[5],ft[0],fB[0],ft[1],fB[1],0,fE[6],fE[7],0,0,fp.texcoord[6],fp.texcoord[7],ft[0],fB[0],ft[1],fB[1],0,fE[8],fE[9],0,0,fp.texcoord[8],fp.texcoord[9],ft[0],fB[0],ft[1],fB[1],0,fE[10],fE[11],0,0,fp.texcoord[10],fp.texcoord[11]]}}var fD=fw.textPos;if(fD){if(!fD.rtVertex){fD.rtVertex=[];var fE=fD.vertex;var fu=fD.rtVertex;var ft=ag(fC.lng);var fB=ag(fC.lat);var fG=ag(fq);for(var fy=0,fF=fE.length;fy45&&fV<315){if(fV>45&&fV<=135){fR=270}else{if(fV>135&&fV<=225){fR=180}else{if(fV>225&&fV<315){fR=90}}}if(fH>225&&fH<=315&&fR<=180){fD=true}else{if((fH>=0&&fH<=45||fH>=315&&fH<360)&&fR>=180){fD=true}}}}for(var fX=0,fz=fJ.length;fX=360){e-=360}while(e<0){e+=360}return e},fixDataFormat:function(fy){var fq=this.fixedLabelData;var e=this.lineLabelData;var fp=this.highlightLabelData;var fF=0;var fu=0;var fD=0;var fE;if(this.currentSelectedLabel){var ft=this.getLabelByUid(this.currentSelectedLabel.guid,this.currentSelectedLabel.tilePosStr);if(!ft||ft.isDel){fq[fF]=this.currentSelectedLabel.formatedData;fF++;fp[fD]=this.currentSelectedLabel.formatedData;fD++}}for(var fC=0;fCfq)){continue}var i=fr[e].spot||this._getSpotDataFromLabel(fr[e]);if(i){this._spotData.push(i)}}},_getSpotDataFromLabel:function(fp){var fs=this.map;if(!fp.bds){return null}var e=fp.bds.slice(0);var fq=null;if(fp.iconPos){fq=new e7(fp.pt.lng,fp.pt.lat)}var i=fp.name?fp.name.replace("\\\\","
"):"";if(fp.iconPos&&fp.iconPos.iconType.indexOf("ditie")>-1&&fs.getZoom()>14){i=""}var fr={n:i,pt:new e7(fp.pt.lng,fp.pt.lat),userdata:{iconPoint:fq,uid:fp.guid,name:i,mapPoi:true,type:fp.iconPos?fp.iconPos.iconType:"",rank:fp.rank,zoom:fp.zoom,tilePosStr:fp.tilePosStr},bd:e,tag:"MAP_SPOT_INFO"};fp.spot=fr;return fr},drawLabelsOnCanvas:function(i,e){this._labelTextCanvas.drawLabelsOnCanvas(i,e)}});function d0(e){this._map=e;this.virtualTile={custom:true,label:{fixedLabel:[],indoorLabel:[],lineLabel:[],textureHeights:[],status:"ready"},tileInfo:{col:0,row:0,zoom:0,useZoom:0,loopOffsetX:0},status:"ready"};this.virtualTile.label.tileInfo=this.virtualTile.tileInfo;this.init()}d0.prototype.init=function(){var fp=this._map;var i=this;function e(){i.updateLabels()}fp.addEventListener("add_tile_labels",e);fp.addEventListener("onremove_tile_labels",e);fp.addEventListener("onclear_labels",e)};d0.prototype.updateLabels=function(){var i=this._map.tileMgr.getLabelTextCanvas();var fp=this._map;var e=this;i.drawCustomLabelsOnCanvas(fp._customTileLabels,function(fr){var fq=e.virtualTile;if(fr){fq.label.textureHeights[0]=[fr.height]}fq.label.fixedLabel=fp._customTileLabels;var fs=new aD("oncustom_labels_ready");fs.virtualTile=fq;fs.labelCanvas=fr;fs.imgKey=aK.getGUID("custom_labels_");fp.dispatchEvent(fs)})};aK.register(function(e){e._customLabelMgr=new d0(e)});function dc(i){var fq=null;try{if(ch.inMapHost&&!dk.isGLApi){fq=new Worker(i);fq.onerror=function(e){e.preventDefault();fq=q(i)}}else{fq=q(i)}}catch(fp){fq=q(i)}return fq}function q(fs){var fv=null;try{var fp;try{fp=new Blob(['importScripts("'+fs+'");'],{type:"application/javascript"})}catch(ft){var fr=new (window.BlobBuilder||window.WebKitBlobBuilder||window.MozBlobBuilder)();fr.append('importScripts("'+fs+'");');fp=fr.getBlob("application/javascript")}var fq=window.URL||window.webkitURL;var i=fq.createObjectURL(fp);fv=new Worker(i);fv.postMessage({action:"setConfig",isWgs84:dk.isWgs84})}catch(fu){}return fv}function ee(e){this.init(e)}var aE={init:function(fp){var i=this;this.map=fp;this.arrPendingData=[];var e=navigator.hardwareConcurrency||4;if((ea()||y.Browser.ie)&&e>2){e=2}this.arrWorker=[];this.ratio=aA();this.wordSpaceRatio=this.ratio;if(this.ratio>1){this.textSizeRatio=2}else{this.textSizeRatio=1}bR.canUseWebAssembly(function(fq){var ft;if(fq){ft="https://mapopen.cdn.bcebos.com/cms/bmapgl/worker_wasm_dalezt.js"}else{ft="https://mapopen.cdn.bcebos.com/cms/bmapgl/worker_asm_r351qg.js"}if(dk.isOffline){ft=dk.host999+ft;ft=ft.replace("https://mapopen.cdn.bcebos.com/cms/bmapgl/","/baidumap/bmapgl/api/")}for(var fs=0;fs0){var fz=i.arrPendingData.shift();var fw=fz.cbk;i.loadTileData(fz.url,fz.tileInfo,fz.tileKey,fw)}var fy=new aD("onrefresh");fy.source="workermgr";fp.fire(fy)};i.arrWorker.push(fv)}if(i.arrPendingData.length>0){for(var fs=0;fs=0;fs--){var fu=ft[fs];var e=fu.tileInfo;if(fp.tileTypeName!==e.tileTypeName){continue}var fr="id_"+e.col+"_"+e.row+"_"+e.zoom;if(!fp[fr]){ft.splice(fs,1);fq.push(e)}}return fq},loadTileData:function(e,fp,fx,fw){var fq=this.getIdleWorker();if(fq){fq._cbk=fw;fq._parsingTileInfo=fp;fq._parsingTileKey=fx;var i={action:"loadTileData",config:{},url:e,tileInfo:fp,tileKey:fx};var fu=this.map.getMapStyleId();var ft=!!(fu.indexOf("custom")===0);var fs=fu;if(ft){fs="Custom"}if(!fq.isSendFS){if(!ee["stringifiedFeatureStyle"+fu]&&aK["FeatureStyle"+fu]){ee["stringifiedFeatureStyle"+fu]=JSON.stringify(aK["FeatureStyle"+fu])}if(!ee["stringifiedIconSetInfo"+fs]){ee["stringifiedIconSetInfo"+fs]=JSON.stringify(aK["iconSetInfo"+fs])}if(!ee.stringifiedIndoorStyle){ee.stringifiedIndoorStyle=JSON.stringify(aK.indoorStyle)}if(ft&&aK.customStyleInfo){if(!ee.stringifiedCustomStyleInfo){ee.stringifiedCustomStyleInfo=JSON.stringify(aK.customStyleInfo)}}if(ee["stringifiedFeatureStyle"+fu]){i.featureStyle=ee["stringifiedFeatureStyle"+fu]}i.iconSetInfo=ee["stringifiedIconSetInfo"+fs];i.indoorStyle=ee.stringifiedIndoorStyle;if(ft&&ee.stringifiedCustomStyleInfo){i.customMapStyle=ee.stringifiedCustomStyleInfo}i.iconInfo={wordSpaceRatio:this.wordSpaceRatio,textSizeRatio:this.textSizeRatio};i.mapStyleId=fu;i.mapConfig={enableIndoor:this.map.config.enableIndoor};fq.isSendFS=true}var fv=this.map._customStyle;if(fv){fq.postMessage({action:"setCustomStyle",customStyle:fv})}fq.postMessage(i)}else{var fr={url:e,tileInfo:fp,tileKey:fx,cbk:fw};this.arrPendingData.push(fr)}}};y.extend(ee.prototype,aE);function cz(i){this.tileLayers=[];this.map=i;var e=this.config=bg[this.map.mapType];this.errorUrl=e.errorUrl;this.tileSize=e.tileSize;this.baseUnits=e.baseUnits;this.baseZoomLevel=e.zoomLevelBase;this.tileURLs=e.tileUrls;this.tilesInfoCache={};this.loadDelay=10;this._labelTextCanvas=null}aK.register(function(i){if(i._renderType!=="webgl"){return}var e=i.tileMgr=new cz(i);i.addEventListener("addtilelayer",function(fq){e.addWebGLLayer(fq.target)});i.addEventListener("removetilelayer",function(fq){e.removeWebGLLayer(fq.target)});i.on("update",function fp(fq){if(!aK["FeatureStyle"+this.config.style]&&!aK.customStyleLoaded){return}e.loadLayersData({zoomChanged:fq.changedStatus.onzoom_changed?true:false})});i.on("style_changed",function(){e.loadLayersData()})});y.extend(cz.prototype,{addWebGLLayer:function(fq){this.tileLayers.push(fq);fq.initDrawData();if(this.tileLayers.length>1){for(var fp=1;fp50);if(!e){if(!this.syncLoadTimer){this.syncLoadTimer=setTimeout(function(){fq._loadLayersFromCache(fp);fq.syncLoadTimer=null},40)}}else{this._loadLayersFromCache(fp)}this.timer&&window.clearTimeout(this.timer);this.timer=window.setTimeout(function(){var fs=fq.tileLayers.length;fq.tilesInfoCache={};for(var ft=0;ft0});var fp=fu.length;this.tilesInfoCache={};for(var fq=0;fqcH._mc180X){var fA=cH.getSpaceDistanceInPixel(ft);fS=Math.ceil(fA/fr)}if(fL.sw.lng19505879.362428114||fL.sw.lat<-15949096.637571886){if(!dk.isGLApi){fL=fL.clone()}fL.ne.lat=19505879.362428114;fL.sw.lat=-15949096.637571886}var fx=[Math.floor(fL.sw.lng/fG)-fp,Math.floor(fL.sw.lat/fG)];var f2=[Math.floor(fL.ne.lng/fG)+fS,Math.floor(fL.ne.lat/fG)];if(dk.isWgs84){var fs=Math.PI*6378137;var fx=[Math.floor((fL.sw.lng+fs)/fG)-fp,Math.floor((fL.sw.lat+fs)/fG)];var f2=[Math.ceil((fL.ne.lng+fs)/fG)+fS,Math.ceil((fL.ne.lat+fs)/fG)]}fF=fx[0];fV=f2[0]+1;fM=fx[1];fZ=f2[1]+1;var fB=[];for(var fy=fF;fy=0?fy-fu:fy+fu;var fI="id_"+fH+"_"+fD+"_"+ft;if(!fB[fI]){var fz={col:fH,row:fD,zoom:ft,useZoom:fX,loopOffsetX:0,tileSize:fN,baseTileSize:fr,mercatorSize:fG};fB.push(fz);fB[fI]=true}}}if(this.map._tilt>0){for(var f1=0;f10&&fE.x0&&fE.yfQ.lng&&fR.minYfQ.lat){continue}if(!this.ifTileInMapBounds(fR,fL,fY,f3)){fB.splice(f1,1);f1--}}}fB.sort((function(i){return function(f5,f6){return((0.4*Math.abs(f5.col-i[0])+0.6*Math.abs(f5.row-i[1]))-(0.4*Math.abs(f6.col-i[0])+0.6*Math.abs(f6.row-i[1])))}})([fK,fv]));fB.zoom=ft;fB.tileTypeName=f4;return fB},getCurrentViewTilesInfo:function(i){var e=this.tilesInfoCache[i.getName()];if(!e){return this.calcTilesInfo(i)}return e},ifTileInMapBounds:function(e,fs,fp,fr){var i=fs.normalizedBottomLeft;var fD=fs.normalizedTopRight;var fv=fs.normalizedTopLeft;var ft=fs.normalizedBottomRight;var fq=false;var fC=new e7(e.minX,e.minY);var fz=new e7(e.maxX,e.maxY);var fu=new e7(fz.lng,fC.lat);var fA=new e7(fC.lng,fz.lat);var fx=[fA,fz,fu,fC];for(var fB=0,fw=fx.length;fB=e._autoEnterZoom){e._checkIndoorByMove()}});i.on("zoomend",function(){if(this.getZoom()>=e._autoEnterZoom){e._checkIndoorByMove()}else{if(e.enterMethod!=="byClick"&&e.currentUid!==null){this.showIndoor(null)}}})};ar.prototype._checkIndoorByMove=function(){var fp=this._map;var fw=fp.getSize();var fB={x:fw.width/2,y:fw.height/2};var fA=Math.max(fw.width,fw.height);var fC=[];for(var fx in this._indoorData){var e=this._indoorData[fx].center;var fq=fp.pointToPixel(new aK.Point(e[0],e[1]));var ft=eL(fB,fq);fC.push({uid:fx,distance:ft})}if(fC.length===0){return}fC.sort(function(fD,i){return fD.distance-i.distance});var fs=fC[0];var fy=fp.getCenter();var fr=false;for(var fv=0;fvfu[0]&&fy.lat>fu[1]&&fy.lng=this._autoEnterZoom){this._checkIndoorByMove()}};ar.prototype.removeData=function(fp,fr){if(!this._indoorData[fp]){return}var fq=this._indoorData[fp];for(var e=0;efH){fC=fH}var fA=fD[1][fC][0];var fE=fA[fF];if(!fE){if(fG==="point"||fG==="pointText"){fA=fD[1][fI][0];fE=fA[fF]}}return{drawId:fE,style:fB,styleUpdate:[]}}function fp(fE,fF,fI,fH){if(!fH){return{drawId:null,style:[],styleUpdate:[]}}var fG;var fC=fH.baseFs;if(fx(fH.zoomRegion)){fG=fH.StyleBody||[]}else{fG=fH.zoomStyleBody[fI]||[]}var fB=fC[2];switch(fF){case"point":fB=fB[0];fG=fG[0]||{};break;case"pointText":fB=fB[1];fG=fG[1]||{};break;case"line":fB=fB[3];fG=fG[3]||{};break;case"polygon":fB=fB[4];fG=fG[4]||{};break;case"polygon3d":fB=fB[5];fG=fG[5]||{};break}var fA=fC[1][fI-1][0];var fD=fA[fE];return{drawId:fD,style:fB,styleUpdate:fG}}function fs(fB,fA){if(!fB||fB.length===0){return null}return{sid:fA,fontRgba:i(fB[0]),haloRgba:i(fB[1]),backRgba:i(fB[2]),fontSize:fB[3],haloSize:fB[4],fontWeight:fB[5],fontStyle:fB[6],density:fB[7]}}function e(fB,fA){return{sid:fA,rank:fB[0],ucflag:fB[1],icon:fB[2],iconType:fB[3],nineGG:fB[4],density:fB[5],zoom:fB[6]}}function fu(fB,fA){return{sid:fA,borderRgba:i(fB[0]),fillRgba:i(fB[1]),borderWidth:fB[2],fillWidth:fB[3],borderCap:fB[4],fillCap:fB[5],haveBorderLine:fB[6],haveBorderTexture:fB[7],haveFillTexture:fB[8],isUseBorderRgba:fB[9],isUseFillRgba:fB[10],borderTexture:fB[11],fillTexture:fB[12],borderTextureType:fB[13],fillTextureType:fB[14],isRealWidth:fB[15],haveArrow:fB[16],needRound:fB[17],realBorderWidth:fB[18]}}function fr(fB,fA){return{sid:fA,fillRgba:i(fB[0]),borderRgba:i(fB[1]),borderWidth:fB[2],borderTexture:fB[3],borderTextureType:fB[4],waterStyle:fB[5],haloStyle:fB[6],textureStyle:fB[7],thickRgba:i(fB[8])}}function ft(fB,fA){return{sid:fA,filter:fB[0],ratio:fB[1],haveBorder:fB[2],borderWidth:fB[3],borderRgba:i(fB[4]),fillTop:i(fB[5]),fillSide:i(fB[6]),polyTexture:fB[7]}}function i(fF){var fE=fF;if(fv[fE]){return fv[fE]}fF=fF>>>0;var fD=(fF)&255;var fC=(fF>>8)&255;var fA=(fF>>16)&255;var fB=(fF>>24)&255;fv[fE]=[fD,fC,fA,fB];return fv[fE]}return{getStyleFromCache:function(fH,fC,fF,fG,fB,fE,fA){if(typeof isWgs84==="boolean"&&isWgs84){fG=fG+1}fH=fH||"default";var fD=fH+"-"+fC+"-"+fF+"-"+fG;if(fE){fD+="-indoor"}if(fB){if(!fz[fD]){fz[fD]=fw(fC,fF,fG,fB)}return fz[fD]}if(!fq[fD]){fq[fD]=fw(fC,fF,fG,fB,fA)}return fq[fD]}}})();aK.register(function(i){var e=new cq(i)});function cq(e){e.container.appendChild(this.render());this.bind(e)}cq.prototype.render=function(){var i=document.createElement("div");i.className="click-ripple-container";var e=document.createElement("div");e.className="click-ripple";i.appendChild(e);this._div=i;this._ripple=e;return i};cq.prototype.bind=function(i){var e=this;i.addEventListener("spotclick",function(fp){if(!fp.spots||fp.spots.length===0){return}e._div.style.left=fp.pixel.x+"px";e._div.style.top=fp.pixel.y+"px";y.ac(e._ripple,"ripple-playing")});y.on(e._ripple,"transitionend",function(){y.rc(e._ripple,"ripple-playing")})};function d8(e){cN.call(this);if(!e){return}this._opts={};this._map=e;this._maxLat=84.6;this._minLat=-80.6;this._maxLatMC=cU.convertLL2MC(new bV(this._maxLat,0)).lat;this._minLatMC=cU.convertLL2MC(new bV(this._minLat,0)).lat}d8.inherits(cN,"ToolbarItem");y.extend(d8.prototype,{open:function(){if(this._isOpen==true){return true}if(this._map._toolInUse){return false}this._map._toolInUse=true;this._isOpen=true;return true},close:function(){if(!this._isOpen){return}this._map._toolInUse=false;this._isOpen=false},_checkStr:function(e){if(!e){return""}return e.replace(//g,">")}});function eG(fp,i){d8.call(this,fp);i=i||{};this._opts=y.extend(y.extend(this._opts||{},{autoClear:false,tips:"测距",followText:"单击确定起点,双击结束绘制",unit:"metric",showResult:true,lineColor:"blue",lineStroke:2,opacity:1,lineStyle:"solid",cursor:ds.distCursor,styleCodes:{lnCode:0,spCode:0,slCode:0,tlCode:0},enableMassClear:true}),i);if(this._opts.showResult===false){if(typeof i.tips==="undefined"){this._opts.tips="绘制折线"}if(!i.cursor){this._opts.cursor="crosshair"}}if(this._opts.lineStroke<=0){this._opts.lineStroke=2}if(this._opts.opacity>1){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:"米",u2:"公里"},us:{name:"us",conv:3.2808,incon:5279.856,u1:"英尺",u2:"英里"}};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=ds.distCursor;if(this._opts.showResult){this._opts.followText="单击确定起点"}this._followTextM="单击确定地点,双击结束";this._sectionMarkerTip="单击可删除此点,拖拽可调整位置";this._movingTimerId=null;if(this._opts.showResult){this.text="测距"}else{this.text="绘线"}this._isOpen=false;var e=this;cL.load("tools",function(){e._draw()})}eG.inherits(d8,"PolylineTItem");y.extend(eG.prototype,{setLineColor:function(e){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 fp=0,e=this._overlays.length;fpfv){fp-=fr;ft-=this._loopOffset}while(fpthis._mc180X){e-=this._mcTSpan}while(ethis._mc180X){i.lng-=this._mcTSpan;e-=this._mcTSpan;fr-=this._mcTSpan}while(i.lng=fx){var fw=fq+fz;if(this.isTileBlank(fw,e,fC)===true){continue}var fp="id_"+fw+"_"+fD+"_"+e;if(!fy[fp]){fy[fp]=true;fA.push([fw,fD,e,0])}}else{if(fq<=ft){var fw=fq-fz;if(this.isTileBlank(fw,e,fC)===true){continue}var fp="id_"+fw+"_"+fD+"_"+e;if(!fy[fp]){fy[fp]=true;fA.push([fw,fD,e,0])}}}}for(var fu=0,fs=fA.length;fu=0;fu--){var fq=fy[fu][0];if(this.isTileBlank(fq,e,fC)){fy.splice(fu,1)}}return fy},isTileBlank:function(fp,fr,e){var fs=Math.pow(2,fr-3);var i=Math.round(this._validPixels*fs);var fq=6*fs*256/e;while(fp>fq/2-1){fp-=fq}while(fp<-(fq/2)){fp+=fq}if(fp>0&&fp*e>i){return true}if(fp<0&&Math.abs((fp+1)*e)>i){return true}return false},isAddWidth:function(e,i){return ethis._mc180X},getSpaceDistanceInPixel:function(i){var e=Math.round((this._spaceDistance+this._mSpaceDistance)/Math.pow(2,18-i));return e}};var cH=new bx();var eP={parseHexToRgbaArray:function(fs){var ft=fs.replace("#","");if(ft.length===3){ft+="f"}else{if(ft.length===6){ft+="ff"}}var e=[];var fr=ft.length;var fq=fr===8?2:1;for(var fp=0;fp=0&&fr<60){ft=fu;fs=fp;e=0}else{if(fr>=60&&fr<120){ft=fp;fs=fu;e=0}else{if(fr>=120&&fr<180){ft=0;fs=fu;e=fp}else{if(fr>=180&&fr<240){ft=0;fs=fp;e=fu}else{if(fr>=240&&fr<300){ft=fp;fs=0;e=fu}else{if(fr>=300&&fr<360){ft=fu;fs=0;e=fp}}}}}}ft=(ft+i)*255;fs=(fs+i)*255;e=(e+i)*255;return[Math.round(ft),Math.round(fs),Math.round(e)]}};var bm=(function(){var e=true;var fq=256;var fs=af("ditu","normalTraffic");var fp=fs.udt;var ft="https://sp3.baidu.com/7_AZsjOpB1gCo2Kml5_Y_DAcsMJiwa/traffic/";var fr=[[2,"79,210,125,1",3,2,0,[],0,0],[2,"79,210,125,1",3,2,0,[],0,0],[2,"79,210,125,1",4,2,0,[],0,0],[2,"79,210,125,1",5,2,0,[],0,0],[2,"79,210,125,1",6,2,0,[],0,0],[2,"255,208,69,1",3,2,0,[],0,0],[2,"255,208,69,1",3,2,0,[],0,0],[2,"255,208,69,1",4,2,0,[],0,0],[2,"255,208,69,1",5,2,0,[],0,0],[2,"255,208,69,1",6,2,0,[],0,0],[2,"232,14,14,1",3,2,0,[],0,0],[2,"232,14,14,1",3,2,0,[],0,0],[2,"232,14,14,1",4,2,0,[],0,0],[2,"232,14,14,1",5,2,0,[],0,0],[2,"232,14,14,1",6,2,0,[],0,0],[2,"181,0,0,1",3,2,0,[],0,0],[2,"181,0,0,1",3,2,0,[],0,0],[2,"181,0,0,1",4,2,0,[],0,0],[2,"181,0,0,1",5,2,0,[],0,0],[2,"181,0,0,1",6,2,0,[],0,0],[2,"255,255,255,1",4,0,0,[],0,0],[2,"255,255,255,1",5.5,0,0,[],0,0],[2,"255,255,255,1",7,0,0,[],0,0],[2,"255,255,255,1",8.5,0,0,[],0,0],[2,"255,255,255,1",10,0,0,[],0,0]];var i=new bJ({transparentPng:true,dataType:2,cacheSize:256,clipTile:true});i.zIndex=2;i.getTilesUrl=function(fw,fx){if(!fw||fx<7){return null}var fv=fw.x;var fy=fw.y;var fz="vtraffic";if(dk.isOffline){fz="traffic"}var fu=ft+"?qt="+fz+"&z="+fx+"&x="+fv+"&y="+fy+"&udt="+fp;return fu};i.setColors=function(fu){for(var fx=0;fx