window.B_BUSINESS_INFO={"business":1,"unauth":0,"popup_code":"HQGAAhd8oy","popup_block_time":60,"popup_timestamp":1792376985,"watermark_ratio":0,"signature":"73b3ba","sign_content":"{\"business\":1,\"unauth\":0,\"popup_code\":\"HQGAAhd8oy\",\"popup_block_time\":60,\"popup_timestamp\":1792376985,\"watermark_ratio\":0}"};window.B_HOST_TILE_ONLINE_URLS=["apimaponline0.bdimg.com","apimaponline1.bdimg.com","apimaponline2.bdimg.com","apimaponline3.bdimg.com"];window.B_HOST_TILE_BASE_URLS=["apimaponline0.bdimg.com\/starpic\/?qt=satepc&","apimaponline1.bdimg.com\/starpic\/?qt=satepc&","apimaponline2.bdimg.com\/starpic\/?qt=satepc&","apimaponline3.bdimg.com\/starpic\/?qt=satepc&"];window.TILE_VERSION={"ditu":{"normal":{"version":"088","updateDate":"20261015"},"satellite":{"version":"009","updateDate":"20261015"},"normalTraffic":{"version":"081","updateDate":"20261015"},"satelliteTraffic":{"version":"083","updateDate":"20261015"},"mapJS":{"version":"104","updateDate":"20261015"},"satelliteStreet":{"version":"083","updateDate":"20261015"},"earthVector":{"version":"001","updateDate":"20261015"}},"webapp":{"high_normal":{"version":"001","updateDate":"20261015"},"lower_normal":{"version":"002","updateDate":"20261015"}},"api_for_mobile":{"vector":{"version":"002","updateDate":"20261015"},"vectorIcon":{"version":"002","updateDate":"20261015"}}};window.MSV={"mapstyle":{"version":"001","updateDate":"20261013"}};window.BMAP_AUTHENTIC_KEY="ltatYNDtOxO4SWpwsSgHcIJfW9H5q8HQ";window.BMapGL=window.BMapGL||{};(function(cu,h4){var ht=ht||{version:"20150702",emptyFn:function(){}};(function(){ht._log=[];var i=0;var C={};ht.BaseClass=function(oH){C[(this.hashCode=(oH||ht.BaseClass.guid()))]=this;if(!oH&&typeof kS!=="undefined"&&kS.sendMessage){var T=this.toString();if(!T||T.indexOf("[object")===0){T=this._className}if(T){kS.sendMessage(T)}}};ht.BaseClass.guid=function(){return"mz_"+(i++).toString(36)};ht.BaseClass.create=function(){var T=new ht.BaseClass();T.decontrol();return T};var e=ht.instance=ht.I=function(T){return C[T]};ht.BaseClass.prototype.dispose=function(){if(this.hashCode){delete C[this.hashCode]}for(var T in this){if(typeof this[T]!="function"){delete this[T]}}};ht.BaseClass.prototype.getHashCode=function(){if(!this.hashCode){C[(this.hashCode=ht.BaseClass.guid())]=this}return this.hashCode};ht.BaseClass.prototype.decontrol=function(){delete C[this.hashCode]};ht.BaseClass.prototype.toString=function(){return"[object "+(this._className||"Object")+"]"};ht.BaseClass.prototype._wlog=function(oH,oI){var T=ht._log;if(T.length>100){T.reverse().length=50;T.reverse()}T[T.length]="["+oH+"]["+(this._className||"Object")+" "+this.hashCode+"] "+oI}})();Function.prototype.inherits=function(oH,T){var e,oI,oK=this.prototype,oJ=function(){};oJ.prototype=oH.prototype;oI=this.prototype=new oJ();if(typeof(T)=="string"){oI._className=T}for(e in oK){oI[e]=oK[e]}this.prototype.constructor=oK.constructor;oK=oJ=null;return oI};ht.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};ht.BaseClass.prototype.on=ht.BaseClass.prototype.addEventListener=function(C,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(C.indexOf("on")!==0){C="on"+C}if(typeof e[C]!=="object"){e[C]={}}var T=i.hashCode||ht.BaseClass.guid();i.hashCode=T;if(e[C][T]){this._wlog("warning","repeat key:"+T)}e[C][T]=i};ht.BaseClass.prototype.off=ht.BaseClass.prototype.removeEventListener=function(C,i){if(typeof i=="function"){i=i.hashCode}else{if(typeof i!=="string"&&typeof i!=="undefined"){return}}if(!this._listeners){this._listeners={}}if(C.indexOf("on")!=0){C="on"+C}var e=this._listeners;if(!e[C]){return}if(i===undefined){e[C]={};return}if(e[C][i]){delete e[C][i]}};ht.BaseClass.prototype.fire=ht.BaseClass.prototype.dispatchEvent=function(T){if(!this._listeners){this._listeners={}}var C,e=this._listeners,oH=T.type;if(!T.point&&T.pointMC&&typeof K!=="undefined"&&typeof m5!=="undefined"&&m5.convertMC2LL){if(!K.apiVersionIsGL()){T.point=m5.convertMC2LL(T.pointMC)}else{T.point=T.pointMC}}T.target=T.srcElement=T.target||T.srcElement||this;T.currentTarget=this;if(typeof this[oH]=="function"){this[oH](T)}if(typeof e[oH]=="object"){for(C in e[oH]){if(typeof e[oH][C]=="function"){e[oH][C].call(this,T)}}}return T.returnValue};ht.BaseEvent.prototype.inherit=function(C){var i=this;this.domEvent=C=window.event||C;i.clientX=C.clientX||C.pageX;i.clientY=C.clientY||C.pageY;i.offsetX=C.offsetX||C.layerX;i.offsetY=C.offsetY||C.layerY;i.screenX=C.screenX;i.screenY=C.screenY;i.ctrlKey=C.ctrlKey||C.metaKey;i.shiftKey=C.shiftKey;i.altKey=C.altKey;return i};ht.Browser=(function(){var C=navigator.userAgent;var oH=0;var e=0;var oI=0;var i=0;var oM=0;var oK=0;var oL=0;var oJ=0;var T=0;var oN=0;if(typeof window.opera==="object"&&/Opera(\s|\/)(\d+(\.\d+)?)/.test(C)){oI=parseFloat(RegExp.$2)}else{if(/OPR(\/(\d+)(\..?)?)/.test(C)){oI=parseInt(RegExp.$2,10)}else{if(/Edge\/((\d+)\.\d+)/.test(C)){oH=parseInt(RegExp.$2,10)}else{if(/MSIE (\d+(\.\d+)?)/.test(C)){e=parseFloat(RegExp.$1)}else{if(C.indexOf("Trident")>-1&&/rv:(\d+(\.\d+)?)/.test(C)){e=parseInt(RegExp.$1,10)}else{if(/Firefox(\s|\/)(\d+(\.\d+)?)/.test(C)){oM=parseFloat(RegExp.$2)}else{if(navigator.vendor==="Netscape"&&/Netscape(\s|\/)(\d+(\.\d+)?)/.test(C)){oL=parseFloat(RegExp.$2)}else{if(C.indexOf("Safari")>-1&&/Version\/(\d+(\.\d+)?)/.test(C)){i=parseFloat(RegExp.$1)}}}}}}}}if(C.indexOf("Trident")>-1&&/Trident\/(\d+(\.\d+)?)/.test(C)){oJ=parseInt(RegExp.$1,10)}else{if(!e&&!oH&&C.indexOf("Gecko")>-1&&C.indexOf("KHTML")===-1&&/rv\:(\d+(\.\d+)?)/.test(C)){T=parseFloat(RegExp.$1)}else{if(!oH&&/chrome\/(\d+(\.\d+)?)/i.test(C)){oK=parseFloat(RegExp.$1)}else{if(!oH&&/AppleWebKit\/(\d+(\.\d+)?)/.test(C)){oN=parseInt(RegExp.$1,10)}}}}var oO={edge:oH,ie:e,firefox:oM,netscape:oL,opera:oI,safari:i,chrome:oK,gecko:T,trident:oJ,webkit:oN};return oO})();window.FeBrowser=ht.Browser;ht.Dom={};ht.Dom.createDom=function(i,e){if(ht.isIE&&e&&e.name){i="<"+i+' name="'+ht.String.escapeHTML(e.name)+'">'}var C=document.createElement(i);if(e){ht.Dom.setProperties(C,e)}return C};ht.Dom.getOffset=function(T){var oJ=ht.Dom.getOwnerDocument(T);var oI=ht.isGecko>0&&oJ.getBoxObjectFor&&ht.Dom.getStyle(T,"position")=="absolute"&&(T.style.top===""||T.style.left==="");var oK={left:0,top:0};var i=(ht.isIE&&!ht.isStrict)?oJ.body:oJ.documentElement;if(T==i){return oK}var C=null;var oH;if(T.getBoundingClientRect){oH=T.getBoundingClientRect();oK.left=oH.left+Math.max(oJ.documentElement.scrollLeft,oJ.body.scrollLeft);oK.top=oH.top+Math.max(oJ.documentElement.scrollTop,oJ.body.scrollTop);oK.left-=oJ.documentElement.clientLeft;oK.top-=oJ.documentElement.clientTop;if(ht.isIE&&!ht.isStrict){oK.left-=2;oK.top-=2}}else{if(oJ.getBoxObjectFor&&!oI){oH=oJ.getBoxObjectFor(T);var e=oJ.getBoxObjectFor(i);oK.left=oH.screenX-e.screenX;oK.top=oH.screenY-e.screenY}else{C=T;do{oK.left+=C.offsetLeft;oK.top+=C.offsetTop;if(ht.isWebkit>0&&ht.Dom.getStyle(C,"position")=="fixed"){oK.left+=oJ.body.scrollLeft;oK.top+=oJ.body.scrollTop;break}C=C.offsetParent}while(C&&C!=T);if(ht.isOpera>0||(ht.isWebkit>0&&ht.Dom.getStyle(T,"position")=="absolute")){oK.top-=oJ.body.offsetTop}C=T.offsetParent;while(C&&C!=oJ.body){oK.left-=C.scrollLeft;if(!ht.isOpera||C.tagName!="TR"){oK.top-=C.scrollTop}C=C.offsetParent}}}return oK};ht.Dom.getOwnerDocument=function(e){return e.nodeType==9?e:e.ownerDocument||e.document};ht.Dom.setProperties=function(i,e){ht.each(e,function(T,C){ht.Dom._setProperty(i,C,T)})};ht.Dom._setProperty=function(i,e,C){if(e=="style"){i.style.cssText=C}else{if(e=="class"){i.className=C}else{if(e=="for"){i.htmlFor=C}else{if(e in ht.Dom._DIRECT_ATTRIBUTE_MAP){i.setAttribute(ht.Dom._DIRECT_ATTRIBUTE_MAP[e],C)}else{i[e]=C}}}}};ht.Dom._DIRECT_ATTRIBUTE_MAP={cellpadding:"cellPadding",cellspacing:"cellSpacing",colspan:"colSpan",rowspan:"rowSpan",valign:"vAlign",height:"height",width:"width",usemap:"useMap",frameborder:"frameBorder"};ht.G=function(){for(var C=[],T=arguments.length-1;T>-1;T--){var oH=arguments[T];C[T]=null;if(typeof oH=="object"&&oH&&oH.dom){C[T]=oH.dom}else{if((typeof oH=="object"&&oH&&oH.tagName)||oH==window||oH==document){C[T]=oH}else{if(typeof oH=="string"&&(oH=document.getElementById(oH))){C[T]=oH}}}}return C.length<2?C[0]:C};ht.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(" ")}};ht.addClassName=ht.ac;ht.each=function(oI,e){if(typeof e!="function"){return oI}if(oI){if(oI.length===undefined){for(var C in oI){e.call(oI[C],oI[C],C)}}else{for(var T=0,oH=oI.length;T0&&!window.opera){/MSIE (\d+(\.\d+)?)/.test(navigator.userAgent);ht.isIE=parseFloat(RegExp.$1)}})();ht.rc=function(e,i){if(!(e=this.G(e))){return}i=this.trim(i);var C=e.className.replace(new RegExp("(^| +)"+i.replace(/(\W)/g,"\\$1")+"( +|$)","g"),"$2");if(e.className!=C){e.className=C}};ht.removeClassName=ht.rc;ht.show=function(){this.each(arguments,function(e){if(e=ht.G(e)){e.style.display=""}})};ht.trim=function(e){return e.replace(/(^[\s\t\xa0\u3000]+)|([\u3000\xa0\s\t]+$)/g,"")};ht.getElementsByClassName=function(e,i){if(e.getElementsByClassName){return e.getElementsByClassName(i)}else{return(function C(oN,oL){if(oL==null){oL=document}var oK=[],oJ=oL.getElementsByTagName("*"),T=oJ.length,oM=new RegExp("(^|\\s)"+oN+"(\\s|$)"),oI,oH;for(oI=0,oH=0;oI-1};ht.insertHTML=function(T,e,C){T=ht.G(T);if(T===null){return T}var i,oH;if(T.insertAdjacentHTML){T.insertAdjacentHTML(e,C)}else{i=T.ownerDocument.createRange();e=e.toUpperCase();if(e=="AFTERBEGIN"||e=="BEFOREEND"){i.selectNodeContents(T);i.collapse(e=="AFTERBEGIN")}else{oH=e=="BEFOREBEGIN";i[oH?"setStartBefore":"setEndAfter"](T);i.collapse(oH)}i.insertNode(i.createContextualFragment(C))}return T};if(typeof HTMLElement!="undefined"&&HTMLElement.prototype.__lookupGetter__&&!HTMLElement.prototype.__lookupGetter__("children")&&!window.opera){try{HTMLElement.prototype.__defineGetter__("children",function(){for(var C=[],T=0,oI,oH=0,e=this.childNodes.length;oH-1};ht.isEmptyObject=function(C){if(Object.prototype.toString.call(C)==="[object Object]"){for(var e in C){return false}return true}else{return false}};var s=(typeof window!=="undefined"&&window.BMAP_QT_VERSION)||"gl";function en(){return s}window.BMAPGL_LANGUAGE_ZH="zh";window.BMAPGL_LANGUAGE_EN="en";window.BMAP_LANGUAGE_ZH="zh";window.BMAP_LANGUAGE_EN="en";window.BMAP_LANGUAGE_ZH_TW="zh-TW";window.BMAP_LANGUAGE_ES="es";window.BMAP_LANGUAGE_PT="pt";window.BMAP_LANGUAGE_FR="fr";window.BMAP_LANGUAGE_DE="de";window.BMAP_LANGUAGE_TH="th";window.BMAP_LANGUAGE_JA="ja";window.BMAP_LANGUAGE_KO="ko";window.BMAP_LANGUAGE_TR="tr";window.BMAP_LANGUAGE_IT="it";window.BMAP_LANGUAGE_RU="ru";window.BMAP_LANGUAGE_MS="ms";window.BMAP_LANGUAGE_VI="vi";window.BMAP_LANGUAGE_ID="id";var dr=[];if(window.B_HOST_TILE_ONLINE_URLS&&window.B_HOST_TILE_ONLINE_URLS.length>=4){dr=window.B_HOST_TILE_ONLINE_URLS}var cX=window.location.protocol==="http:"?"http:":"https:";var gP={apiVersion:undefined,uiVersion:undefined,apiVersionIsGL:function(){return this.apiVersion==="gl"},uiVersionIsGL:function(){return this.uiVersion==="gl"},urlProtocol:cX,fontFamily:'Arial,Helvetica,"PingFang SC","Hiragino Sans GB",STHeiti,"Microsoft YaHei",Tahoma,sans-serif',mapStyleNameIdPair:{"default":0,"grayed-out":1},gs:{},mapHost:cX+"//map.baidu.com",apiHost:window._BMapSecurityConfig&&window._BMapSecurityConfig["serviceHost"]?window._BMapSecurityConfig["serviceHost"]:cX+"//api.map.baidu.com",apiIMG:cX+"//api.map.baidu.com/images",staticHost:cX+"//webmap0.bdimg.com",imgPath:cX+"//webmap0.bdimg.com/image/api/",tileDomain:[cX+"//"+(dr[0]||"apimaponline0.bdimg.com"),cX+"//"+(dr[1]||"apimaponline1.bdimg.com"),cX+"//"+(dr[2]||"apimaponline2.bdimg.com"),cX+"//"+(dr[3]||"apimaponline3.bdimg.com")],enTileDomain:[cX+"//api.map.baidu.com"],apiTestUrl:cX+"//apitest.map.baidu.com",panoTilePath:cX+"//apisv1.bdimg.com/",rasterTilePath:"/tile/",vectorTilePath:"/pvd/",enVectorTilePath:"/api_enpvd",originTilePath:[cX+"//pcor.baidu.com"],stylePath:cX+"//maponline0.bdimg.com/sty/",getIconSetPath:function(e){var i="map_icons2x/";if(typeof e==="string"&&this.mapStyleNameIdPair[e]>0){i="map_icons2x_"+(this.mapStyleNameIdPair[e]-1)+"/"}return this.stylePath+i},getMapStyleFiles:function(C){var oH=true;if(typeof C==="string"&&C!=="default"){oH=false}var oI=oH?"":"_"+(this.mapStyleNameIdPair[C]-1);var i=cv();var T="udt="+i.udt+"&v="+i.ver;var e=this.stylePath;return[e+"icons_2x"+oI+".js?"+T,e+"fs"+oI+".js?"+T,e+"indoor_fs.js?"+T]},tvc:{ditu:{normal:{version:"088",updateDate:"20250110"},satellite:{version:"009",updateDate:"20250110"},normalTraffic:{version:"081",updateDate:"20250110"},satelliteTraffic:{version:"083",updateDate:"20250110"},mapJS:{version:"104",updateDate:"20250110"},satelliteStreet:{version:"083",updateDate:"20250110"},earthVector:{version:"001",updateDate:"20250110"}},webapp:{high_normal:{version:"001",updateDate:"20250110"},lower_normal:{version:"002",updateDate:"20250110"}},api_for_mobile:{vector:{version:"002",updateDate:"20250110"},vectorIcon:{version:"002",updateDate:"20250110"}}},msv:{mapstyle:{version:"001",updateDate:"20241224"}}};gP.gs[BMAP_LANGUAGE_ZH]="GS(2025)4125";gP.gs[BMAP_LANGUAGE_EN]="GS(2025)0741";gP.getGS=function(e){if(e===BMAP_LANGUAGE_ZH){return"GS(2025)4125"}else{if(e===BMAP_LANGUAGE_EN){return"GS(2025)0741"}else{return"GS(2025)4125"}}};gP.imgResources={blankGIF:gP.staticHost+"/res/litemapapi/v1d1/images/blank.gif?20170501",markerPng:gP.staticHost+"/res/litemapapi/v1d1/images/marker.png?20170501",locPng:gP.staticHost+"/res/litemapapi/v1d1/images/loc.png?20180918",locNewPng:gP.staticHost+"/res/litemapapi/v1d1/images/loc_new.png?20190314",zoomPng:gP.staticHost+"/res/litemapapi/v1d1/images/zoombtn.png?20180918",mapLogoPng:gP.staticHost+"/res/litemapapi/v1d1/images/logo-2x.png?20190226"};var K=gP;var nc="ruler.cur";if(ht.Browser.ie||ht.Browser.edge){ht.extend(K,{distCursor:"url("+K.imgPath+nc+"),crosshair",defaultCursor:"url("+K.imgPath+"openhand.cur),default",draggingCursor:"url("+K.imgPath+"closedhand.cur),move"})}else{if(ht.Browser.firefox){ht.extend(K,{distCursor:"url("+K.imgPath+nc+"),crosshair",defaultCursor:"-moz-grab",draggingCursor:"-moz-grabbing"})}else{if(ht.Browser.chrome||ht.Browser.safari){ht.extend(K,{distCursor:"url("+K.imgPath+nc+") 2 6,crosshair",defaultCursor:"url("+K.imgPath+"openhand.cur) 8 8,default",draggingCursor:"url("+K.imgPath+"closedhand.cur) 8 8,move"});if(ht.Platform.macintosh){K.defaultCursor="-webkit-grab";K.draggingCursor="-webkit-grabbing"}}else{ht.extend(K,{distCursor:"url("+K.imgPath+nc+"),crosshair",defaultCursor:"url("+K.imgPath+"openhand.cur),default",draggingCursor:"url("+K.imgPath+"closedhand.cur),move"})}}}cu=cu||{};cu.version="gl";if(!cu.coordType){cu.coordType="BMAP_COORD_BD09"}if(!cu.apiVersion){cu.apiVersion=(typeof window!=="undefined"&&window.BMAP_DEFAULT_API_VERSION)||"gl"}if(!cu.uiVersion){cu.uiVersion=(typeof window!=="undefined"&&window.BMAP_DEFAULT_UI_VERSION)||"gl"}cu._register=[];cu.register=function(e){this._register[this._register.length]=e};cu.guid=1;cu.getGUID=function(e){return(e||"")+cu.guid++};var hh=window.BMAP_AUTHENTIC_KEY||"";function ae(e,i,T){var C=new Date();C.setTime(C.getTime()+T*24*60*60*1000);document.cookie=e+"="+escape(i)+";expires="+C.toGMTString()}function bP(e,i){if(localStorage){return localStorage.setItem(e,i)}if(sessionStorage){return sessionStorage.setItem(e,i)}}cu.getSeckeyCid=function(){var i=+new Date();var e=cX+"//dlswbr.baidu.com/heicha/mw/abclite-2063-s.js?_t="+i;jU.load(e,mC)};function mC(){if(window.___abvk){bP("SECKEY_ABVK",window.___abvk)}}window.__abbaidu_2063_cb=function(i){var e=JSON.parse(i);bP("BMAP_SECKEY",e.data)};cu.bmapVerifyCbk=function(oH){if(oH&&oH.popup===1&&oH.error_msg){dX(oH.error_msg,{from:"verify"})}else{if(oH&&oH.error!==0){cu=null;BMapGL=null;var oI="百度未授权使用地图API,可能是因为您提供的密钥不是有效的百度地图开放平台密钥,或此密钥未对本应用的百度地图JavaScriptAPI授权。您可以访问如下网址了解如何获取有效的密钥:https://lbs.baidu.com/apiconsole/key#。";switch(oH.error){case 101:oI="您所使用的密钥ak有问题,不支持jsapi服务,可以访问该网址了解如何获取有效密钥:http://lbsyun.baidu.com/apiconsole/key#。";break;case 102:oI="MCODE参数不存在,mobile类型MCODE参数必需,详情查看:http://lbsyun.baidu.com/apiconsole/key#。";break;case 200:oI="APP不存在,AK有误请检查再重试,详情查看:http://lbsyun.baidu.com/apiconsole/key#。";break;case 201:oI="APP被您禁用啦,可以访问 http://lbsyun.baidu.com/apiconsole/key# 查看自己的应用具体详情,或联系我们了解详情。";break;case 202:oI="APP被管理员删除啦,可以访问 http://lbsyun.baidu.com/apiconsole/key# 查看自己的应用具体详情,或联系我们了解详情。";break;case 203:oI="APP类型错误,可以访问 http://lbsyun.baidu.com/apiconsole/key# 查看自己的应用具体详情,或联系我们了解详情。";break;case 210:oI="APP IP校验失败,可以访问 http://lbsyun.baidu.com/apiconsole/key# 查看自己的应用具体详情,或联系我们了解详情。";break;case 220:oI="APP Referer校验失败。请检查该ak设置的白名单与访问所有的域名是否一致。详情查看:http://lbsyun.baidu.com/apiconsole/key#";break;case 230:oI="APP Mcode码校验失败,可以访问 http://lbsyun.baidu.com/apiconsole/key# 查看自己的应用具体详情,或联系我们了解详情。";break;case 240:oI="APP服务被禁用了,可以访问 http://lbsyun.baidu.com/apiconsole/key# 查看自己的应用具体详情,或联系我们了解详情。";break;case 250:oI="该用户不存在... 请登录 https://lbs.baidu.com 的控制台,注册成为开发者申请ak吧。";break;case 251:oI="该用户被自己删除啦,可以访问 http://lbsyun.baidu.com/apiconsole/key# 查看自己的应用具体详情。";break;case 252:oI="该用户被管理员删除啦,可以访问 http://lbsyun.baidu.com/apiconsole/key# 了解如何获取有效密钥,或请联系我们了解详情。";break;case 260:oI="您所使用的密钥AK不包含该服务呢,可以访问 http://lbsyun.baidu.com/apiconsole/key# 查看服务选择情况,或请联系我们了解详情。";break;case 261:oI="您所使用的密钥AK的该服务被禁用啦,可以访问 http://lbsyun.baidu.com/apiconsole/key# 查看服务选择情况,或请联系我们了解详情。";break;case 401:oI="您所使用的AK并发超限了,请登录 http://lbsyun.baidu.com/cashier/quota#/home 了解详情。";break;case 302:oI="您所使用的AK天配额超限了,请登录 http://lbsyun.baidu.com/cashier/quota#/home 了解详情。";break}alert(oI);var C=document.getElementsByClassName("bmap-container");if(C){for(var T=0;Ti){this._removeOld()}if(!e[C]){e.push(T)}e[C]=T;T._key_=C};lH.prototype.getHitRate=function(){return Math.round(this._totalHitTimes/this._totalGetTimes*1000)/1000};lH.prototype.getData=function(i){var e=this._cache[i];if(e){this._totalHitTimes++}this._totalGetTimes++;return e};lH.prototype.removeData=function(oH){if(this._options.clearCallback){this._options.clearCallback(this._cache[oH])}var C=this._cache;var oI=C[oH];for(var T=0,e=C.length;T=0;oH--){var T=this._cache[oH]._key_;if(!oI[T]){C.splice(oH,1);if(this._options.clearCallback){this._options.clearCallback(C[T])}delete C[T]}}};lH.prototype.getDataCount=function(){return this._cache.length};var le="B_NORMAL_MAP";var cZ="B_EARTH_MAP";var j7="B_SATELLITE_MAP";function mH(){}ht.extend(mH.prototype,{centerAndZoomIn:function(oL,C,oN){var oJ=this;if(!oL&&!C){return}oL=oL||this.centerPoint;C=C||this.zoomLevel;C=this._getProperZoom(C).zoom;if(this.mapType===cZ){if(!this._earth){this.mapType=le;this.temp.originMapType=cZ;function oK(){oJ._earth=new cu.Earth(oJ,{showRealSunlight:oJ.config.showRealSunlight,showMilkyway:oJ.config.showMilkyway,earthBackground:oJ.config.earthBackground});oJ._proxyEarthEvents();oJ._changeEarthMapType(cZ);ht.extend(oJ,cu.EarthView.prototype);if(!oJ._navigationCtrl&&oJ.config.showControls){oJ._navigationCtrl=new cu.NavigationControl3D(oJ)}delete oJ.temp.originMapType}kg.load("earth",function(){if(cu["FeatureStyle"+oJ.config.style]){oK()}else{oJ.loadMapStyleFiles(function(){oK()})}})}}this.lastLevel=this.zoomLevel||C;this.zoomLevel=C;var oH=new iv("onload");oH.pointMC=oL;oH.zoom=C;this.centerPoint=this.restrictCenter(new d7(oL.lng,oL.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===cZ)){var i=this.config.defaultMaxBounds;var oI=new q(i,"baidu",this.mapType);var T=new kR({mapType:this.mapType,copyright:oI,customLayer:false,baseLayer:true,tileTypeName:"web"});T._isInnerLayer=true;this._addTileLayer(T);if(this.mapType===j7&&this._isHybridShow===true){this._addHybirdMap()}}if(K.apiVersionIsGL()){this.loaded=true;this.dispatchEvent(oH)}else{if(!this.loaded){this.loaded=true;if(this._isDefaultView){var oM=this;setTimeout(function(){oM.dispatchEvent(oH)},0)}else{this.dispatchEvent(oH)}}}oN=oN||{};oN.callback&&oN.callback()},_setPlatformPosition:function(oM,oL,oP){oP=oP||{};if(oM===0&&oL===0&&!oP.point){return}if(isNaN(oP.initMapOffsetX)){oP.initMapOffsetX=this.offsetX}if(isNaN(oP.initMapOffsetY)){oP.initMapOffsetY=this.offsetY}var oN=oM+oP.initMapOffsetX;var oK=oL+oP.initMapOffsetY;if(oP.point){var i=this.restrictCenter(oP.point);if(!i.equals(this.centerPoint)){this.centerPoint=i.clone();this.fire(new iv("oncenter_changed"))}}else{var T=this.offsetX-oN;var e=this.offsetY-oK;var C=this.getZoomUnits();var oJ=this.centerPoint.lng;var oI=this.centerPoint.lat;var oH=new d7(oJ,oI);this.centerPoint=this.restrictCenter(new d7(oH.lng+T*C,oH.lat-e*C),C);this.fire(new iv("oncenter_changed"));if(this.zoomLevel<10){oN=this.offsetX-(this.centerPoint.lng-oH.lng)/C;oK=this.offsetY+(this.centerPoint.lat-oH.lat)/C}}this.offsetX=oN;this.offsetY=oK;var oO=this.platform.style;oO.left=oN+"px";oO.top=oK+"px";this.maskLayer.style.left=-oN+"px";this.maskLayer.style.top=-oK+"px";if(oP.dispatchEvent!==false){this.dispatchEvent(new iv("onmoving"))}},zoomTo:function(e,oJ,oN){oN=oN||{};oN.zoomCenter=oJ;if(oN.noAnimation!==true){this.deepZoomTo(e,oN);return}if(typeof e!=="number"){return}var oH=gy[this.mapType];if(!oH){return}var C=e;e=this._getProperZoom(e).zoom;if(e===this.zoomLevel){var oK=new iv("onzoomexceeded");oK.targetZoom=C;this.dispatchEvent(oK);oN.callback&&oN.callback();return}this.lastLevel=this.zoomLevel;if(oJ){this.temp._cPoint=oJ;this.temp._cPixel=this.pointToPixelIn(oJ)}else{if(this.getInfoWindow()){var oM=this.getInfoWindow().getPoint();this.temp._cPixel=this.pointToPixelIn(oM);this.temp._cPoint=oM}}if(this.config.zoomCenter){oJ=this.config.zoomCenter;this.temp._cPoint=oJ;this.temp._cPixel=this.pointToPixelIn(oJ)}if(oJ||this.temp.infoWin&&this.temp.infoWin.isOpen()){var i=this.temp._cPoint;var oL=this.temp._cPixel;var T=this.getZoomUnits(e);var oI=new d7(i.lng+T*(this.width/2-oL.x),i.lat-T*(this.height/2-oL.y));this.centerPoint=this.restrictCenter(oI,T,e);if(this.centerPoint.zoom){e=this.centerPoint.zoom}}if(oN.fireEvent!==false){this.dispatchEvent(new iv("onzoomstart"))}if(e!==this.zoomLevel){this.zoomLevel=e;this.dispatchEvent(new iv("onzooming"));this.dispatchEvent(new iv("onzoomstartcode"))}if(oN.fireEvent!==false){this.dispatchEvent(new iv("onzoomend"))}if(oN.callback){oN.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(oK,T){T=T||{};var oI=oK-this.zoomLevel;var oH=this._getProperZoom(oK);if(oH.exceeded){var e=new iv("onzoomexceeded");e.targetZoom=oK;this.dispatchEvent(e);return}var i;if(T.zoomCenter){i=this.pointToPixelIn(T.zoomCenter)}else{if(this.getInfoWindow()){i=this.pointToPixelIn(this.getInfoWindow().getPoint(),{zoom:this.lastLevel})}else{var i=new hT(this.width/2,this.height/2)}}this.lastLevel=this.zoomLevel;var oJ=this.deepZoom||new a6(this);var C=oI>0?1:-1;oJ.zoomMap(i,oI,C,null,T)},flyToIn:function(oL,e){if(e===this.zoomLevel){this.panToIn(oL);return}var oI=this._getProperZoom(e);if(oI.exceeded){var oM=new iv("onzoomexceeded");oM.targetZoom=e;this.dispatchEvent(oM);return}var oK=e-this.zoomLevel;var C=new hT(this.width/2,this.height/2);var i=this.pointToPixelIn(oL);var oJ=new mS(i.x-C.x,i.y-C.y);this.lastLevel=this.zoomLevel;if(Math.abs(oK)>=4||Math.abs(oJ.width)>this.width||Math.abs(oJ.height)>this.height){this.centerAndZoomIn(oL,e);return}var oH=this.deepZoom||new a6(this);var T=oK>0?1:-1;oH.zoomMap(i,oK,T,oJ)},panToIn:function(i,C){C=C||{};if(!i||i.equals(this.centerPoint)){C.callback&&C.callback();return}var T=this.pointToPixelIn(i);var e=Math.round(this.width/2);var oH=Math.round(this.height/2);if(Math.abs(e-T.x)>this.width||Math.abs(oH-T.y)>this.height||C.noAnimation===true){this._panToIn(e-T.x,oH-T.y,i);C.callback&&C.callback()}else{this._panBy(e-T.x,oH-T.y,C)}},_panToIn:function(i,e,T){var C=this.temp;if(C.operating===true){return}if(C.dragAni){C.dragAni.stop();C.dragAni=null;this.dispatchEvent(new iv("onmoveend"))}this.dispatchEvent(new iv("onmovestart"));this._setPlatformPosition(i,e,{point:T});this.dispatchEvent(new iv("onmoveend"))},panBy:function(i,e,C){C=C||{};if(!K.apiVersionIsGL()){if(C.noAnimation===undefined&&C.enableAnimation!==undefined){C.noAnimation=!C.enableAnimation}}i=Math.round(i)||0;e=Math.round(e)||0;if(Math.abs(i)<=this.width&&Math.abs(e)<=this.height&&C.noAnimation!==true){this._panBy(i,e,C)}else{this._panToIn(i,e);C.callback&&C.callback()}},_panBy:function(i,e,oH){if(this.temp.operating===true){return}oH=oH||{};this.dispatchEvent(new iv("onmovestart"));var T=this;var C=T.temp;C.pl=T.offsetX;C.pt=T.offsetY;if(C.tlPan){C.tlPan.cancel()}if(C.dragAni){C.dragAni.stop();C.dragAni=null;this.dispatchEvent(new iv("onmoveend"))}C.tlPan=new ih({fps:oH.fps||T.config.fps,duration:oH.duration||T.config.actionDuration,transition:oH.transition||jD.easeInOutQuad,render:function(oI){this.terminative=T.temp.operating;if(T.temp.operating){return}T._setPlatformPosition(Math.ceil(i*oI),Math.ceil(e*oI),{initMapOffsetX:C.pl,initMapOffsetY:C.pt})},finish:function(oI){T.dispatchEvent(new iv("onmoveend"));T.temp.tlPan=false;if(T.temp.stopArrow===true){T.temp.stopArrow=false;if(T.temp.arrow!==0){T._arrow()}}oH.callback&&oH.callback()}})},getCenterIn: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(oO,i,e){this.isRestrict=false;i=i||this.getZoomUnits();e=e||this.zoomLevel;var oM=this.pixelToPointIn(new hT(this.width,0),{center:oO,zoom:e});var oK=this.pixelToPointIn(new hT(0,this.height),{center:oO,zoom:e});var oP=oO.lng;var oU=oO.lat;if(this.config.restrictBounds!==null&&!this.config.restrictBounds.isEmpty()){var oT=this.config.restrictBounds;var T=oT.getSouthWest();var oR=oT.getNorthEast();var oN=m5.convertLL2MC(T);var oI=m5.convertLL2MC(oR);oO.lng=this.calcNewLngByBounds(oP,oK,oM,oN.lng,oI.lng,i);oO.lat=this.calcNewLatByBounds(oU,oK,oM,oN.lat,oI.lat,i);return oO}var oL=this.pixelToPointIn(new hT(0,0),{center:oO,zoom:e});var oH=this.pixelToPointIn(new hT(0,this.height),{center:oO,zoom:e});if(this.zoomLevel<5){if(oL.lat>lg.MAX_LAT&&oH.latlg.MAX_LAT){this.isRestrict=true;oO.lat=lg.MAX_LAT-this.height/2*i}else{if(oH.lat=lg.HIGH_RES_MIN_RATIO?2:1,enableEarth:eT.ifEnableEarth(),defaultMaxBounds:new lx(new d7(-21364736,-10616832),new d7(23855104,15859712)),showControls:false,indoorControl:!K.apiVersionIsGL(),showRealSunlight:true,showMilkyway:true,earthBackground:null,showStreetLayer:true,showVectorStreetLayer:false,showVectorLine:false,textureScale:1,minZoom:null,maxZoom:null,earthUseRound:true,earthMinZoom:null,earthMaxZoom:null,earthSun:true,earthClouds:true,earthMarkerShowAllTime:true,earthOpacity:null,earthFixAxis:false,style:"default",showCustomIndoor:true,backgroundColor:null,enableIconClick:false,enableIconInfoWindow:false,enableIconHighlight:true,autoSafeArea:false,ak:null,webgl2:false,restrictCenter:true,restrictBounds:null,smaa:false,preserveDrawingBuffer:false,privateOn:false,privateRegions:null,popRightClick:false,videoMuted:true,overlayTop:false,highRegion:{lineOpt:null,focusOpt:false},forceReload:true,textureSizeHeight:4096*2,markerUseRound:true,fontFamily:K.fontFamily||"sans-serif",extendTiles:0,enableAdaptiveMinZoom:true,showCopyrightOnMobile:false,zoomWithCenter:false,};for(var C in i){if(i.hasOwnProperty(C)){this.config[C]=i[C];if(C==="fixCenterWhenResize"){this.config.enableResizeOnCenter=i[C]}}}if(i.style){if(i.style["styleId"]&&i.style["styleId"].length<32){this.config.style=i.style["styleId"]}else{this.config.style=i.style}}this._setTextRenderType();this._displayOptions={language:BMAP_LANGUAGE_ZH,poi:true,poiText:true,poiIcon:true,overlay:true,layer:true,building:true,indoor:K.apiVersionIsGL(),street:true,skyColors:["rgba(226, 237, 248, 0)","rgba(186, 211, 252, 1)"],isFlat:false,labelMargin:0,buildingSideGradation:false};if(i.displayOptions){for(var e in i.displayOptions){if(i.displayOptions.hasOwnProperty(e)&&i.displayOptions[e]!==undefined){this._displayOptions[e]=i.displayOptions[e]}}}if(this._displayOptions.language!==BMAP_LANGUAGE_ZH){this._displayOptions.isEn=true;this._setTextRenderType("canvas")}else{this._displayOptions.isEn=false}this.updateFocusOptions(i.focusOptions,true);if(this.config.restrictCenter===false){this._enableTiltZoom=0;this._enableHeadingZoom=0}},getLanguage:function(){return this._displayOptions.language},changeLanguage:function(i){if(i!==BMAP_LANGUAGE_ZH&&i!==BMAP_LANGUAGE_EN){throw new Error("language must be BMAP_LANGUAGE_ZH or BMAP_LANGUAGE_EN")}if(this._displayOptions.language!==i){this._displayOptions.language=i;this._displayOptions.isMultiLanguage=false;if(i!==BMAP_LANGUAGE_ZH){this._displayOptions.isEn=true;if(this.config.textRenderType==="image"){this._setTextRenderType("canvas")}}else{this._displayOptions.isEn=false}this.fire(new iv("onlanguage_change"));this.fire(new iv("onstyle_willchange"));this.fire(new iv("onstyle_loaded"));var e=new iv("onlayer_update");e.name="na";this.fire(e)}},enablePreferredLanguage:function(oH){if(!oH){var T=(navigator.language||navigator.userLanguage||"zh").toLowerCase();var i=["zh","en","zh-tw","es","pt","fr","de","th","ja","ko","tr","it","ru","ms","vi","id"];if(i.indexOf(T)!==-1){oH=T}else{if(T.indexOf("-")>-1){var C=T.split("-")[0];if(i.indexOf(C)!==-1){oH=C}}}if(!oH){oH=BMAP_LANGUAGE_ZH}}if(this._displayOptions.language!==oH){this._displayOptions.language=oH;if(oH!==BMAP_LANGUAGE_ZH){this._displayOptions.isEn=true;this._displayOptions.isMultiLanguage=true;if(this.config.textRenderType==="image"){this._setTextRenderType("canvas")}}else{this._displayOptions.isEn=false;delete this._displayOptions.isMultiLanguage}this.fire(new iv("onlanguage_change"));this.fire(new iv("onstyle_willchange"));this.fire(new iv("onstyle_loaded"));var e=new iv("onlayer_update");e.name="na";this.fire(e)}},disablePreferredLanguage:function(){this._displayOptions.language=BMAP_LANGUAGE_ZH;this._displayOptions.isEn=false;delete this._displayOptions.isMultiLanguage;this.fire(new iv("onlanguage_change"));this.fire(new iv("onstyle_willchange"));this.fire(new iv("onstyle_loaded"));var e=new iv("onlayer_update");e.name="na";this.fire(e)},updateFocusOptions:function(e,C){this._spotOptions={open:false,gray:false,involve:1,focus:0,other:7156516};if(e){for(var i in e){if(e.hasOwnProperty(i)){this._spotOptions[i]=e[i]}}}if(this._webglMapScene&&this._webglMapScene._painter){this._webglMapScene._painter._hightLightEnable()}if(!C){this._drawFrame()}},getMinZoom:function(){var i;if(gy[this.mapType][this._renderType]){i=gy[this.mapType][this._renderType].minZoom}else{i=gy[this.mapType].minZoom}if(this.config.minZoom!==null&&this.config.minZoom>=i){i=this.config.minZoom}if(this.mapType==="B_EARTH_MAP"){return i}if(this.config.enableAdaptiveMinZoom){var e=this.getSize();var C=this.worldSize(i);while(Ci){i=oJ}}return i},getMaxZoom:function(){var e;if(gy[this.mapType][this._renderType]){e=gy[this.mapType][this._renderType].maxZoom}else{e=gy[this.mapType].maxZoom}if(this.config.maxZoom!==null&&this.config.maxZoom<=e){e=this.config.maxZoom}else{if(this._renderType==="webgl"){e=21}}return e},_drawFrame:function(){if(this._webglMapScene&&this._webglMapScene._painter){this._webglMapScene._painter.draw()}},_setupWebGLMap:function(){var e=this;kg.load("mapgl",function(){e._asyncRegister()})},_setStyle:function(i){var e=i.style;e.overflow="hidden";if(dI(i).position!=="absolute"){e.position="relative"}e.backgroundImage="url("+K.imgPath+"bg.png)";e.textAlign="left";e.touchAction=e.MSTouchAction="none"},_bind:function(){var e=this;if(e._renderType!=="webgl"){e._watchSize=function(){var C=e.getContainerSize();if(e.width!==C.width||e.height!==C.height){var oJ=(C.width-e.width)/2;var oL=(C.height-e.height)/2;var T=e.getZoomUnits();var oI=e.centerPoint;if(oI&&!e.config.enableResizeOnCenter){e.centerPoint=new d7(oI.lng+oJ*T,oI.lat-oL*T)}e.maskLayer.style.width=(e.width=C.width)+"px";e.maskLayer.style.height=(e.height=C.height)+"px";var oH=new iv("onresize");oH.size=C;e.dispatchEvent(oH);e.fire(new iv("onsize_changed"));var i=parseInt(e.platform.style.left,10)||0;var oK=parseInt(e.platform.style.top,10)||0;if(e.currentOperation!=="undefined"&&e.currentOperation!==gn.idle&&(e.offsetX!==i||e.offsetY!==oK)){e._setPlatformPosition(i,oK)}}}}else{e._watchSize=function(){var i=e.getContainerSize();if(e.width!==i.width||e.height!==i.height){var T=e.getSize();e.maskLayer.style.width=(e.width=i.width)+"px";e.maskLayer.style.height=(e.height=i.height)+"px";if(i8()!==e.config.ratio){e.config.ratio=i8()}var oH=new iv("onresize");oH.size=i;e.dispatchEvent(oH);var C=new iv("onsize_changed");C.size=i;C.oldSize=T;e.fire(C)}}}if(e.config.enableAutoResize){e.temp.autoResizeTimer=setInterval(e._watchSize,16)}this.on("size_changed",function(){var i=e.getMinZoom();if(e.zoomLevele){T=true;C=e}if(this._renderType!=="webgl"){C=Math.round(C)}return{zoom:C,exceeded:T}},getContainer:function(){return this.container},getZoomUnits:function(C){if(this.mapType===cZ){return Math.pow(2,18-this._earth.getImageZoom())}var e=gy[this.mapType];if(typeof e!=="object"){return null}var i=C||this.zoomLevel;return Math.pow(2,(e.zoomLevelBase-i))},pointToPixelIn:function(oQ,oS){if(!oQ){return}oS=oS||{};if(this.mapType===cZ){var T;if(!oQ._llPt){T=m5.convertMC2LL(oQ);oQ._llPt=T}T=oQ._llPt;var oM=null;var C=null;if(typeof oS.zoom==="number"){var oP=this._earth;var oR=oP._getEarthZoomByImgZoom(oS.zoom);if(oR<=3){oM=oP._generateTmpPMatrix(oR)}C=oP._generateTmpMVMatrix(oP.getCenter(),oR)}var oI=this._earth.fromLatLngToPixel(T,{useRound:false,isCalcOnBack:true,matrixInfo:{modelViewMatrix:C,projectionMatrix:oM}});return oI}var oH=typeof oS.heading==="number"||typeof oS.tilt==="number";if((this._heading%360===0&&this._tilt===0&&!oH)||!this._webglMapCamera){var oO=this.getZoomUnits(oS.zoom);var oK=oS.center||this.centerPoint;var i=this.width/2;var oJ=this.height/2;var oN=(oQ.lng-oK.lng)/oO+i;var oL=(oK.lat-oQ.lat)/oO+oJ;if(oS.useRound!==false){oN=Math.round(oN);oL=Math.round(oL)}return new hT(oN,oL)}var e=this._webglMapCamera.fromMCToScreenPixel(oQ.lng,oQ.lat,oS);if(oS.useRound===false){return e}e.x=Math.round(e.x);e.y=Math.round(e.y);return e},pixelToPointIn:function(e,oN){if(!e){return}oN=oN||{};if(this.mapType===cZ){if(typeof oN.zoom==="number"){var oL=this._earth;var oI=null;var C=null;var oM=oL._getEarthZoomByImgZoom(oN.zoom);if(oM<=3){oI=oL._generateTmpPMatrix(oM)}C=oL._generateTmpMVMatrix(oL.getCenter(),oM)}var i=this._earth.fromPixelToLatLng(e,{matrixInfo:{modelViewMatrix:C,projectionMatrix:oI}});if(i===null){return null}return m5.convertLL2MC(i)}if((this._heading%360!==0||this._tilt>0||typeof oN.heading==="number"||typeof oN.tilt==="number")&&this._webglMapCamera){return this._webglMapCamera.fromScreenPixelToMC(e.x,e.y,oN)}var oJ=oN.center||this.centerPoint;var oK=this.getZoomUnits(oN.zoom);var oH=oJ.lng+oK*(e.x-this.width/2);var T=oJ.lat-oK*(e.y-this.height/2);return new d7(oH,T)},pointToOverlayPixelIn:function(e,T){T=T||{};var C=this.pointToPixelIn(e,{zoom:T.zoom,center:T.center,forLabel:true,frustumTest:true,useRound:T.useRound});if(!C){return}if(T.fixPosition&&this.mapType!=="B_EARTH_MAP"){var oH=this.getSize();var i=this.worldSize(T.zoom);if(i>0&&isFinite(C.x)){if(C.x>oH.width){C.x-=Math.ceil((C.x-oH.width)/i)*i}else{if(C.x<0){C.x+=Math.ceil((0-C.x)/i)*i}}}}if(this._renderType==="webgl"){return C}C.x-=this.offsetX;C.y-=this.offsetY;return C},overlayPixelToPointIn:function(i,e){if(!i){return}var C=i.clone();if(this._renderType!=="webgl"){C.x+=this.offsetX;C.y+=this.offsetY}return this.pixelToPointIn(C,e)},getProjection:function(){return new m5()},lnglatToMercator:function(e,T){var i=new d7(e,T);var C=m5.convertLL2MC(i);return[C.lng,C.lat]},lngLatToMercator:function(e,i){return this.lnglatToMercator(e,i)},mercatorToLnglat:function(i,e){if(isNaN(i)||isNaN(e)){return[]}i=parseFloat(i);e=parseFloat(e);var T=new d7(i,e);var C=m5.convertMC2LL(T);return[C.lng,C.lat]},mercatorToLngLat:function(i,e){return this.mercatorToLnglat(i,e)},getBoundsIn:function(){if(!this._bounds){return}var oT=arguments[0];if(this.mapType===cZ&&this._earth){var oN=this._earth.getCustomBounds();if(!oN){return this.config.defaultMaxBounds}var oM=oN.getSouthWest();var e=oN.getNorthEast();if(oM.lng>e.lng){e.lng=180}var pa=m5.convertLL2MC(oM);var o0=m5.convertLL2MC(e);var oQ=this.config.defaultMaxBounds;var oZ=Math.max(pa.lng,oQ.sw.lng);var oY=Math.max(pa.lat,oQ.sw.lat);var oS=Math.min(o0.lng,oQ.ne.lng);var oR=Math.min(o0.lat,oQ.ne.lat);var oV=new lx(new d7(oZ,oY),new d7(oS,oR));oV.pointBottomLeft=new d7(oZ,oY);oV.pointBottomRight=new d7(oS,oY);oV.pointTopLeft=new d7(oZ,oR);oV.pointTopRight=new d7(oS,oR);oV.setMinMax();oV.makeNormalizedPoint(this._earth.getHeading());return oV}oT=oT||{};var oH=oT.margins||[0,0,0,0];var o5=this.pixelToPointIn({x:oH[3],y:this.height-oH[2]},oT);var o9=this.pixelToPointIn({x:this.width-oH[1],y:oH[0]},oT);var oX=typeof oT.heading==="number"?oT.heading:(this._heading%360);var C=typeof oT.tilt==="number"?oT.tilt:this._tilt;var oP=this._webglMapCamera;if((oX===0&&C===0)||!oP){this._bounds.setSouthWest(o5);this._bounds.setNorthEast(o9);this._bounds.pointBottomLeft=o5;this._bounds.pointBottomRight=new d7(o9.lng,o5.lat);this._bounds.pointTopRight=o9;this._bounds.pointTopLeft=new d7(o5.lng,o9.lat);this._bounds.setMinMax();this._bounds.makeNormalizedPoint(oX);return this._bounds}var oW=this.pixelToPointIn({x:oH[3],y:oH[0]},oT);var T=oP.getPosition();var pb=Math.sqrt(Math.pow(oW.lng-T[0],2)+Math.pow(oW.lat-T[1],2));var o6=this.getZoomUnits();var pd=pb/o6;var o3=oP._frustumSideLen;var oL=oP._fovy;if(this._projectionMatrix3D!=="ortho"&&(pd>o3||(90-C)
    oJ){oJ=o2[o7].lng}if(o2[o7].latoO){oO=o2[o7].lat}}this._bounds.setSouthWest(new d7(o8,pe));this._bounds.setNorthEast(new d7(oJ,oO));this._bounds.pointTopLeft=oW;this._bounds.pointTopRight=o9;this._bounds.pointBottomRight=oU;this._bounds.pointBottomLeft=o5;this._bounds.makeNormalizedPoint(oX);this._bounds.setMinMax();return this._bounds},getExtendBounds:function(){var C=ly.getInstance("na");var oQ=this.getZoom();var e=Math.floor(oQ);var oO=C.getDataZoom(oQ);oO=dy(oO,oy.minDataZoom,oy.maxDataZoom);var oI=e;var oM=C.getTileSize(oQ);var oW=C.getBaseTileSize(oQ);var oJ=this.getBoundsIn();if(!oJ){return}var oN=C.getMercatorSize(oQ,oO);var oT;var oP;var oY;var oU;var oS=map.getCenterIn();oS=hx.calcLoopCenterPoint(oS);var T=Math.floor(oS.lng/oN);var oZ=Math.floor(oS.lat/oN);var oX=0;var oK=0;oJ=hx.calcLoopMapBounds(oJ,oS);if(oJ.ne.lng>hx._mc180X){var oH=hx.getSpaceDistanceInPixel(oO);oX=Math.ceil(oH/oW)}if(oJ.sw.lng19505879.362428114||oJ.sw.lat<-15949096.637571886){oJ.ne.lat=19505879.362428114;oJ.sw.lat=-15949096.637571886}var oV=[Math.floor(oJ.sw.lng/oN)-oK,Math.floor(oJ.sw.lat/oN)];var i=[Math.floor(oJ.ne.lng/oN)+oX,Math.floor(oJ.ne.lat/oN)];oT=oV[0]-this.config.extendTiles;oP=i[0]+1+this.config.extendTiles;oY=oV[1]-this.config.extendTiles;oU=i[1]+1+this.config.extendTiles;var oR=m5.tileToBoundRange({col:oP,row:oU,baseTileSize:oW,zoom:oO});var oL=m5.tileToBoundRange({col:oT,row:oY,baseTileSize:oW,zoom:oO});this.mapExtendBounds=new lx(oL.LL.sw,oR.LL.ne);return this.mapExtendBounds},isLoaded:function(){return !!this.loaded},_getBestLevel:function(i,oP){var oI=0;if(this._renderType==="webgl"&&!c7()){oI=100}var oJ=oP.margins||[10,10,10,10];var T=oP.zoomFactor||0;var oK=oJ[1]+oJ[3];var oH=oJ[0]+oJ[2];var e=this.getMinZoom();var oO=this.getMaxZoom();var oN=i.toSpan();var oM=oN.width/(this.width-oK-oI);var oL=oN.height/(this.height-oH-oI);var C=18-v(Math.max(oM,oL));if(CoO){C=oO}C+=T;if(this._renderType!=="webgl"){C=Math.floor(C)}return C},getViewportIn:function(oP,oH){if(this.mapType===cZ){oP=oP||[];var oJ=[];for(var oQ=0;oQ=0;oO--){oK.extend(oI[oO])}if(oK.isEmpty()){return oL}}var oU=oK.getCenter();var e=this._getBestLevel(oK,oH);if(oH.margins){var C=oH.margins;var oT=(C[1]-C[3])/2;var oM=(C[0]-C[2])/2;var oS=this.getZoomUnits(e);oU.lng=oU.lng+oS*oT;oU.lat=oU.lat+oS*oM}return{center:oU,zoom:e}},setViewportIn:function(T,oH){if(this.mapType===cZ){var oL;if(T&&T.center){var C=m5.convertMC2LL(T.center);var oJ=this._earth._getEarthZoomByImgZoom(T.zoom,C);oL={center:C,zoom:oJ}}else{oL=[];for(var oI=0;oIlg.MAX_DRAG_TILT_L2){i.setTilt(lg.MAX_DRAG_TILT_L2,{callback:function(){i._changeEarthMapType(e)}})}else{i._changeEarthMapType(e)}},_changeEarthMapType:function(C){var T=this;var oJ=T.tileMgr.tileLayers;if(this.mapType===j7){this._clearSatelliteOverlayState()}if(this._mapTypeChangAni){this._mapTypeChangAni.stop()}var oI;if(this._earth){oI=this._earth.getEarthCanvas()}if(!this._earth){this.maskLayer.style.opacity=1;this.maskLayer.style.zIndex=999;this.maskLayer.style.background="#000"}this._mapTypeChangAni=new ih({duration:400,render:function(e){if(!T._earth){return}oI.style.opacity=e},finish:function(){for(var e=oJ.length-1,oK=e;oK>=0;oK--){var oM=oJ[oK].tilesDiv;if(oM){oM.style.visibility="hidden"}if(oJ[oK]._isInnerLayer&&T._renderType!=="webgl"){T._removeTileLayer(oJ[oK])}}T._mapTypeChangAni=null;T._mapTypeChanging=false;function oL(){var oQ=T.getZoom()-2;var oR=T.getCenterIn();var oO=m5.convertMC2LL(oR);T._earth=new cu.Earth(T,{center:oO,zoom:oQ,showRealSunlight:T.config.showRealSunlight,showMilkyway:T.config.showMilkyway,earthBackground:T.config.earthBackground});if(T.config&&T.config.earthMaxZoom&&T._earth){T._earth.setMaxZoom(T.config.earthMaxZoom)}if(T.config&&T.config.earthMinZoom&&T._earth){T._earth.setMinZoom(T.config.earthMinZoom)}T._proxyEarthEvents();var oN=T.mapType;T.mapType=C;var oP=new iv("onmaptypechange");oP.zoomLevel=this.zoomLevel;oP.mapType=C;oP.exMapType=oN;T.dispatchEvent(oP);T._setMapTypeStatus(C);ht.extend(T,cu.EarthView.prototype);if(!T._navigationCtrl&&T.config.showControls){T._navigationCtrl=new hw(T)}}if(!T._earth){if(cu["FeatureStyle"+T.config.style]){oL()}else{T.loadMapStyleFiles(function(){oL()})}}if(parseInt(T.maskLayer.style.opacity,10)===1){setTimeout(function(){T.maskLayer.style.zIndex=9;T.maskLayer.style.opacity=0},1000)}}});if(!this._earth){return}var i=this.mapType;this.mapType=C;var oH=new iv("onmaptypechange");oH.zoomLevel=this.zoomLevel;oH.mapType=C;oH.exMapType=i;this.dispatchEvent(oH);T._setMapTypeStatus(C);ht.extend(T,cu.EarthView.prototype)},getMapStyleId:function(){if(typeof this.config.style==="string"){return this.config.style}return this.config.mapStyleId||"custom"},getAreaStyleId:function(){return this.config.areaStyleId||"areaStyle"},_printLog:function(e){var i;switch(e){case"mapvgl":i=249;break;case"mapvthree":i=248;break;case"bmapdraw":i=247;break;default:break}if(i){kS.sendMessage("Map","library",e)}},_setMapTypeStatus:function(C){var oK=arguments[1];if(C===cZ){var oI=this._earth.getEarthCanvas();if(oI){oI.style.display=""}var oL={noAnimation:true};if(this.earthMinZoom){this._earth.setMinZoom(this.earthMinZoom);this.earthMinZoom=undefined}if(this.earthMaxZoom){this._earth.setMaxZoom(this.earthMaxZoom);this.earthMaxZoom=undefined}this._earth.setCenter(m5.convertMC2LL(this.centerPoint),oL);this._earth.setImageZoom(this.zoomLevel,oL);this._earth.setTilt(this.getTilt(),oL);this._earth.setHeading(this.getHeading(),oL);if(this.config.showStreetLayer){this._earth.showStreetLayer()}else{this._earth.hideStreetLayer()}}else{if(this.preMapType===cZ&&this._earth){var oJ=this._earth;var T=oJ.getMapZoom();var oH=oJ._imageRawZoom||T;var i=oH-T;var e=oJ.getCenter();if(this._renderType==="webgl"){this._tilt=oJ.getTilt();if(this.zoomLevel>7){this._heading=oJ.getHeading();oK&&oK(e,T);return}if(oJ.getHeading()!==0){oJ.setTilt(this.getTilt());oJ.setHeading(this.getHeading(),{callback:function(){oK&&oK(e,T)}})}else{oK&&oK(e,T)}return}if(i<0.1&&oJ.getTilt()===0&&oJ.getHeading()===0){oK&&oK(e,T);return}oJ.setTilt(0);oJ.setHeading(0);oJ.setZoom(oJ.getZoom()-i,{callback:function(){oK&&oK(e,T)}})}}},_proxyEarthEvents:function(){var oH=this;var oI=this._earth;oI.on("tilesload",function(i){oH.fire(i)});oI.on("centerandzoom",function(i){oH.dispatchEvent(new iv("onmoveend"));oH.dispatchEvent(new iv("onzoomend"))});function T(i){oH.fire(i)}var e=["zoomstart","zoomend","tilesload","sunlighttime_change","sunlighttime_clear","centerandzoom","animation_start","animation_stop","movestart","moveend","moving","dragstart","dragend","dragging"];for(var C=0;C=3?e:3},setEarthMinZoom:function(e){var i=e-2>=1?e-2:1;if(this.mapType==="B_EARTH_MAP"){this._earth.setMinZoom(i);this.earthMinZoom=undefined;return}this.earthMinZoom=i},setCenterIn:function(e,i){i=i?i:{};i.tilt=i.tilt?i.tilt:this.getTilt();i.heading=i.heading?i.heading:this.getHeading();this.panToIn(e,i)},getRenderType:function(){return this._renderType},getSolarInfo:function(T){T=T||this._initDate;var C=ib(T);var e=m5.convertLL2MC(new d7(C[0],C[1]));var oO=e.latLng;var oJ=m5.convertMC2LL(this.centerPoint);var oL=T.getUTCHours();var oN=oL+24*oJ.lng/360;var oM=oN-12;var oK=oM*60*0.25;var oI=Math.asin(Math.sin(ml(oJ.lat))*Math.sin(ml(oO.lat))+Math.cos(ml(oJ.lat))*Math.cos(ml(oO.lat))*Math.cos(ml(oK)));var oH=Math.asin(Math.sin(ml(oK))*Math.cos(ml(oO.lat))/Math.cos(oI));var i="north";if(oJ.lat=19){return lg.MAX_DRAG_TILT}else{if(e<=18){if(e=this._enableTiltZoom-2){return(1-(this._enableTiltZoom-e)/2)*lg.MAX_DRAG_TILT_L2}return 0}return lg.MAX_DRAG_TILT_L2}else{return(lg.MAX_DRAG_TILT-lg.MAX_DRAG_TILT_L2)*(e-18)+lg.MAX_DRAG_TILT_L2}}},worldSize:function(i){var e=i||this.zoomLevel;return lg.WORLD_SIZE_MC/this.getZoomUnits(e)},setTrafficOn:function(T,e){if(!K.apiVersionIsGL()){console.warn("[BMap] setTrafficOn is deprecated, use BMap.TrafficLayer instead")}var i=this;if(T&&Number(T)>1){nU.setZIndex(Number(T))}e=e||{};if(e.reload){var C=e.reloadTime||5*60*1000;nU.reloadTimer=setInterval(function(){nU.clearCache();var oH=new iv("onupdate");i.fire(oH)},C)}kS.sendMessage("Map","traffic");this._addTileLayer(nU)},setTrafficOff:function(){if(nU.reloadTimer){clearInterval(nU.reloadTimer)}this._removeTileLayer(nU)},showOverlayContainer:function(){this.setDisplayOptions({overlay:true})},hideOverlayContainer:function(){this.setDisplayOptions({overlay:false})},addLabelsToMapTile:function(oJ,oI){kS.sendMessage("Map","bindtype","custom_label");for(var T=0;T0){this.addLabelsToMapTile(oL,oJ)}return oI},removeLabelsFromMapTile:function(oH,T,C){var oJ=new iv("onremove_tile_labels");if(T&&C){oJ.data=oH;oJ.index=T;oJ.model=C}else{for(var oI=0;oI-1&&cu[C]){e.push(C)}}return e},setCopyrightOffset:function(T,i){var C=new iv("oncopyrightoffsetchange",{logo:T,cpy:i});this.dispatchEvent(C)},_setTextRenderType:function(e){if(e){this.config.textRenderType=e;return}if(this.config.textRenderType!==null){return}if(c7()){this.config.textRenderType="canvas"}else{if(typeof this.config.style==="string"){this.config.textRenderType="image"}else{this.config.textRenderType="canvas"}}},destroy:function(){this._destroyed=true;this.disableAutoResize();this.off("size_changed");this.off("zoom_changed");this.fire(new iv("ondestroy"));var e=this.config.mapStyleId||0;delete cu["customStyleInfo_"+e];delete cu["FeatureStyle"+e];if(nU.reloadTimer){clearInterval(nU.reloadTimer)}cu.BMAP_INSTANCES&&(cu.BMAP_INSTANCES-=1);if(!cu.BMAP_INSTANCES){this.destroyStyle();window.FeatureStyle=null;window.iconSetInfo_high=null;window.indoorStyle=null}this.config={};this.clearSpots();this._webGLStateId&&fT.WebGLState.remove(this._webGLStateId);this.container.onselectstart=null;this.container.style.backgroundImage="";this.container.innerHTML="";this.maskLayer=null;this.platform=null;kS.kill();d2.kill();mJ.kill();if(this._listeners){for(var i in this._listeners){if(this._listeners.hasOwnProperty(i)){this.off(i)}}}var C=this;setTimeout(function(){C._listeners=null;C._bounds=null;C.tileLabels=[];C._overlayMgrGL=null;C._overlayMgr=null;C._mapIcon=null;if(C._mouse){C._mouse._drag=null;C._mouse=null}C.deepZoom=null;C.tileMgr=null;C.indexToRgb=null;C.toFormatCoords=null;C._webglMapCamera=null;C._normalLayerMgr=null;C._webglPainter=null;C._webglMapScene=null;C._indoorMgr=null;if(C._renderType==="webgl"){if(C._spotsMgr&&C._spotsMgr.destroy){C._spotsMgr.destroy()}C._spotsMgr=null;C._workerMgr=null;C.jobScheduler=null;C.benchmark=null;C._featureMgr=null;C._labelProcessor=null;C._customLabelMgr=null}if(C.cpyCtrl){C.cpyCtrl._map=null;C.cpyCtrl=null}C.logoCtrl=null;C._spotDataOnCanvas=null;C._navigationCtrl=null;if(C.hashCode){C.dispose();C._destroyed=true}},100)},destroyStyle:function(){var e=[];var oH=Object.keys(cu);for(var T=0;T-1||C.indexOf("iconSetInfo")>-1||C.indexOf("indoorStyle")>-1){e.push(C)}}for(var T=0;T0&&C[0] instanceof g0&&typeof C[0].getBounds==="function"){var oL=new lx();for(var T=0;T-1&&e[oJ]["featureType"]!=="INTERNATIONALIZEICONICON"){oL.push(e[oJ])}else{oK.push(e[oJ])}}var oP=K.apiHost+"/";var oO=K.apiHost+"/";if(window._BMapSecurityConfig&&window._BMapSecurityConfig["serviceHost"]){var oP=window._BMapSecurityConfig["serviceHost"]+"custom/"+this.version+"/mapstyle?version="+4+"&qt=custom_v2&is_all=true&is_new=1&";var oO=window._BMapSecurityConfig["serviceHost"]+"custom/"+this.version+"/mapstyle?version="+4+"&qt=custom_v2&is_all=true&is_new=1&space=indoor&"}else{var oP=oP+"custom/"+this.version+"/mapstyle?version="+4+"&ak="+oM+"&qt=custom_v2&is_all=true&is_new=1&";var oO=oO+"custom/"+this.version+"/mapstyle?version="+4+"&ak="+oM+"&qt=custom_v2&is_all=true&is_new=1&space=indoor&"}var oI=this.styleJson2styleStringV2(oK,oQ);var C=this.styleJson2styleStringV2(oL,oR);oP+="styles="+encodeURIComponent(oI);oO+="styles="+encodeURIComponent(C);if(T&&T.os&&T.sv){oP+="&os="+T.os+"&sv="+T.sv;oO+="&os="+T.os+"&sv="+T.sv}var oH=new Date()["getTime"]();oP+="&timeStamp="+oH;oP+=nm()(oP);oO+="&timeStamp="+oH;oO+=nm()(oO);var oN={custom:{url:oP,id:"customStyleInfo_"+oS,},indoor:{url:oO,id:"indoorStyleInfo_"+oS,},hasInfoor:oL.length>0,};return oN},styleJson2styleStringV2:function(e,oK){var oO={featureType:"t",elementType:"e",visibility:"v",color:"c",opacity:"o",lightness:"l",saturation:"s",weight:"w",level:"z",hue:"h",fontsize:"f",image:"i"};var oQ={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","geometry.topfill":"g.tf","geometry.sidefill":"g.sf",texture:"t"};var oR=[];for(var T=this.map.getMinZoom();T<=this.map.getMaxZoom();T++){oK.zoomFrontStyle[T]={}}oK.zoomFrontStyle.main={};var C=false;for(var T=0;!!e[T];T++){var oP=e[T];if(this.isOnlyZoomStyler(oP)){continue}var oN=this.getFrontZoom(oP);if((oP.featureType==="land"||oP.featureType==="all"||oP.featureType==="background")&&typeof oP.elementType==="string"&&(oP.elementType==="geometry"||oP.elementType==="texture"||oP.elementType==="geometry.fill"||oP.elementType==="all")&&oP.stylers&&!C){if(oP.stylers["color"]){oK.bmapLandColor=oP.stylers["color"]}if(oP.stylers["image"]){oK.bmapLandFillTexture=oP.stylers["image"]}if(oP.stylers["opacity"]){oK.bmapLandColor=oP.stylers["opacity"]}if(oP.stylers["visibility"]&&oP.stylers["visibility"]==="off"){oK.bmapLandColor="#00000000"}if(oP.featureType==="land"){C=true}}if(oP.featureType==="building"&&typeof oP.elementType==="string"&&oP.elementType==="geometry.fill"){oK.buildingFill=true}if(oP.featureType==="roadarrow"&&oP.elementType==="labels.icon"&&oP.stylers){var oL=oP.stylers["visibility"];oK.zoomFrontStyle[oN]["bmapRoadarrowVisibility"]=oL}var oH={};ht.extend(oH,oP);var oJ=oH.stylers;delete oH.stylers;ht.extend(oH,oJ);var oI=[];for(var oM in oO){if(oH[oM]){if(this.isEditorZoomKeys(oM)){continue}if(oM==="elementType"){oI.push(oO[oM]+":"+oQ[oH[oM]])}else{if(oM==="image"){oI.push(oO[oM]+":"+encodeURIComponent(encodeURIComponent(oH[oM])))}else{switch(oH[oM]){case"poilabel":oH[oM]="poi";break;case"districtlabel":oH[oM]="label";break}oI.push(oO[oM]+":"+oH[oM])}}}}if(oI.length>2){oR.push(oI.join("|"))}}return oR.join(",")},getFrontZoom:function(e){var i=e.stylers["level"];if(i===undefined){return"main"}else{return parseInt(i,10)}},isZoomConfig:function(e){var i=e.stylers["level"];if(i===undefined){return false}else{return true}},isOnlyZoomStyler:function(e){var i={};ht.extend(i,e.stylers);delete i.curZoomRegionId;delete i.curZoomRegion;delete i.level;if(ht.isEmptyObject(i)){return true}else{return false}},isSelectZoom:function(i,e){var C=i.stylers["level"];if(C===undefined){return true}else{if(C===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 T=e.stylers["level"];var C={};ht.extend(C,i);if(T===undefined){return C}else{C[parseInt(T,10)]=true;return C}},onStyleDataBack:function(C,i,e,T){if(this._default){this.parseStyleData(C,i,e,T)}else{this._dataList.push({method:"parseStyleData",arguments:[C,i,e,T]})}},parseStyleData:function(oH,C,i,oJ){oH=JSON.parse(oH);var T="Feature";if(C.indexOf("indoor")!==-1){T="indoor"}if(oH.status===0&&oH.data&&oH.data.style&&oH.data.style.length===3){if(!i.baseFs){if(this.version==="v3"){var e=JSON.parse(JSON.stringify(cu[T+"StyleDefault"]));i.baseFs=this.combindStyle(e,oH.data.style)}else{i.baseFs=oH.data.style}}}else{if(!i.baseFs){i.baseFs=cu[T+"StyleDefault"]}}var oI=i.baseFs;this.updateFrontFeatureStyle(i);oJ&&oJ()},updateFrontFeatureStyle:function(C){if(C.zoomFrontStyle.main["bmapRoadarrowVisibility"]){for(var e=this.map.getMinZoom();e<=this.map.getMaxZoom();e++){if(!C.zoomFrontStyle[e]){C.zoomFrontStyle[e]={}}if(!C.zoomFrontStyle[e]["bmapRoadarrowVisibility"]){C.zoomFrontStyle[e]["bmapRoadarrowVisibility"]=C.zoomFrontStyle.main["bmapRoadarrowVisibility"]}}}},getMapStyleFiles:function(T,oJ,e,C){var i=T.split("?")[0];var oI=T.split("?")[1];var oH=new XMLHttpRequest();oH.open("POST",i,true);oH.setRequestHeader("Content-type","application/x-www-form-urlencoded");oH.timeout=10000;oH.ontimeout=function(){C&&C()};oH.onreadystatechange=function(oK){if(this.readyState===4){if(this.status===200){oJ&&oJ(this.responseText)}else{e&&e()}}};oH.send(oI);return oH},getDefaultStyle:function(i){var e=this;jU.load(K.getMapStyleFiles("default"),function(){cu.FeatureStyleDefault=window.FeatureStyle;cu.iconSetInfoDefault=window.iconSetInfo_high;cu.iconSetInfoCustom=window.iconSetInfo_high;cu.indoorStyleDefault=window.indoorStyle;e._default=true;e.syncDataList.call(e);i&&i()})},syncDataList:function(){if(this._default){for(var C=0,e=this._dataList.length;C0){oK=oH.verticesLength[C-1]}end=oH.verticesLength[C];var oI=[];var T="";if(oH.vertex){oI=oH.vertex;T="building3d"}else{if(oH.data[0]){oI=oH.data[0];T=oH.type}else{continue}}var oJ=this.calcDrawMc(oI.slice(oK,end),T,e);this.map.addAreaSpot(oJ,{userData:{styleId:oH.styleIds[C],type:"mapstyle"}})}},addLabelIntoAreaSpots:function(e){if(F.environment!=="customEditor"){return}for(var oH=0;oHoJ){return oJ}while(oKC){oK=oH}else{oJ=oH}oH=(oJ-oK)*0.5+oK}return oH};dN.prototype.solve=function(e,i){return this.sampleCurveY(this.solveCurveX(e,i))};var jD={};function ih(C){var e={duration:1000,fps:30,delay:0,transition:jD.linear,dropLastAnimation:false};if(C){for(var T in C){e[T]=C[T]}}if(C.beginTime){this._beginTime=C.beginTime}this._callbacks=[];this._options=e;if(e.delay){var oH=this;setTimeout(function(){oH._doStart()},e.delay)}else{this._doStart()}this._pauseTime=0}ih.INFINITE="INFINITE";ih.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(C){i._loop(C)})}else{this._beginTime=new Date().getTime();if(this._options.duration===ih.INFINITE){this._endTime=null}else{this._endTime=this._beginTime+this._options.duration}this._loop()}};ih.prototype.setBeginTime=function(e){this._beginTime=e};ih.prototype.setDuration=function(e){this._options.duration=e};ih.prototype._loop=function(T){var oJ=this;T=T||new Date().getTime();T=T-this._pauseTime;if(!this._beginTime){this._beginTime=T}this._endTime=this._beginTime+this._options.duration;if(oJ._endTime!==null&&T>=oJ._endTime){if(oJ._options.dropLastAnimation===false){oJ._options.render(oJ._options.transition(1),1,T)}if(typeof oJ._options.finish==="function"){oJ._options.finish(T,this)}for(var oI=0,e=oJ._callbacks.length;oI=oH.percentage&&TT){C=oI;var oH="系统于"+e.year+"年"+e.month+"月"+e.day+"日";oL="【"+i+"】"+oH+oL;try{var oM=document.createElement("iframe");oM.style.display="none";document.body.appendChild(oM);if(oM.contentWindow&&oM.contentWindow.alert){oM.contentWindow.alert(oL)}else{window.alert(oL)}document.body.removeChild(oM)}catch(oK){window.alert(oL)}d2.sendMessage("popup",oN,i)}}})();function ox(e){return e.style}function lA(i){if(ht.Browser.ie>0){i.unselectable="on";i.selectstart=function(){return false};i.onmousedown=function(C){C.preventDefault();return false}}else{var e=ox(i);e.MozUserSelect="none";e.WebkitUserSelect="none";i.addEventListener("mousedown",function(C){C.preventDefault()},false)}}function bw(e){return e&&e.parentNode&&e.parentNode.nodeType!==11}function cO(i,e){if(!i){return null}i.insertAdjacentHTML("beforeEnd",e);return i.lastChild}function iA(C,i){var T=document.createElement("div");T.innerHTML=i;var e=T.childNodes[0];return C.parentNode.insertBefore(e,C)}function aE(i){i=i||window.event;i.stopPropagation?i.stopPropagation():i.cancelBubble=true}function g(i){i=i||window.event;i.preventDefault?i.preventDefault():i.returnValue=false;return false}function kI(i){aE(i);return g(i)}function j2(){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 l3(oH){if(!oH){return}oH.onload=oH.onerror=null;var C=oH.attributes,T,e,oI;if(C){e=C.length;for(T=0;T=e){return gO(oL,oH)}var i=oI/e;var oK=C.lng+(oH.lng-C.lng)*i;var oJ=C.lat+(oH.lat-C.lat)*i;const T={lng:oK,lat:oJ};return gO(oL,T)}function hI(C,i){var e=Math.round((C.x+i.x)/2);var T=Math.round((C.y+i.y)/2);return new hT(e,T)}function nh(e,C){var i=[];C=C||function(oH){return oH};for(var T in e){i.push(T+"="+C(e[T]))}return i.join("&")}function c8(C,i,oI){var oJ=document.createElement(C);if(oI){oJ=document.createElementNS(oI,C)}i=i||{};for(var T in i){var oH={"for":"htmlFor","class":"cssClass"}[T]||T;if(T==="style"){oJ.style.cssText=i[T];continue}if(T==="class"){ht.ac(oJ,i[T]);continue}if(oJ.setAttribute){oJ.setAttribute(oH,i[T])}else{try{oJ[oH]=i[T]}catch(oJ){}}}return oJ}function dI(e){if(e.currentStyle){return e.currentStyle}else{if(e.ownerDocument&&e.ownerDocument.defaultView){return e.ownerDocument.defaultView.getComputedStyle(e,null)}}}function c0(e){return typeof e==="function"}function i7(e){return e===void 0}function nR(e,i){return Object.prototype.hasOwnProperty.call(e,i)}function k(oH,oI){if(i7(oH.length)){for(var T in oH){if(nR(oH,T)){oI.call(null,T,oH[T])}}}else{var C=oH.length;if(C){for(var e=0;e>4);oM=((oL&15)<<4)|(oJ>>2);oK=((oJ&3)<<6)|oI;C=C+String.fromCharCode(oO);if(oJ!==64){C=C+String.fromCharCode(oM)}if(oI!==64){C=C+String.fromCharCode(oK)}oO=oM=oK="";oN=oL=oJ=oI=""}while(T-1||e.indexOf("iPad")>-1){return true}return false}function lr(){var e=navigator.userAgent;if(e.indexOf("Android")>-1){return true}return false}function hK(){var e=navigator.userAgent;if(e.indexOf("Harmony")>-1){return true}return false}function eW(T,C){var e=T.getContainer();var i=C.getContainer();return e===i}function nF(){var e=navigator.userAgent;if(e.indexOf("Mobile")>-1){return true}return false}function ml(e){return e*Math.PI/180}function hH(e){return e/Math.PI*180}function cB(e,oH){var T=Math.pow(10,oH);if(typeof e==="number"){return Math.round(e*T)/T}for(var C=0;Ce){C=e}}return C}function go(e,i){while(e<0){e+=i}return e%i}function ln(i,e){return(i>=0&&e>=0)||(i<0&&e<0)}function Y(i){if(i._gl){return i._gl}var e={alpha:true,antialias:false,failIfMajorPerformanceCaveat:false,preserveDrawingBuffer:false,stencil:false};var C=i.getContext("webgl",e)||i.getContext("experimental-webgl",e);i._gl=C;return C}function mh(T,C){for(var e=0;eT||C.lati){return false}return true}function m4(oK,oJ,oI,T){var oH=ai(oI,T,oK);var C=ai(oI,T,oJ);var i=ai(oK,oJ,oI);var e=ai(oK,oJ,T);if(oH*C<0&&i*e<0){return true}else{if(oH===0&&mQ(oI,T,oK)){return true}else{if(C===0&&mQ(oI,T,oJ)){return true}else{if(i===0&&mQ(oK,oJ,oI)){return true}else{if(e===0&&mQ(oK,oJ,T)){return true}else{return false}}}}}}function k3(C,i){var e=i.parentNode;if(e.lastChild===i){e.appendChild(C)}else{e.insertBefore(C,i.nextSibling)}}function fQ(oM,oN){if(oN===0){return oM}var oL=0;var oJ=0;if(!oM){throw"异常"}if(oM.length===0){return[]}for(var oH=1,C=oM.length-1;oHoL){oJ=oH;oL=oK}}var e=[];if(oL>=oN){var oP=oM.slice(0,oJ);var oO=oM.slice(oJ,oM.length);var oI=fQ(oP,oN);var T=fQ(oO,oN);for(var oH=0,C=oI.length;oH=oH){C.push(T[e])}}return C}function v(e){if(Math.log2){return Math.log2(e)}return Math.log(e)/Math.LN2}function e1(C,i,e){return Math.min(e,Math.max(i,C))}function aN(e,i){if(!i){return e}var oI=i[0];var oH=i[1];var T=i[2];var C=i[3];var oK=[];var oJ=[];oK[0]=C*e[0]+T*e[2];oK[1]=e[1];oK[2]=-T*e[0]+C*e[2];oJ[0]=oK[0];oJ[1]=oH*oK[1]-oI*oK[2];oJ[2]=oI*oK[1]+oH*oK[2];return oJ}var r=Math.PI/180;var jT=180/Math.PI;function ib(C){var i=(C-Date.UTC(2000,0,1,12))/86400000/36525;var e=(d3.utcDay.floor(C)-C)/86400000*360-180;return[e-hW(i)*jT,fX(i)*jT]}function hW(T){var oH=ci(T);var i=gb(T);var C=md(T);var oI=Math.tan(mc(T)/2);oI*=oI;return oI*Math.sin(2*C)-2*oH*Math.sin(i)+4*oH*oI*Math.sin(i)*Math.cos(2*C)-0.5*oI*oI*Math.sin(4*C)-1.25*oH*oH*Math.sin(2*i)}function fX(e){return Math.asin(Math.sin(mc(e))*Math.sin(cp(e)))}function cp(e){return oq(e)-(0.00569+0.00478*Math.sin((125.04-1934.136*e)*r))*r}function oq(e){return md(e)+na(e)}function gb(e){return(357.52911+e*(35999.05029-0.0001537*e))*r}function md(i){var e=(280.46646+i*(36000.76983+i*0.0003032))%360;return(e<0?e+360:e)/180*Math.PI}function na(i){var e=gb(i);return(Math.sin(e)*(1.914602-i*(0.004817+0.000014*i))+Math.sin(e+e)*(0.019993-0.000101*i)+Math.sin(e+e+e)*0.000289)*r}function mc(e){return fm(e)+0.00256*Math.cos((125.04-1934.136*e)*r)*r}function fm(e){return(23+(26+(21.448-e*(46.815+e*(0.00059-e*0.001813)))/60)/60)*r}function ci(e){return 0.016708634-e*(0.000042037+1.267e-7*e)}function i8(){return window.devicePixelRatio||1}function mw(C){var i;var e;var T;if(C>=0){T=Math.floor(C/65536)*65536;i=T;e=C-T}else{T=Math.floor(-C/65536)*65536;i=-T;e=C+T}return[i,e]}function eh(e){if(e.lng>=0&&e.lat>=0){return new d7(e.lng-10000000,e.lat-6000000)}if(e.lng>=0&&e.lat<0){return new d7(e.lng-10000000,e.lat+6000000)}if(e.lng<0&&e.lat>=0){return new d7(e.lng+10000000,e.lat-6000000)}if(e.lng<0&&e.lat<0){return new d7(e.lng+10000000,e.lat+6000000)}}var lO=null;if(window.performance&&window.performance.now){lO=function(){return performance.now()}}else{if(Date.now){lO=function(){return Date.now()}}else{lO=function(){return(new Date).getTime()}}}function lm(T,e,i){var C="mouseWheel";if(ht.Platform.macintosh){if(!isNaN(T)&&(T<10||T!==120)&&(e%1===0&&e<5)){C="padScroll"}if(ht.Browser.firefox&&(e%1===0&&e<5&&i===0)){C="padScroll"}}if(ht.Browser.safari&&T===12){C="mouseWheel"}return C}function cP(oP,oK){var oO=oP[0];var oN=oP[1];var T=false;for(var oJ=0,oI=oK.length-2;oJoN)!==(C>oN))&&(oO<(oL-oM)*(oN-oH)/(C-oH)+oM);if(e){T=!T}oI=oJ}return T}function lk(oH,oJ){oJ=oJ||[];var e=oJ.length;var C=0;var oI=false;for(var T=0;T=oJ[T].lat)&&(oH.lat=oJ[C].lat)&&(oH.lati){C=Math.pow(C-i+1,T)+i-1}else{if(Cthis.ll.lng&&e.lngthis.ll.lat&&e.latkD){return aZ}return h8};kO.prototype.normalize=function(i,T,e,C){if(i>e){this.ll.lng=e;this.ru.lng=i}else{this.ll.lng=i;this.ru.lng=e}if(T>C){this.ll.lat=C;this.ru.lat=T}else{this.ll.lat=T;this.ru.lat=C}};function gT(i,T,e,C){this.sp={lng:i,lat:T};this.ep={lng:e,lat:C};this.mbr=new kO(i,T,e,C)}function lR(T,e,oI,oH){for(var C=0;C=e[C]&&T.lng<=e[C+1]&&T.lat>=oI[C]&&T.lat<=oI[C+1]){return true}}return false}function jf(oL){var i=oL.lng;var oK=oL.lat;var T=Math.sqrt(i*i+oK*oK);var oI=Math.atan2(oK,i);var C=T+js(oK);var oH=oI+jr(i);var e=C*Math.cos(oH);var oJ=C*Math.sin(oH);return{lng:e+la,lat:oJ+k9}}function bK(oL){var i=oL.lng-la;var oK=oL.lat-k9;var T=Math.sqrt(i*i+oK*oK);var oI=Math.atan2(oK,i);var C=T-js(oK);var oH=oI-jr(i);var e=C*Math.cos(oH);var oJ=C*Math.sin(oH);return{lng:e,lat:oJ}}function js(e){return Math.sin(e*it*mL)*j1}function jr(e){return Math.cos(e*it*mL)*jZ}function aR(C,i,e){return((i.lng-C.lng)*(e.lat-C.lat)-(e.lng-C.lng)*(i.lat-C.lat))}function lh(i,e){return Math.abs(i-e)<=kD}function jE(T,C){var i=T.lat*mL;var oL=T.lng*mL;var e=C.lat*mL;var oK=C.lng*mL;var oI=Math.cos(i)*Math.cos(e);var oH=Math.cos(oL)*Math.cos(oK);var oN=Math.sin(i)*Math.sin(e);var oM=Math.sin(oL)*Math.sin(oK);var oO=oI*oH+oI*oM+oN;if(oO<-1){oO=-1}else{if(oO>1){oO=1}}var oJ=Math.acos(oO)*mr;return oJ}function n(oK,oJ){var i=oK.lat*mL;var e=oJ.lat*mL;var T=oK.lng*mL;var C=oJ.lng*mL;var oI=i-e;var oH=T-C;var oL=Math.sin(oI/2)*Math.sin(oI/2)+Math.cos(i)*Math.cos(e)*Math.sin(oH/2)*Math.sin(oH/2);return 2*Math.asin(Math.sqrt(oL))*mr}function jC(oL,C){var oN=cx(oL,C);var oM=180;var oK=90;var oJ=-180;var oH=-90;var oI=C.sp;var T=C.ep;oM=oI.lng=oM&&oN.lng<=oH&&oN.lat>=oK){return jE(oL,oN)}else{var i=n(oL,C.sp);var e=n(oL,C.ep);return iT.lat){if(aR({lng:eN[e],lat:eL[e]},{lng:eN[(e+1)%at],lat:eL[(e+1)%at]},T)>0){++C}}}else{if(eL[(e+1)%at]<=T.lat){if(aR({lng:eN[e],lat:eL[e]},{lng:eN[(e+1)%at],lat:eL[(e+1)%at]},T)<0){--C}}}}return C===0?h8:lC}function oh(T){var oJ={};if(T.lnghs[2]+0.4||T.lat>hs[3]+0.4){oJ.lng=T.lng;oJ.lat=T.lat;return oJ}else{if(lR(T,g5,g3,me)){oJ=jf(T);return oJ}}var e=0;var oM=fE;var C=0;var oK=new kO();var oL=1;if(cJ(T)===h8){for(var oI=0;oIE[2]+0.4||i.lat>E[3]+0.4){C.lng=i.lng;C.lat=i.lat;return C}else{if(lR(i,dq,dm,me)){C=bK(i);return C}}var e=oh(i);if(i.lng===e.lng&&i.lat===e.lng){C.lng=i.lng;C.lat=i.lat;return C}return decryptPt1(i,oh)}function mb(i,e){if(e===3&&i instanceof d7){var C=oh(i);return new d7(C.lng,C.lat)}else{return i}}function g7(i,e){if(e===3&&i instanceof d7){var C=hv(i);return new d7(C.lng,C.lat)}else{if(e===5&&i instanceof d7){return new d7(i.lng,i.lat)}else{return i}}}function iK(i,e){if(i&&!lR(i,g5,g3,me)){return i}switch(e){case BMAP_COORD_GCJ02:var C=fS.transform([i.lng,i.lat],fS.GCJ02,fS.BD09LL);return new d7(C[0],C[1]);case BMAP_COORD_WGS84:var C=fS.transform([i.lng,i.lat],fS.WGS84,fS.BD09LL);return new d7(C[0],C[1]);case 3:var C=fS.transform([i.lng,i.lat],fS.GCJ02,fS.BD09LL);return new d7(C[0],C[1]);default:return i}}function mX(i,e){if(i&&!lR(i,g5,g3,me)){return i}switch(e){case BMAP_COORD_GCJ02:var C=fS.transform([i.lng,i.lat],fS.BD09LL,fS.GCJ02);return new d7(C[0],C[1]);case BMAP_COORD_WGS84:var C=fS.transform([i.lng,i.lat],fS.BD09LL,fS.WGS84);return new d7(C[0],C[1]);case 3:var C=fS.transform([i.lng,i.lat],fS.BD09LL,fS.GCJ02);return new d7(C[0],C[1]);default:return i}}function u(oI){if(!oI){oI={}}var oJ=JSON.stringify(oI);var oH=0,C,T,e;if(oJ.length===0){return oH}for(C=0,e=oJ.length;C=3){var T=oH[0]||0;var C=oH[1]||0;var e=oH[2]||0;var i=oH[3]||1}else{var T=(oH)&255;var C=(oH>>8)&255;var e=(oH>>16)&255;var i=(oH>>24)&255}if(!oH){return 0}return T+C*256+e*65536-1}function l(e){var i=true;var C=e.charAt(0);switch(C){case"\n":return"\\n";break;case"\r":return"\\r";break;case"'":return"\\'";break;case'"':return'\\"';break;case"&":return"\\&";break;case"\\":return"\\\\";break;case"\t":return"\\t";break;case"\b":return"\\b";break;case"\f":return"\\f";break;case"/":return"\\x2F";break;case"<":return"\\x3C";break;case">":return"\\x3E";break;default:i=false;break}if(!i){return e}}function b(oH){var C=oH;var T="";var e=0;for(e=0;ei-pK?pK:pL},e.offset=function(i,pK){return pJ(i=new Date(+i),null==pK?1:Math.floor(pK)),i},e.range=function(pL,i,pK){var pM=[];if(pL=e.ceil(pL),pK=null==pK?1:Math.floor(pK),!(i>pL&&pK>0)){return pM}do{pM.push(new Date(+pL))}while(pJ(pL,pK),pI(pL),i>pL);return pM},e.filter=function(i){return pC(function(pK){for(;pI(pK),!i(pK);){pK.setTime(pK-1)}},function(pK,pL){for(;--pL>=0;){for(;pJ(pK,1),!i(pK);){}}})},C&&(e.count=function(i,pK){return pm.setTime(+i),pq.setTime(+pK),pI(pm),pI(pq),Math.floor(C(pm,pq))},e.every=function(i){return i=Math.floor(i),isFinite(i)&&i>0?i>1?e.filter(T?function(pK){return T(pK)%i===0}:function(pK){return e.count(0,pK)%i===0}):e:null}),e}function pr(e){return pC(function(i){i.setDate(i.getDate()-(i.getDay()+7-e)%7),i.setHours(0,0,0,0)},function(i,C){i.setDate(i.getDate()+7*C)},function(i,C){return(C-i-(C.getTimezoneOffset()-i.getTimezoneOffset())*pl)/pz})}function pj(e){return pC(function(i){i.setUTCDate(i.getUTCDate()-(i.getUTCDay()+7-e)%7),i.setUTCHours(0,0,0,0)},function(i,C){i.setUTCDate(i.getUTCDate()+7*C)},function(i,C){return(C-i)/pz})}var pm=new Date,pq=new Date,px=pC(function(){},function(i,C){i.setTime(+i+C)},function(i,C){return C-i});px.every=function(e){return e=Math.floor(e),isFinite(e)&&e>0?e>1?pC(function(i){i.setTime(Math.floor(i/e)*e)},function(i,C){i.setTime(+i+C*e)},function(i,C){return(C-i)/e}):px:null};var pG=px.range,pE=1000,pl=60000,pB=3600000,pt=86400000,pz=604800000,oN=pC(function(e){e.setTime(Math.floor(e/pE)*pE)},function(i,C){i.setTime(+i+C*pE)},function(i,C){return(C-i)/pE},function(e){return e.getUTCSeconds()}),pD=oN.range,ps=pC(function(e){e.setTime(Math.floor(e/pl)*pl)},function(i,C){i.setTime(+i+C*pl)},function(i,C){return(C-i)/pl},function(e){return e.getMinutes()}),oV=ps.range,pf=pC(function(i){var C=i.getTimezoneOffset()*pl%pB;0>C&&(C+=pB),i.setTime(Math.floor((+i-C)/pB)*pB+C)},function(i,C){i.setTime(+i+C*pB)},function(i,C){return(C-i)/pB},function(e){return e.getHours()}),py=pf.range,o5=pC(function(e){e.setHours(0,0,0,0)},function(i,C){i.setDate(i.getDate()+C)},function(i,C){return(C-i-(C.getTimezoneOffset()-i.getTimezoneOffset())*pl)/pt},function(e){return e.getDate()-1}),oM=o5.range,o2=pr(0),o4=pr(1),oI=pr(2),o0=pr(3),oP=pr(4),pi=pr(5),pp=pr(6),oK=o2.range,ph=o4.range,oT=oI.range,pe=o0.range,pu=oP.range,pg=pi.range,pF=pp.range,pw=pC(function(e){e.setDate(1),e.setHours(0,0,0,0)},function(i,C){i.setMonth(i.getMonth()+C)},function(i,C){return C.getMonth()-i.getMonth()+12*(C.getFullYear()-i.getFullYear())},function(e){return e.getMonth()}),pH=pw.range,oZ=pC(function(e){e.setMonth(0,1),e.setHours(0,0,0,0)},function(i,C){i.setFullYear(i.getFullYear()+C)},function(i,C){return C.getFullYear()-i.getFullYear()},function(e){return e.getFullYear()});oZ.every=function(e){return isFinite(e=Math.floor(e))&&e>0?pC(function(i){i.setFullYear(Math.floor(i.getFullYear()/e)*e),i.setMonth(0,1),i.setHours(0,0,0,0)},function(i,C){i.setFullYear(i.getFullYear()+C*e)}):null};var oS=oZ.range,pn=pC(function(e){e.setUTCSeconds(0,0)},function(i,C){i.setTime(+i+C*pl)},function(i,C){return(C-i)/pl},function(e){return e.getUTCMinutes()}),o7=pn.range,o6=pC(function(e){e.setUTCMinutes(0,0,0)},function(i,C){i.setTime(+i+C*pB)},function(i,C){return(C-i)/pB},function(e){return e.getUTCHours()}),o3=o6.range,o1=pC(function(e){e.setUTCHours(0,0,0,0)},function(i,C){i.setUTCDate(i.getUTCDate()+C)},function(i,C){return(C-i)/pt},function(e){return e.getUTCDate()-1}),oY=o1.range,oX=pj(0),oW=pj(1),oU=pj(2),oR=pj(3),oQ=pj(4),oL=pj(5),oJ=pj(6),oH=oX.range,pd=oW.range,pA=oU.range,po=oR.range,pv=oQ.range,pc=oL.range,pb=oJ.range,pa=pC(function(e){e.setUTCDate(1),e.setUTCHours(0,0,0,0)},function(i,C){i.setUTCMonth(i.getUTCMonth()+C)},function(i,C){return C.getUTCMonth()-i.getUTCMonth()+12*(C.getUTCFullYear()-i.getUTCFullYear())},function(e){return e.getUTCMonth()}),o9=pa.range,oO=pC(function(e){e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)},function(i,C){i.setUTCFullYear(i.getUTCFullYear()+C)},function(i,C){return C.getUTCFullYear()-i.getUTCFullYear()},function(e){return e.getUTCFullYear()});oO.every=function(e){return isFinite(e=Math.floor(e))&&e>0?pC(function(i){i.setUTCFullYear(Math.floor(i.getUTCFullYear()/e)*e),i.setUTCMonth(0,1),i.setUTCHours(0,0,0,0)},function(i,C){i.setUTCFullYear(i.getUTCFullYear()+C*e)}):null};var o8=oO.range;pk.timeInterval=pC,pk.timeMillisecond=px,pk.timeMilliseconds=pG,pk.utcMillisecond=px,pk.utcMilliseconds=pG,pk.timeSecond=oN,pk.timeSeconds=pD,pk.utcSecond=oN,pk.utcSeconds=pD,pk.timeMinute=ps,pk.timeMinutes=oV,pk.timeHour=pf,pk.timeHours=py,pk.timeDay=o5,pk.timeDays=oM,pk.timeWeek=o2,pk.timeWeeks=oK,pk.timeSunday=o2,pk.timeSundays=oK,pk.timeMonday=o4,pk.timeMondays=ph,pk.timeTuesday=oI,pk.timeTuesdays=oT,pk.timeWednesday=o0,pk.timeWednesdays=pe,pk.timeThursday=oP,pk.timeThursdays=pu,pk.timeFriday=pi,pk.timeFridays=pg,pk.timeSaturday=pp,pk.timeSaturdays=pF,pk.timeMonth=pw,pk.timeMonths=pH,pk.timeYear=oZ,pk.timeYears=oS,pk.utcMinute=pn,pk.utcMinutes=o7,pk.utcHour=o6,pk.utcHours=o3,pk.utcDay=o1,pk.utcDays=oY,pk.utcWeek=oX,pk.utcWeeks=oH,pk.utcSunday=oX,pk.utcSundays=oH,pk.utcMonday=oW,pk.utcMondays=pd,pk.utcTuesday=oU,pk.utcTuesdays=pA,pk.utcWednesday=oR,pk.utcWednesdays=po,pk.utcThursday=oQ,pk.utcThursdays=pv,pk.utcFriday=oL,pk.utcFridays=pc,pk.utcSaturday=oJ,pk.utcSaturdays=pb,pk.utcMonth=pa,pk.utcMonths=o9,pk.utcYear=oO,pk.utcYears=o8,Object.defineProperty(pk,"__esModule",{value:!0})});function hF(e){this._elemType=e;this._objCollection={}}hF.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=c8(this._elemType);e=cu.getGUID("obj_pool_");this._objCollection[e]=i;return i};hF.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}};hF.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 lG={get:function(i,oH,e,C){var T=new XMLHttpRequest();T.open("GET",i,true);T.timeout=10000;T.ontimeout=function(){C&&C()};T.onreadystatechange=function(oI){if(this.readyState===4){if(this.status===200){oH&&oH(T.responseText)}else{e&&e()}}};T.send()},post:function(i,oI,oH,e,C){var T=new XMLHttpRequest();T.open("POST",i,true);T.setRequestHeader("Content-type","application/x-www-form-urlencoded");T.timeout=10000;T.ontimeout=function(){C&&C()};T.onreadystatechange=function(oJ){if(this.readyState===4){if(this.status===200){oH&&oH(T.responseText,oI)}else{e&&e()}}};T.send(oI);return T}};var jU=(function(e){function i(oI,C,oH){if(oI.indexOf("v=")===-1){oI+="&v="+en()}var T=c8("script",{src:oI,type:"text/javascript",charset:"utf-8"});if(T.addEventListener){T.addEventListener("load",function(oK){var oJ=oK.target;oJ.parentNode.removeChild(oJ);C&&C()},false);T.addEventListener("error",function(oK){if(oK){var oJ=oK.target;oJ&&oJ.parentNode&&oJ.parentNode.removeChild(oJ)}oH&&oH(null)},false)}else{if(T.attachEvent){T.attachEvent("onreadystatechange",function(oK){var oJ=window.event.srcElement;if(oJ&&(oJ.readyState==="loaded"||oJ.readyState==="complete")){oJ.parentNode.removeChild(oJ)}C&&C()})}}e.getElementsByTagName("head")[0].appendChild(T)}return{load:function(oJ,C,T){if(typeof oJ==="string"){i(oJ,C,T)}else{if(oJ.length>0){var oI=oJ.length;for(var oH=0;oH-1){return{col:T,row:oM,zoom:oL,useZoom:C}}else{var oJ=oD.mapZoomBaseIndex[oL];var oI=oD.baseScaleZoom[oJ+1];if(!oI){return null}var oK=this.getFactorByZooms(oI,oL);var e=oD.baseZoomInfo[oI];return{col:Math.floor(T/oK),row:Math.floor(oM/oK),zoom:oI,useZoom:e[e.length-1]}}return null}if(oL-1-1){return[{col:oH,row:oJ,zoom:e,useZoom:C}]}else{var oU=0;var oR=e;while(oUoQ){return null}var oP=Math.pow(2,oW);var i=oH*oP;var oO=oJ*oP;var oL=e+oW;var oN=[];for(var oT=0;oT<2;oT++){var oI=i+oT;for(var oS=0;oS<2;oS++){var oK=oO+oS;oN.push({col:oI,row:oK,zoom:oL,useZoom:oL})}}return oN},getFactorByZooms:function(i,T){var C=oD.mapZoomBaseIndex[i];var oH=oD.mapZoomBaseIndex[T];var e=oD.baseScaleZoomMercatorSize[C];var oI=oD.baseScaleZoomMercatorSize[oH];return e/oI}};var eT={};var an=["swiftshader","microsoft basic render driver"];var kH=["intel","nvidia","amd","apple","geforce"];function jG(e){e=e.toLowerCase();if(an.indexOf(e)>=0){return true}if(e.indexOf("mobile")>=0){return true}return false}function eb(C){C=C.toLowerCase();for(var e=0;e=0){return true}}return false}function oz(e){if(!e){return false}if(jG(e)){return false}if(eb(e)){return true}return false}eT.ifEnableEarth=function(i){var e=eT.ifEnableEarth;if(!i&&typeof e._enable==="boolean"){return e._enable}if(eT.ifSupportWebGL()){e._enable=true;return true}e._enable=false;return false};eT.ifEnableWebGLMap=function(i){var e=eT.ifEnableWebGLMap;if(!i&&typeof e._enable==="boolean"){return e._enable}if(eT.ifSupportWebGL()){if(ba.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};eT.params={};eT.ifSupportWebGL=function(){var i=eT.ifSupportWebGL;if(typeof i._supportWebGL==="boolean"){return i._supportWebGL}if(!window.WebGLRenderingContext){i._supportWebGL=false;return false}var C=document.createElement("canvas");C.width=300;C.height=150;var oH=null;var oN={alpha:true,antialias:false,failIfMajorPerformanceCaveat:false,preserveDrawingBuffer:false,stencil:false};try{oH=C.getContext("webgl",oN)||C.getContext("experimental-webgl",oN)}catch(oJ){i._supportWebGL=false}if(oH===null){i._supportWebGL=false}else{i._supportWebGL=true;var oL=oH.getExtension("WEBGL_debug_renderer_info");var oK="";if(oL){oK=oH.getParameter(oL.UNMASKED_RENDERER_WEBGL);if(oz(oK)===true){i._supportWebGL=true}var oM=oH.getParameter(oL.UNMASKED_VENDOR_WEBGL);i._renderer=oK;i._vendor=oM}if(!oL&&ht.Browser.firefox){i._supportWebGL=true}if(!oL&&ht.Platform.macintosh){i._supportWebGL=true}if(oH.drawingBufferWidth!==C.width||oH.drawingBufferHeight!==C.height){i._supportWebGL=false}if(oH.getParameter(oH.MAX_VERTEX_TEXTURE_IMAGE_UNITS)<4){i._supportWebGL=false}var T=oH.getParameter(oH.MAX_TEXTURE_SIZE);eT.params.maxTextureSize=T;if(T<4096){i._supportWebGL=false}var oI=oH.getParameter(oH.MAX_TEXTURE_IMAGE_UNITS);if(oI<8){i._supportWebGL=false}if(oH.getShaderPrecisionFormat&&!oH.getShaderPrecisionFormat(oH.FRAGMENT_SHADER,oH.HIGH_FLOAT)){kS.sendMessage("Monitor","ShaderPrecision","sys_"+oK);return i._supportWebGL}if(!oH.getShaderPrecisionFormat||!oH.getShaderPrecisionFormat(oH.FRAGMENT_SHADER,oH.HIGH_FLOAT)){kS.sendMessage("Monitor","ShaderPrecision","sys_"+oK);return i._supportWebGL}if(!oH.getShaderPrecisionFormat||oH.getShaderPrecisionFormat(oH.FRAGMENT_SHADER,oH.HIGH_FLOAT).precision<23){i._supportWebGL=false}}return i._supportWebGL};eT.ifSupportCanvas2d=function(){var oH=eT.ifSupportCanvas2d;if(typeof oH.supportCanvas2d==="boolean"){return oH.supportCanvas2d}var C=document.createElement("canvas");var i=null;try{i=C.getContext("2d")}catch(T){oH.supportCanvas2d=false}if(i===null){oH.supportCanvas2d=false}else{oH.supportCanvas2d=true}return oH.supportCanvas2d};eT.ifCanvas2dInBlackList=function(){return true};eT.ifEnableCanvas2dMap=function(){return false;var i=navigator.userAgent;var e=0;var T=0;var oH=0;if(/macintosh/ig.test(i)){var C=0;if(/(\d+\.\d)?(?:\.\d)?\s+safari\/?(\d+\.\d+)?/i.test(i)&&!/chrome/i.test(i)){C=parseInt((RegExp["\x241"]||RegExp["\x242"]),10)}if(C>0){return false}return true}if(/windows nt (\d+\.\d)/ig.test(i)){T=parseFloat(RegExp.$1);if(T>=6.1){if(/chrome\/(\d+\.\d)/i.test(i)){e=parseFloat(RegExp.$1);if(e>=31){return true}}if(/MSIE (\d+(\.\d+)?)/.test(i)){oH=parseFloat(RegExp.$1);if(oH>=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};eT.ifSupportCSS3=function(oK,i){var oJ=document.createElement("div");var oI="Webkit Moz O ms".split(" ");var e=oI.length;var C="";var T=oJ.style;if(oK in T){C=oK}oK=oK.replace(/^[a-z]/,function(oL){return oL.toUpperCase()});while(e--){var oH=oI[e]+oK;if(oH in T){C=oH;break}}if(i){return C}else{return C.length>0?true:false}};eT.isModernBrowser=eT.ifSupportCanvas2d()&&eT.ifSupportCSS3("transform");function a0(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 C in e){this._options[C]=e[C]}this._getDataTimes=0;this._hitTimes=0}a0.prototype.setData=function(T,oI){var i=this._cache;var C=this._size;if(C===0){return}var e=this._curSize;if(e===C){this._removeOld()}var oH;if(!i[T]){oH={key:T,data:oI,older:null,newwer:null};i[T]=oH;if(this._least===null){this._least=oH}if(this._most===null){this._most=oH}this._curSize++}else{oH=i[T];oH.data=oI;if(this._most===oH){return}oH.older&&(oH.older.newer=oH.newer);oH.newer&&(oH.newer.older=oH.older);if(this._least===oH){this._least=oH.newer}}if(this._most&&this._most!==oH){this._most.newer=oH;oH.older=this._most;this._most=oH;oH.newer=null}};a0.prototype.getData=function(e){var i=this._cache[e];this._getDataTimes++;if(i){this._hitTimes++;var C=i.data;if(this._most===i){return C}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 C}return null};a0.prototype.getAllData=function(){return this._cache};a0.prototype.getHitRate=function(){return this._hitTimes/this._getDataTimes};a0.prototype.removeData=function(i){var e=this._cache;var C=e[i];if(!C){return}if(this._options.clearCallback){this._options.clearCallback(C.data,C.key)}C.older&&(C.older.newer=C.newer);C.newer&&(C.newer.older=C.older);if(this._least===C){this._least=C.newer}if(this._most===C){this._most=C.older}delete e[i];this._curSize--};a0.prototype._removeOld=function(){var e=this._cache;var T=Math.round(this._size*0.6);var C=0;while(this._least&&C=72.004&&C<=137.8347&&i>=0.8293&&i<=55.8271}function pt(px,pw){var pA,i,pC,C=(pC=300+(pA=px-105)+2*(i=pw-35)+0.1*pA*pA+0.1*pA*i+0.1*pi(ph(pA)),pC+=2*(20*pc(6*pA*pv)+20*pc(2*pA*pv))/3,(pC+=2*(20*pc(pA*pv)+40*pc(pA/3*pv))/3)+2*(150*pc(pA/12*pv)+300*pc(pA/30*pv))/3),T=function(pF,pE){var pD=2*pF-100+3*pE+0.2*pE*pE+0.1*pF*pE+0.2*pi(ph(pF));return pD+=2*(20*pc(6*pF*pv)+20*pc(2*pF*pv))/3,pD+=2*(20*pc(pE*pv)+40*pc(pE/3*pv))/3,pD+2*(160*pc(pE/12*pv)+320*pc(pE*pv/30))/3}(px-105,pw-35),pz=pw/180*pv,py=pc(pz),pB=pi(py=1-pb*py*py);return[C=180*C/(pn/pB*pe(pz)*pv),T=180*T/(pn*(1-pb)/(py*pB)*pv)]}function pk(T){var i=T[0],C=T[1];if(!pq(i,C)){return[i,C]}var pw=pt(i,C);return[i+pw[0],C+pw[1]]}function pd(px){var pB=px[0],C=px[1];if(!pq(pB,C)){return[pB,C]}for(var T=[pB,C],pz=T[0],pw=T[1],pA=pk([pz,pw]),py=pA[0]-pB,pC=pA[1]-C;ph(py)>0.000001||ph(pC)>0.000001;){py=(pA=pk([pz-=py,pw-=pC]))[0]-pB,pC=pA[1]-C}return[pz,pw]}var po=Math.sin,pp=Math.cos,oQ=Math.atan2,ps=Math.sqrt,pa=3000*Math.PI/180;function pg(T){var i=T[0]-0.0065,C=T[1]-0.006,px=ps(i*i+C*C)-0.00002*po(C*pa),pw=oQ(C,i)-0.000003*pp(i*pa);return[px*pp(pw),px*po(pw)]}function oU(T){var i=T[0],C=T[1],px=ps(i*i+C*C)+0.00002*po(C*pa),pw=oQ(C,i)+0.000003*pp(i*pa);return[px*pp(pw)+0.0065,px*po(pw)+0.006]}var o7=180/Math.PI,oL=Math.PI/180,oN=6378137,pu=20037508.342789244;function oZ(i){return[i[0]*o7/oN,(0.5*Math.PI-2*Math.atan(Math.exp(-i[1]/oN)))*o7]}function pj(T){var i=Math.abs(T[0])<=180?T[0]:T[0]-360*(T[0]<0?-1:1),C=[oN*i*oL,oN*Math.log(Math.tan(0.25*Math.PI+0.5*T[1]*oL))];return C[0]>pu&&(C[0]=pu),C[0]<-pu&&(C[0]=-pu),C[1]>pu&&(C[1]=pu),C[1]<-pu&&(C[1]=-pu),C}var oY,oX,oW,o9,oT,oI,o6,o3,o2,o4,oH,o1,o8=Math.abs,pl=[12890594.86,8362377.87,5591021,3481989.83,1678043.12,0],oS=[75,60,45,30,15,0],oK=[[1.410526172116255e-8,0.00000898305509648872,-1.9939833816331,200.9824383106796,-187.2403703815547,91.6087516669843,-23.38765649603339,2.57121317296198,-0.03801003308653,17337981.2],[-7.435856389565537e-9,0.000008983055097726239,-0.78625201886289,96.32687599759846,-1.85204757529826,-59.36935905485877,47.40033549296737,-16.50741931063887,2.28786674699375,10260144.86],[-3.030883460898826e-8,0.00000898305509983578,0.30071316287616,59.74293618442277,7.357984074871,-25.38371002664745,13.45380521110908,-3.29883767235584,0.32710905363475,6856817.37],[-1.981981304930552e-8,0.000008983055099779535,0.03278182852591,40.31678527705744,0.65659298677277,-4.44255534477492,0.85341911805263,0.12923347998204,-0.04625736007561,4482777.06],[3.09191371068437e-9,0.000008983055096812155,0.00006995724062,23.10934304144901,-0.00023663490511,-0.6321817810242,-0.00663494467273,0.03430082397953,-0.00466043876332,2555164.4],[2.890871144776878e-9,0.000008983055095805407,-3.068298e-8,7.47137025468032,-0.00000353937994,-0.02145144861037,-0.00001234426596,0.00010322952773,-0.00000323890364,826088.5]],pm=[[-0.0015702102444,111320.7020616939,1704480524535203,-10338987376042340,26112667856603880,-35149669176653700,26595700718403920,-10725012454188240,1800819912950474,82.5],[0.0008277824516172526,111320.7020463578,647795574.6671607,-4082003173.641316,10774905663.51142,-15171875531.51559,12053065338.62167,-5124939663.577472,913311935.9512032,67.5],[0.00337398766765,111320.7020202162,4481351.045890365,-23393751.19931662,79682215.47186455,-115964993.2797253,97236711.15602145,-43661946.33752821,8477230.501135234,52.5],[0.00220636496208,111320.7020209128,51751.86112841131,3796837.749470245,992013.7397791013,-1221952.21711287,1340652.697009075,-620943.6990984312,144416.9293806241,37.5],[-0.0003441963504368392,111320.7020576856,278.2353980772752,2485758.690035394,6070.750963243378,54821.18345352118,9540.606633304236,-2710.55326746645,1405.483844121726,22.5],[-0.0003218135878613132,111320.7020701615,0.00369383431289,823725.6402795718,0.46104986909093,2351.343141331292,1.58060784298199,8.77738589078284,0.37238884252424,7.45]];function oR(pw,C,T){var py=o8(C)/T[9],px=T[0]+T[1]*o8(pw),i=T[2]+T[3]*py+T[4]*Math.pow(py,2)+T[5]*Math.pow(py,3)+T[6]*Math.pow(py,4)+T[7]*Math.pow(py,5)+T[8]*Math.pow(py,6);return[px*=pw<0?-1:1,i*=C<0?-1:1]}function pf(T){for(var i=T[0],C=T[1],px=[],pw=0;pwoS[pw]){px=pm[pw];break}}return oR(i,C,px)}function oP(T){for(var i=T[0],C=T[1],px=[],pw=0;pw=pl[pw]){px=oK[pw];break}}return oR(i,C,px)}function oO(C,i){if(!C){throw new Error(i)}}function o0(i){return !!i&&"[object Array]"===Object.prototype.toString.call(i)}function oV(i){return !isNaN(Number(i))&&null!==i&&!o0(i)}function oM(){for(var T=[],i=0;i=2,"Invalid input coordinate: "+pz),oO(oV(pz[0])&&oV(pz[1]),"Invalid input coordinate: "+pz),pz=pz.map(Number),pw=!0);var T=pA;return pw?T(pz):(oJ(pz,(function(pC){var i;i=T(pC),pC[0]=i[0],pC[1]=i[1]})),pz)}})})();var kY={ColorRefTable:{aliceblue:["#f0f8ff","rgb(240,248,255)"],antiquewhite:["#faebd7","rgb(250,235,215)"],aqua:["#00ffff","rgb(0,255,255)"],aquamarine:["#7fffd4","rgb(127,255,212)"],azure:["#f0ffff","rgb(240,255,255)"],beige:["#f5f5dc","rgb(245,245,220)"],bisque:["#ffe4c4","rgb(255,228,196)"],black:["#000000","rgb(0,0,0)"],blanchedalmond:["#ffebcd","rgb(255,235,205)"],blue:["#0000ff","rgb(0,0,255)"],blueviolet:["#8a2be2","rgb(138,43,226)"],brown:["#a52a2a","rgb(165,42,42)"],burlywood:["#deb887","rgb(222,184,135)"],cadetblue:["#5f9ea0","rgb(95,158,160)"],chartreuse:["#7fff00","rgb(127,255,0)"],chocolate:["#d2691e","rgb(210,105,30)"],coral:["#ff7f50","rgb(255,127,80)"],cornflowerblue:["#6495ed","rgb(100,149,237)"],cornsilk:["#fff8dc","rgb(255,248,220)"],crimson:["#dc143c","rgb(220,20,60)"],cyan:["#00ffff","rgb(0,255,255)"],darkblue:["#00008b","rgb(0,0,139)"],darkcyan:["#008b8b","rgb(0,139,139)"],darkgoldenrod:["#b8860b","rgb(184,134,11)"],darkgray:["#a9a9a9","rgb(169,169,169)"],darkgreen:["#006400","rgb(0,100,0)"],darkgrey:["#a9a9a9","rgb(169,169,169)"],darkkhaki:["#bdb76b","rgb(189,183,107)"],darkmagenta:["#8b008b","rgb(139,0,139)"],darkolivegreen:["#556b2f","rgb(85,107,47)"],darkorange:["#ff8c00","rgb(255,140,0)"],darkorchid:["#9932cc","rgb(153,50,204)"],darkred:["#8b0000","rgb(139,0,0)"],darksalmon:["#e9967a","rgb(233,150,122)"],darkseagreen:["#8fbc8f","rgb(143,188,143)"],darkslateblue:["#483d8b","rgb(72,61,139)"],darkslategray:["#2f4f4f","rgb(47,79,79)"],darkslategrey:["#2f4f4f","rgb(47,79,79)"],darkturquoise:["#00ced1","rgb(0,206,209)"],darkviolet:["#9400d3","rgb(148,0,211)"],deeppink:["#ff1493","rgb(255,20,147)"],deepskyblue:["#00bfff","rgb(0,191,255)"],dimgray:["#696969","rgb(105,105,105)"],dimgrey:["#696969","rgb(105,105,105)"],dodgerblue:["#1e90ff","rgb(30,144,255)"],firebrick:["#b22222","rgb(178,34,34)"],floralwhite:["#fffaf0","rgb(255,250,240)"],forestgreen:["#228b22","rgb(34,139,34)"],fuchsia:["#ff00ff","rgb(255,0,255)"],gainsboro:["#dcdcdc","rgb(220,220,220)"],ghostwhite:["#f8f8ff","rgb(248,248,255)"],gold:["#ffd700","rgb(255,215,0)"],goldenrod:["#daa520","rgb(218,165,32)"],gray:["#808080","rgb(128,128,128)"],green:["#008000","rgb(0,128,0)"],greenyellow:["#adff2f","rgb(173,255,47)"],grey:["#808080","rgb(128,128,128)"],honeydew:["#f0fff0","rgb(240,255,240)"],hotpink:["#ff69b4","rgb(255,105,180)"],indianred:["#cd5c5c","rgb(205,92,92)"],indigo:["#4b0082","rgb(75,0,130)"],ivory:["#fffff0","rgb(255,255,240)"],khaki:["#f0e68c","rgb(240,230,140)"],lavender:["#e6e6fa","rgb(230,230,250)"],lavenderblush:["#fff0f5","rgb(255,240,245)"],lawngreen:["#7cfc00","rgb(124,252,0)"],lemonchiffon:["#fffacd","rgb(255,250,205)"],lightblue:["#add8e6","rgb(173,216,230)"],lightcoral:["#f08080","rgb(240,128,128)"],lightcyan:["#e0ffff","rgb(224,255,255)"],lightgoldenrodyellow:["#fafad2","rgb(250,250,210)"],lightgray:["#d3d3d3","rgb(211,211,211)"],lightgreen:["#90ee90","rgb(144,238,144)"],lightgrey:["#d3d3d3","rgb(211,211,211)"],lightpink:["#ffb6c1","rgb(255,182,193)"],lightsalmon:["#ffa07a","rgb(255,160,122)"],lightseagreen:["#20b2aa","rgb(32,178,170)"],lightskyblue:["#87cefa","rgb(135,206,250)"],lightslategray:["#778899","rgb(119,136,153)"],lightslategrey:["#778899","rgb(119,136,153)"],lightsteelblue:["#b0c4de","rgb(176,196,222)"],lightyellow:["#ffffe0","rgb(255,255,224)"],lime:["#00ff00","rgb(0,255,0)"],limegreen:["#32cd32","rgb(50,205,50)"],linen:["#faf0e6","rgb(250,240,230)"],magenta:["#ff00ff","rgb(255,0,255)"],maroon:["#800000","rgb(128,0,0)"],mediumaquamarine:["#66cdaa","rgb(102,205,170)"],mediumblue:["#0000cd","rgb(0,0,205)"],mediumorchid:["#ba55d3","rgb(186,85,211)"],mediumpurple:["#9370db","rgb(147,112,219)"],mediumseagreen:["#3cb371","rgb(60,179,113)"],mediumslateblue:["#7b68ee","rgb(123,104,238)"],mediumspringgreen:["#00fa9a","rgb(0,250,154)"],mediumturquoise:["#48d1cc","rgb(72,209,204)"],mediumvioletred:["#c71585","rgb(199,21,133)"],midnightblue:["#191970","rgb(25,25,112)"],mintcream:["#f5fffa","rgb(245,255,250)"],mistyrose:["#ffe4e1","rgb(255,228,225)"],moccasin:["#ffe4b5","rgb(255,228,181)"],navajowhite:["#ffdead","rgb(255,222,173)"],navy:["#000080","rgb(0,0,128)"],oldlace:["#fdf5e6","rgb(253,245,230)"],olive:["#808000","rgb(128,128,0)"],olivedrab:["#6b8e23","rgb(107,142,35)"],orange:["#ffa500","rgb(255,165,0)"],orangered:["#ff4500","rgb(255,69,0)"],orchid:["#da70d6","rgb(218,112,214)"],palegoldenrod:["#eee8aa","rgb(238,232,170)"],palegreen:["#98fb98","rgb(152,251,152)"],paleturquoise:["#afeeee","rgb(175,238,238)"],palevioletred:["#db7093","rgb(219,112,147)"],papayawhip:["#ffefd5","rgb(255,239,213)"],peachpuff:["#ffdab9","rgb(255,218,185)"],peru:["#cd853f","rgb(205,133,63)"],pink:["#ffc0cb","rgb(255,192,203)"],plum:["#dda0dd","rgb(221,160,221)"],powderblue:["#b0e0e6","rgb(176,224,230)"],purple:["#800080","rgb(128,0,128)"],red:["#ff0000","rgb(255,0,0)"],rosybrown:["#bc8f8f","rgb(188,143,143)"],royalblue:["#4169e1","rgb(65,105,225)"],saddlebrown:["#8b4513","rgb(139,69,19)"],salmon:["#fa8072","rgb(250,128,114)"],sandybrown:["#f4a460","rgb(244,164,96)"],seagreen:["#2e8b57","rgb(46,139,87)"],seashell:["#fff5ee","rgb(255,245,238)"],sienna:["#a0522d","rgb(160,82,45)"],silver:["#c0c0c0","rgb(192,192,192)"],skyblue:["#87ceeb","rgb(135,206,235)"],slateblue:["#6a5acd","rgb(106,90,205)"],slategray:["#708090","rgb(112,128,144)"],slategrey:["#708090","rgb(112,128,144)"],snow:["#fffafa","rgb(255,250,250)"],springgreen:["#00ff7f","rgb(0,255,127)"],steelblue:["#4682b4","rgb(70,130,180)"],tan:["#d2b48c","rgb(210,180,140)"],teal:["#008080","rgb(0,128,128)"],thistle:["#d8bfd8","rgb(216,191,216)"],tomato:["#ff6347","rgb(255,99,71)"],turquoise:["#40e0d0","rgb(64,224,208)"],violet:["#ee82ee","rgb(238,130,238)"],wheat:["#f5deb3","rgb(245,222,179)"],white:["#ffffff","rgb(255,255,255)"],whitesmoke:["#f5f5f5","rgb(245,245,245)"],yellow:["#ffff00","rgb(255,255,0)"],yellowgreen:["#9acd32","rgb(154,205,50)"]},regGroup:{hex:/^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$/,rgb:/rgb\(\s*(\d|\d\d|1\d\d|2[0-4]\d|25[0-5])\s*,\s*(\d|\d\d|1\d\d|2[0-4]\d|25[0-5])\s*,\s*(\d|\d\d|1\d\d|2[0-4]\d|25[0-5])\s*\)/,rgba:/rgba\(\s*(\d|\d\d|1\d\d|2[0-4]\d|25[0-5])\s*,\s*(\d|\d\d|1\d\d|2[0-4]\d|25[0-5])\s*,\s*(\d|\d\d|1\d\d|2[0-4]\d|25[0-5])\s*,\s*(0|1|0\.[1-9])\s*\)/},parseHexToRgbaArray:function(oI){var oJ=oI.replace("#","");if(oJ.length===3){oJ+="f"}else{if(oJ.length===6){oJ+="ff"}}var e=[];var oH=oJ.length;var T=oH===8?2:1;for(var C=0;C=0&&oH<60){oJ=oK;oI=C;e=0}else{if(oH>=60&&oH<120){oJ=C;oI=oK;e=0}else{if(oH>=120&&oH<180){oJ=0;oI=oK;e=C}else{if(oH>=180&&oH<240){oJ=0;oI=C;e=oK}else{if(oH>=240&&oH<300){oJ=C;oI=0;e=oK}else{if(oH>=300&&oH<360){oJ=oK;oI=0;e=C}}}}}}oJ=(oJ+i)*255>255?255:(oJ+i)*255;oI=(oI+i)*255>255?255:(oI+i)*255;e=(e+i)*255>255?255:(e+i)*255;return[Math.round(oJ),Math.round(oI),Math.round(e)]},formatColorCssToRgbaArray:function(oI,C,T){T=(typeof T!=="boolean")?true:T;if(typeof oI!=="string"){return T?[0,0,0,1]:[0,0,0,255]}var i=(oI||"Black").trim().toLowerCase();var e=[];var oH=kY.ColorRefTable[i];if(oH!==undefined){i=oH[0]}e=kY.parseCSSColor(i);if(C!==undefined&&!isNaN(Number(C))){C=Number(C);e[3]=kY.fitTo(C,0,1)}else{e[3]=Number((e[3]/255).toFixed(2))}if(!T){e[3]=Math.floor(e[3]*255)}return e},fitTo:function(C,i,e){if(Ce){C=e}}return C},generateColorRamp:function(e,oM,oN,T,oS){oN=oN||[];T=T||"#ccc";oS=oS||1;const C=document.createElement("canvas");const oT=C.getContext("2d");C.width=256;C.height=oS;const oI=oM[0];const oP=oM[oM.length-1];if(e.length===oM.length){const oQ=oT.createLinearGradient(0,0,256,1);for(var oL=0;oL>16)+(o0>>16)+(oZ>>16);return(oY<<16)|(oZ&65535)}function oR(oX,oY){return(oX<>>(32-oY))}function oM(o2,oZ,oY,oX,o1,o0){return oS(oR(oS(oS(oZ,o2),oS(oX,o0)),o1),oY)}function e(oZ,oY,o3,o2,oX,o1,o0){return oM((oY&o3)|(~oY&o2),oZ,oY,oX,o1,o0)}function oJ(oZ,oY,o3,o2,oX,o1,o0){return oM((oY&o2)|(o3&~o2),oZ,oY,oX,o1,o0)}function oP(oZ,oY,o3,o2,oX,o1,o0){return oM(oY^o3^o2,oZ,oY,oX,o1,o0)}function oV(oZ,oY,o3,o2,oX,o1,o0){return oM(o3^(oY|~o2),oZ,oY,oX,o1,o0)}function C(o7,o2){o7[o2>>5]|=128<<(o2%32);o7[((o2+64)>>>9<<4)+14]=o2;var oZ;var o1;var o0;var oY;var oX;var o6=1732584193;var o5=-271733879;var o4=-1732584194;var o3=271733878;for(oZ=0;oZ>5]>>>(oZ%32))&255)}return oX}function oL(oY){var o0;var oX=[];oX[(oY.length>>2)-1]=undefined;for(o0=0;o0>5]|=(oY.charCodeAt(o0/8)&255)<<(o0%32)}return oX}function oK(oX){return oQ(C(oL(oX),oX.length*8))}function oW(oZ,o2){var oY;var o1=oL(oZ);var oX=[];var o0=[];var o3;oX[15]=o0[15]=undefined;if(o1.length>16){o1=C(o1,oZ.length*8)}for(oY=0;oY<16;oY+=1){oX[oY]=o1[oY]^909522486;o0[oY]=o1[oY]^1549556828}o3=C(oX.concat(oL(o2)),512+o2.length*8);return oQ(C(o0.concat(o3),512+128))}function oU(o0){var oZ="0123456789abcdef";var oY="";var oX;var o1;for(o1=0;o1>>4)&15)+oZ.charAt(oX&15)}return oY}function oN(oX){return unescape(encodeURIComponent(oX))}function T(oX){return oK(oN(oX))}function oO(oX){return oU(T(oX))}function i(oX,oY){return oW(oN(oX),oN(oY))}function oT(oX,oY){return oU(i(oX,oY))}function oH(oY,oZ,oX){if(!oZ){if(!oX){return oO(oY)}return T(oY)}if(!oX){return oT(oZ,oY)}return i(oZ,oY)}oI.md5=oH})(this);cu._rd=cu._rd||{};var e5={request:function(T,e){var oH=(Math.random()*100000).toFixed(0);if(e){cu._rd["_cbk"+oH]=function(oI){e&&e(oI);delete cu._rd["_cbk"+oH]};T+="&callback=BMapGL._rd._cbk"+oH}function C(oJ){var oI;var oK=new RegExp("(^| )"+oJ+"=([^;]*)(;|$)");if(oI=document.cookie.match(oK)){return unescape(oI[2])}else{return -1}}if(T.indexOf("v=")===-1){T+="&v="+en()}T=e5.getSeckeyAndSign(T);var i=c8("script",{src:T,type:"text/javascript",charset:"utf-8"});if(i.addEventListener){i.addEventListener("load",function(oJ){var oI=oJ.target;oI.parentNode.removeChild(oI)},false);i.addEventListener("error",function(oI){e&&e([,,,,,])},false)}else{if(i.attachEvent){i.attachEvent("onreadystatechange",function(oJ){var oI=window.event.srcElement;if(oI&&(oI.readyState=="loaded"||oI.readyState=="complete")){oI.parentNode.removeChild(oI)}})}}document.getElementsByTagName("head")[0].appendChild(i);i=null},getSeckeyAndSign:function(oI){var C=decodeURIComponent(oI);var oH=new Date().getTime();var i=window.___abvk?window.___abvk:e5.getSeckeyCidItem("SECKEY_ABVK");var oJ=e5.getSeckeyCidItem("BMAP_SECKEY");var e=encodeURIComponent(i+","+oJ);var T=i+","+oJ;oI+="&seckey="+e+"&timeStamp="+oH;C+="&seckey="+T+"&timeStamp="+oH;oI+=nm()(C);return oI},getSeckeyCidItem:function(e){if(localStorage){return localStorage.getItem(e)?localStorage.getItem(e):-1}if(sessionStorage){return sessionStorage.getItem(e)?sessionStorage.getItem(e):-1}}};var oo={request:function(oJ,oH,i,oL,T){var oI=(Math.random()*100000)["toFixed"](0);cu._rd["_cbk"+oI]=function(oM){if(oM.result&&oM.result["popup"]&&oM.result["popup"]===1&&oM.result["error_msg"]){dX(oM.result["error_msg"],{from:oH.qt});return}i=i||{};oJ&&oJ(oM,i);delete cu._rd["_cbk"+oI]};oL=oL||"";var oK;if(i&&i.useEncodeURI){oK=nh(oH,encodeURI)}else{oK=nh(oH,encodeURIComponent)}var e="";if(window._BMapSecurityConfig&&window._BMapSecurityConfig["serviceHost"]){e=window._BMapSecurityConfig["serviceHost"]+oL+"?"+oK+"&ie=utf-8&oue=1&fromproduct=jsapi"}else{var C=K.apiHost;e=C+"/"+oL+"?"+oK+"&ie=utf-8&oue=1&fromproduct=jsapi&ak="+hh}if(!T){e+="&res=api"}e+="&callback="+h4+"._rd._cbk"+oI;e5.request(e)}};var eo={levels:{INFO:"info",WARNING:"warning",ERROR:"error"},category:{JS:"js",RESOURCE:"resource",AJAX:"ajax"},config:{jsError:true,resourceError:true,ajaxError:true},hosts:"api.map.baidu.com|webmap0.bdimg.com|maponline0.bdimg.com|",ignoreUrl:"api.map.baidu.com/images/blank.gif",sender:true,collections:[],sendError:function(){},init:function(i,e,C){this.hosts+=i?i:"";aO&&aO(this.config,e);this.sender=true;if(C){this.sender=false}this.hosts=this.urlScope(this.hosts);this.sendError=this.notifyError();var T=typeof window!=="undefined"?window:typeof global!=="undefined"?global:typeof self!=="undefined"?self:{};this.config.jsError&&this.handleJavaScriptError(T);this.config.resourceError&&this.handleResourceError(T);this.config.ajaxError&&this.handleAjaxError(T)},handleJavaScriptError:function(C){var e=this;var i=C.onerror;C.onerror=function(oK,oJ,T,oI,oH){if(e.isFetch(e.category.JS)&&e.hostExit(oJ)){if(oH&&oH.stack){e.sendError({title:oK,msg:oH.stack,category:e.category.JS,level:e.levels.ERROR})}else{if(typeof oK==="string"){e.sendError({title:oK,msg:JSON.stringify({resourceUrl:oJ,rowNum:T,colNum:oI}),category:"js",level:e.levels.ERROR})}}}if(i&&c0(i)){i&&i.apply(C,arguments)}}},handleResourceError:function(i){var e=this;i.addEventListener("error",function(oI){if(oI){var oJ=oI.target||oI.srcElement;var oH=oJ instanceof HTMLScriptElement||oJ instanceof HTMLLinkElement||oJ instanceof HTMLImageElement;if(!oH){if(!i.onerror){var C=oI.filename||null;if(!e.isFetch(e.category.JS)||!e.hostExit(C)){return}if(oI.error&&oI.error.stack){e.sendError({title:oI.message,msg:oI.error.stack,category:e.category.JS,level:e.levels.ERROR})}else{if(typeof oI.message==="string"){e.sendError({title:oI.message,msg:JSON.stringify({resourceUrl:C,rowNum:oI.lineno,colNum:oI.cowno}),category:e.category.JS,level:e.levels.ERROR})}}}return}var T=oJ.src||oJ.href;if(e.isFetch(e.category.RESOURCE)&&e.hostExit(T)){e.sendError({title:oJ.nodeName,msg:T,category:e.category.RESOURCE,level:e.levels.ERROR})}}},true)},handleAjaxError:function(oI){var e=this;var oH=oI.location.protocol;if(oH==="file:"){return}if(!oI.XMLHttpRequest){return}var i=oI.XMLHttpRequest;var C=i.prototype.send;var T=function(oK){if(oK&&oK.currentTarget&&oK.currentTarget.status!==200){var oJ=oK.target.responseURL;if(e.isFetch(e.category.AJAX)&&e.hostExit(oJ)){e.sendError({title:oJ,msg:JSON.stringify({response:oK.target.response,responseURL:oJ,status:oK.target.status,statusText:oK.target.statusText}),category:e.category.AJAX,level:e.levels.ERROR})}}};i.prototype.send=function(){if(this["addEventListener"]){this["addEventListener"]("error",T);this["addEventListener"]("load",T);this["addEventListener"]("abort",T)}else{var oJ=this["onreadystatechange"];this["onreadystatechange"]=function(oK){if(this.readyState===4){T(oK)}oJ&&oJ.apply(this,arguments)}}return C.apply(this,arguments)}},notifyError:function(C){var i=C||1000;this._idleWorkerTicker=(function(T){return function(){T.runJob()}})(this);var e=this;return function(oH){if(oH.url){if(!e.isFetch(oH.category)){return}var T=oH.url||"";if(!e.hostExit(T)){return}delete oH.url}if(!navigator.onLine){return}e.collections.push(oH);e.checkJob(i)}},runJob:function(){if(this.collections.length===0){clearInterval(this.idleWork);this.idleWork=null;return}var oH=this.collections.slice(0,2);var C=nf(JSON.stringify({dataset:oH}));var T=new Date().getTime();if(window._BMapSecurityConfig&&window._BMapSecurityConfig["serviceHost"]){var i=K.apiIMG+"/blank.gif?product=jsapi&v="+en()+"&l="+C+"&t="+T}else{var i=K.apiIMG+"/blank.gif?product=jsapi&v="+en()+"&l="+C+"&ak="+hh+"&t="+T}if(this.sender){try{var oJ=document.createElement("div");oJ.style="width:0;height:0;visibility: hidden;opacity: 0;z-index:-999;background-image: url("+i+");";document.querySelector("BODY").appendChild(oJ);setTimeout(function(){document.querySelector("BODY").removeChild(oJ)})}catch(oI){}}this.collections.splice(0,2);if(this.collections.length===0){clearInterval(this.idleWork);this.idleWork=null}},checkJob:function(e){if(!this.idleWork&&this._idleWorkerTicker){this.idleWork=setInterval(this._idleWorkerTicker,e)}},urlScope:function(T){var C={};var oI=Object.keys(K);if(K&&oI.length>0){for(var oH in K){if(K[oH]&&(typeof K[oH]!=="function")){C[oH]=K[oH]}}}try{var oK=JSON.stringify(C);if(oK.length>2){return T+"|"+oK}else{return T}}catch(oJ){return T}},hostExit:function(i){try{if(i&&i.indexOf("//")===0){i=window.location.protocol+i}var C=new URL(i);if(!C||!C.host){return false}var oH=C.host+C.pathname;if(this.ignoreUrl.indexOf(oH)===-1&&this.hosts.indexOf(C.host)>-1){return true}return false}catch(T){return false}},isFetch:function(e){return this.config[e+"Error"]||false}};cu.fetchDebug=eo;var bd={TYPE:"TypeError",REF:"ReferenceError",SYNTAX:"SyntaxError",RANGE:"RangeError",URI:"URIError",EVAL:"EvalError",NETWORK:"NetworkError",TIMEOUT:"TimeoutError",PROMISE:"UnhandledRejection",UNKNOWN:"Unknown"};var c6={TypeError:bd.TYPE,ReferenceError:bd.REF,SyntaxError:bd.SYNTAX,RangeError:bd.RANGE,URIError:bd.URI,EvalError:bd.EVAL};var hd=8*1024;var ia=new RegExp(["bot","spider","crawler","crawl","slurp","scraper","fetcher","indexer","yisou","sogou","yandex","duckduck","facebookexternalhit","externalagent","semrush","ahrefs","mj12","ia_archiver","archive\\.org","perplexity","bingpreview","embedly","dataforseo","proximic","seekport","headlesschrome","phantomjs","puppeteer","playwright","lighthouse","python-requests","python-urllib","scrapy","curl/","wget","okhttp","libwww","go-http-client","java/","apache-httpclient","axios/","node-fetch","monitoring","uptime","pingdom","apachebench"].join("|"),"i");var l8={_denominatorSent:false,_denominatorAcked:false,_pendingError:null,_numeratorSent:false,_inited:false,_bot:false,_mapJsHosts:[],_mapUrlPrefixes:[],init:function(){if(this._inited){return}this._inited=true;this._bot=this._isBot();if(this._bot){return}var oK=!!(window._BMapSecurityConfig&&window._BMapSecurityConfig["serviceHost"]);var oJ=[K.staticHost,K.apiTestUrl,K.panoTilePath,K.stylePath,K.imgPath,K.apiIMG,K.mapHost];if(!oK){oJ.push(K.apiHost)}oJ.push(K.urlProtocol+"//api.map.baidu.com");if(K.tileDomain&&K.tileDomain.length){oJ=oJ.concat(K.tileDomain)}if(K.enTileDomain&&K.enTileDomain.length){oJ=oJ.concat(K.enTileDomain)}if(K.originTilePath&&K.originTilePath.length){oJ=oJ.concat(K.originTilePath)}var C=[];for(var T=0;T-1){var oK=/((?:https?:)?\/\/[^\s'"]+)/.exec(oN);if(oK&&i._isMapUrl(oK[1])){oL=true}}}if(oL){var oM=oH&&oH.stack?oH.stack:JSON.stringify({resourceUrl:oJ,rowNum:T,colNum:oI,msg:oN});i._onError(oH,oN,oM,false)}if(e&&c0(e)){e.apply(C,arguments)}};C.addEventListener("unhandledrejection",function(oI){var oL=oI.reason;var T=oL instanceof Error?(oL.stack||""):"";var oK=false;if(i._isMapStack(T)){oK=true}else{if(!T&&typeof oL==="string"){var oH=/((?:https?:)?\/\/[^\s'"]+)/.exec(oL);if(oH&&i._isMapUrl(oH[1])){oK=true}}}if(!oK){return}var oJ=oL instanceof Error?(oL.message||""):String(oL);var oM=T||oJ;i._onError(oL instanceof Error?oL:null,oJ,oM,true)});C.addEventListener("error",function(oH){if(oH instanceof window.ErrorEvent){return}var oK=oH.target||oH.srcElement;if(!oK){return}var T=oK.src||oK.href;if(i._isMapUrl(T)){var oJ="NetworkError: resource load failed";var oL=JSON.stringify({tagName:oK.tagName,url:T});var oI=new Error(oJ);oI.name="NetworkError";i._onError(oI,oJ,oL,false)}},true)},_extractHost:function(i){try{if(i&&i.indexOf("//")>-1){return i.split("//")[1].split("/")[0]}}catch(C){}return""},_isMapUrl:function(T){if(!T){return false}T=T+"";if(T.indexOf("/jsapi_monitor/")>-1){return false}var e=this._extractHost(T);if(e){for(var oH=0;oHhd){T=T.slice(0,hd)}e._sendDetail(oH,{type:"num",ak:hh,title:C,ua:(typeof navigator!=="undefined"&&navigator.userAgent)||"",msg:T})})},_sendSla:function(oH,i){if(this._bot){i&&i(null);return}if(typeof navigator!=="undefined"&&navigator.onLine===false){i&&i(null);return}var C=this._buildUrl("/jsapi_monitor/sla",oH,null);try{e5.request(C,function(e){i&&i(e&&e.status===0?e.id:null)})}catch(T){i&&i(null)}},_sendDetail:function(C,oH){if(this._bot){return}if(typeof navigator!=="undefined"&&navigator.onLine===false){return}var i=this._buildUrl("/jsapi_monitor/detail",oH,C);try{e5.request(i,function(){})}catch(T){}},_buildUrl:function(oH,T,i){var oI=nf(JSON.stringify(T));var e="from=jsapi_"+en()+"&sla="+encodeURIComponent(oI);if(i){e+="&id="+encodeURIComponent(i)}var C=(K.apiHost+"").replace(/\/+$/,"");return C+oH+"?"+e},_getCurrentScriptUrl:function(){try{var T="";if(typeof document!=="undefined"){if(document.currentScript&&document.currentScript.src){T=document.currentScript.src}else{var i=document.getElementsByTagName("script");if(i.length){T=i[i.length-1].src||""}}}return T?T.split("?")[0]:""}catch(C){return""}}};cu.slaDebug=l8;var kS={device:{PC:0,NA:1},config:{mask:["FFFFFFFF"],open:true},url:K.apiHost+"?qt=jsapi_log",counts:{},values:{},records:{},flushInterval:30*1000,sendMessage:function(i,C,e){},init:function(i,T){this.kill();var e=this;this.config.open=!!i;T=T||{};if(T.flushInterval){this.flushInterval=T.flushInterval}var C=T.timers||200;e._idleWorkerTicker=(function(oH){return function(){oH.runJob()}})(e);e._flushTicker=setInterval(function(){e._flushAll(C)},e.flushInterval);e._firstFlushTimer=setTimeout(function(){e._flushAll(C);e._firstFlushTimer=null},5*1000);if(typeof document!=="undefined"){document.addEventListener("visibilitychange",function(){if(document.visibilityState==="hidden"){e._flushAll(C)}})}this.sendMessage=function(oJ,oK,oH){if(window.navigator&&!navigator.onLine){return}oJ=oJ||"";oK=oK||"";oH=oH||"";var oI=oJ+"-"+oK+"-"+oH;if(!e.counts[oI]){e.counts[oI]=0}e.counts[oI]++;e.values[oI]=[oJ,oK,oH]}},_flushAll:function(T){var i=false;for(var e in this.counts){if(this.counts[e]>0){var C=this.counts[e]>10000?10000:this.counts[e];this.records[e]={value:this.values[e],count:C};this.counts[e]=0;i=true}}if(i){this.checkJob(T)}},runJob:function(){if(Object.keys(this.records).length===0){clearInterval(this.idleWork);this.idleWork=null;return}var oM=Object.keys(this.records);var oL=oM[0];var T=this.records[oL]||{};var oK=T.value||[];var oH=T.count||1;var i=new Date().getTime();var C="logCbk"+Math.floor(Math.random()*10000000000);if(cu){cu[C]=function(e){delete cu[C]}}if(window._BMapSecurityConfig&&window._BMapSecurityConfig["serviceHost"]){var oJ=this.url+"&bmapgl2=1&v="+en()+"&device="+(c7()?this.device.NA:this.device.PC)+"&module="+(oK[0]||"")+"&func="+(oK[1]||"")+"&subfunc="+(oK[2]||"")+"&count="+oH+"&t="+i+"&callback="+h4+"."+C}else{var oJ=this.url+"&ak="+hh+"&bmapgl2=1&v="+en()+"&device="+(c7()?this.device.NA:this.device.PC)+"&module="+(oK[0]||"")+"&func="+(oK[1]||"")+"&subfunc="+(oK[2]||"")+"&count="+oH+"&t="+i+"&callback="+h4+"."+C}oJ+=nm()(oJ);if(this.config.open){try{jU.load(oJ);delete this.records[oL]}catch(oI){}}if(Object.keys(this.records).length===0){clearInterval(this.idleWork);this.idleWork=null}},checkJob:function(e){if(!this.idleWork&&this._idleWorkerTicker){this.idleWork=setInterval(this._idleWorkerTicker,e)}},kill:function(){if(this.idleWork){clearInterval(this.idleWork);this.idleWork=null}if(this._flushTicker){clearInterval(this._flushTicker);this._flushTicker=null}if(this._firstFlushTimer){clearTimeout(this._firstFlushTimer);this._firstFlushTimer=null}this._idleWorkerTicker=null;this.counts={};this.values={};this.records={}}};kS.init(true);var d2={device:{PC:0,NA:1},config:{open:true},url:K.apiHost+"?qt=jsapi_log",sent:{},records:{},sendMessage:function(C,T,e){if(window.navigator&&!navigator.onLine){return}C=C||"";T=T||"";e=e||"";var i=C+"-"+T+"-"+e;if(this.sent[i]){return}this.sent[i]=true;this.records[i]=[C,T,e];this.checkJob()},runJob:function(){if(Object.keys(this.records).length===0){clearInterval(this.idleWork);this.idleWork=null;return}var oI=Object.keys(this.records);var T=oI[0];var oJ=this.records[T]||[];var C=new Date().getTime();var oH="logCbk"+Math.floor(Math.random()*10000000000);if(cu){cu[oH]=function(e){delete cu[oH]}}if(window._BMapSecurityConfig&&window._BMapSecurityConfig["serviceHost"]){var i=this.url+"&bmapgl2=1&v="+en()+"&device="+(c7()?this.device.NA:this.device.PC)+"&module="+(oJ[0]||"")+"&func="+(oJ[1]||"")+"&subfunc="+(oJ[2]||"")+"&count=1&t="+C+"&callback="+h4+"."+oH}else{var i=this.url+"&ak="+hh+"&bmapgl2=1&v="+en()+"&device="+(c7()?this.device.NA:this.device.PC)+"&module="+(oJ[0]||"")+"&func="+(oJ[1]||"")+"&subfunc="+(oJ[2]||"")+"&count=1&t="+C+"&callback="+h4+"."+oH}i+=nm()(i);if(this.config.open){try{jU.load(i);delete this.records[T]}catch(oK){}}if(Object.keys(this.records).length===0){clearInterval(this.idleWork);this.idleWork=null}},checkJob:function(){if(!this.idleWork){var e=this;this.idleWork=setInterval(function(){e.runJob()},200)}},kill:function(){if(this.idleWork){clearInterval(this.idleWork);this.idleWork=null}this.sent={};this.records={}}};var nQ={LOCATION:'',PLUS:'',MINUS:'',ARROW_TOP_LEFT:'',ARROW_TOP_RIGHT:'',ARROW_BOTTOM_LEFT:'',ARROW_BOTTOM_RIGHT:'',TRAFFIC_LIGHT:'',SUBWAY:'',BUS:'',TRAIN:'',AIRPLANE:'',SEARCH:'',ROAD:'',CHEVRON_DOWN:'',MARKER_PIN:'',FLAG:'',CAR:'',TAXI:'',WALK:'',BIKE:'',SCOOTER:'',TRUCK:'',CLOSE:'',LAYERS:'',ROUTE:''};function eA(C,i,oH,e){var T=i?C.replace(/currentColor/g,i):C;T=T.replace(/]*>/i,function(oI){return oI.replace(/\s(?:width|height)\s*=\s*("[^"]*"|'[^']*')/gi,"").replace(/^>>2]>>>(24-(oU%4)*8))&255;oT[(C+oU)>>>2]|=oR<<(24-((C+oU)%4)*8)}}else{for(var oU=0;oU>>2]=oS[oU>>>2]}}this.sigBytes+=oV;return this},clamp:function(){var oR=this.words;var C=this.sigBytes;oR[C>>>2]&=4294967295<<(32-(C%4)*8);oR.length=oI.ceil(C/4)},clone:function(){var C=oN.clone.call(this);C.words=this.words.slice(0);return C},random:function(oV){var oU=[];var oS=(function(oY){var oY=oY;var oX=987654321;var oW=4294967295;return function(){oX=(36969*(oX&65535)+(oX>>16))&oW;oY=(18000*(oY&65535)+(oY>>16))&oW;var oZ=((oX<<16)+oY)&oW;oZ/=4294967296;oZ+=0.5;return oZ*(oI.random()>0.5?1:-1)}});for(var oR=0,C;oR>>2]>>>(24-(C%4)*8))&255;oT.push((oV>>>4).toString(16));oT.push((oV&15).toString(16))}return oT.join("")},parse:function(oS){var C=oS.length;var oT=[];for(var oR=0;oR>>3]|=parseInt(oS.substr(oR,2),16)<<(24-(oR%8)*4)}return new oP.init(oT,C/2)}};var oH=oQ.Latin1={stringify:function(oT){var oU=oT.words;var oS=oT.sigBytes;var C=[];for(var oR=0;oR>>2]>>>(24-(oR%4)*8))&255;C.push(String.fromCharCode(oV))}return C.join("")},parse:function(oS){var C=oS.length;var oT=[];for(var oR=0;oR>>2]|=(oS.charCodeAt(oR)&255)<<(24-(oR%4)*8)}return new oP.init(oT,C)}};var T=oQ.Utf8={stringify:function(C){try{return decodeURIComponent(escape(oH.stringify(C)))}catch(oR){throw new Error("Malformed UTF-8 data")}},parse:function(C){return oH.parse(unescape(encodeURIComponent(C)))}};var oL=i.BufferedBlockAlgorithm=oN.extend({reset:function(){this._data=new oP.init();this._nDataBytes=0},_append:function(C){if(typeof C=="string"){C=T.parse(C)}this._data.concat(C);this._nDataBytes+=C.sigBytes},_process:function(oZ){var oT=this._data;var o0=oT.words;var C=oT.sigBytes;var oW=this.blockSize;var oY=oW*4;var oX=C/oY;if(oZ){oX=oI.ceil(oX)}else{oX=oI.max((oX|0)-this._minBufferSize,0)}var oV=oX*oW;var oU=oI.min(oV*4,C);if(oV){for(var oS=0;oS>>7))^((oN<<14)|(oN>>>18))^(oN>>>3);var oT=C[oX-2];var o6=((oT<<15)|(oT>>>17))^((oT<<13)|(oT>>>19))^(oT>>>10);C[oX]=o7+C[oX-7]+o6+C[oX-16]}var oU=(o1&o0)^(~o1&oZ);var oM=(o5&o4)^(o5&o3)^(o4&o3);var oW=((o5<<30)|(o5>>>2))^((o5<<19)|(o5>>>13))^((o5<<10)|(o5>>>22));var oV=((o1<<26)|(o1>>>6))^((o1<<21)|(o1>>>11))^((o1<<7)|(o1>>>25));var oR=oY+oV+oU+oK[oX]+C[oX];var oQ=oW+oM;oY=oZ;oZ=o0;o0=o1;o1=(o2+oR)|0;o2=o3;o3=o4;o4=o5;o5=(oR+oQ)|0}oS[0]=(oS[0]+o5)|0;oS[1]=(oS[1]+o4)|0;oS[2]=(oS[2]+o3)|0;oS[3]=(oS[3]+o2)|0;oS[4]=(oS[4]+o1)|0;oS[5]=(oS[5]+o0)|0;oS[6]=(oS[6]+oZ)|0;oS[7]=(oS[7]+oY)|0},_doFinalize:function(){var oO=this._data;var oP=oO.words;var oM=this._nDataBytes*8;var oN=oO.sigBytes*8;oP[oN>>>5]|=128<<(24-oN%32);oP[(((oN+64)>>>9)<<4)+14]=i.floor(oM/4294967296);oP[(((oN+64)>>>9)<<4)+15]=oM;oO.sigBytes=oP.length*4;this._process();return this._hash},clone:function(){var oM=T.clone.call(this);oM._hash=this._hash.clone();return oM}});nV.SHA256=T._createHelper(oH);nV.HmacSHA256=T._createHmacHelper(oH)}(Math));dk.SHA256=nV.SHA256;dk.HmacSHA256=nV.HmacSHA256;var cy=(function(){try{return typeof BigInt!=="undefined"&&typeof BigInt("1")!=="undefined"}catch(i){return false}})();function bX(oI,oJ){var oH=dk.SHA256(dk.enc.Utf8.parse(oI));var T=oH.toString(dk.enc.Hex);var e=[];for(var C=0;CoH){if(oK&C){i=(i*oI)%T}oK>>=C;if(oK>oH){oI=(oI*oI)%T}}return i}catch(oJ){throw new Error("BigInt operation failed")}}function bs(e){if(typeof e==="string"){if(e.indexOf("0x")===0||e.indexOf("0X")===0){e=e.substring(2)}this.value=this.hexToArray(e)}else{if(typeof e==="number"){this.value=this.numToArray(e)}else{if(e instanceof Array){this.value=e.slice()}else{this.value=[0]}}}this.normalize()}bs.prototype.hexToArray=function(T){var e=[];for(var C=T.length-2;C>=0;C-=2){e.push(parseInt(T.substr(C,2),16))}if(T.length%2===1){e.push(parseInt(T.charAt(0),16))}return e};bs.prototype.numToArray=function(i){if(i===0){return[0]}var e=[];while(i>0){e.push(i&255);i=Math.floor(i/256)}return e};bs.prototype.normalize=function(){while(this.value.length>1&&this.value[this.value.length-1]===0){this.value.pop()}};bs.prototype.isZero=function(){return this.value.length===1&&this.value[0]===0};bs.prototype.compare=function(e){if(this.value.length!==e.value.length){return this.value.length-e.value.length}for(var C=this.value.length-1;C>=0;C--){if(this.value[C]!==e.value[C]){return this.value[C]-e.value[C]}}return 0};bs.prototype.add=function(T){var C=[];var oL=0;var oI=Math.max(this.value.length,T.value.length);for(var oJ=0;oJ0){C.push(oL)}return new bs(C)};bs.prototype.subtract=function(T){var C=[];var oK=0;var oI=Math.max(this.value.length,T.value.length);for(var oJ=0;oJ=0){var e=new bs(T.value);while(true){var i=new bs(e.value);i.value.unshift(0);if(i.compare(C)>0){break}e=i}C=C.subtract(e)}return C};function ee(oI,oK,oH){oI=oI.mod(oH);var e=new bs(1);while(!oK.isZero()){if(oK.value[0]&1){e=e.multiply(oI).mod(oH)}var oJ=0;for(var T=oK.value.length-1;T>=0;T--){var C=oK.value[T]|(oJ<<8);oK.value[T]=C>>1;oJ=C&1}oK.normalize();if(!oK.isZero()){oI=oI.multiply(oI).mod(oH)}}return e}function k8(i){var e=i.toLowerCase().replace(/^0x/,"");if(!/^[0-9a-f]+$/.test(e)){throw new Error("invalid hex")}return new bs(e)}function hp(T,C,i,oI){if(!T||!C||!i||!oI){if(oI){oI(false)}return}if(cy){try{mo(T,C,i,oI)}catch(oH){bz(T,C,i,oI)}}else{bz(T,C,i,oI)}}function mo(C,i,e,T){bX(C,function(oO){try{var oH=BigInt(0);var oJ=BigInt(256);for(var oK=0;oK<8;oK++){oH=(oH*oJ+BigInt(oO[oK]))%e.n}var oL=nN(i);var oM=BigInt(0);if(oL=e.n){T(false);return}var oI=nI(oL,e.e,e.n);T(oI===oH)}catch(oN){bz(C,i,e,T)}})}function bz(C,i,e,T){bX(C,function(oO){try{var oH=new bs(0);var oJ=new bs(256);for(var oK=0;oK<8;oK++){oH=oH.multiply(oJ);var oN=new bs(oO[oK]);oH=oH.add(oN);oH=oH.mod(e.n)}var oL=k8(i);if(oL.compare(new bs(0))<0||oL.compare(e.n)>=0){T(false);return}var oI=ee(oL,e.e,e.n);T(oI.compare(oH)===0)}catch(oM){T(false)}})}var gr;if(cy){gr={n:BigInt(9173503),e:BigInt(65537)}}else{gr={n:new bs(9173503),e:new bs(65537)}}if(window.B_BUSINESS_INFO){hp(window.B_BUSINESS_INFO["sign_content"],window.B_BUSINESS_INFO["signature"],gr,function(e){if(!e){var i=cY.popup_code;d2.sendMessage("sign_check","sign_error",i)}else{if(cY.business===0&&cY.unauth===1){dX(jA,{from:"vtile"})}}})}var mJ=(function(){var oT={};var oS="HIGH";var oM="FOCUS";var C={};var T;function i(oU){var oZ=oU||[];for(var o0=0;o0')}else{var i='
    ';if(e&&e.config.autoSafeArea&&d1()){this._safeAreaContainer=cO(this._map.container,i);this._safeAreaContainer.style.position="absolute";this._safeAreaContainer.style.bottom="env(safe-area-inset-bottom)";this._container=cO(this._safeAreaContainer,i)}else{this._container=cO(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(T){if(this.anchorFixed||typeof T!=="number"||isNaN(T)||TBMAP_ANCHOR_BOTTOM_RIGHT){T=this.defaultAnchor}this._opts.offset=this._opts.offset||this.defaultOffset;var C=this._opts.anchor;this._opts.anchor=T;if(!this._container){return}var oI=this._container;var e=this._opts.offset.width;var oH=this._opts.offset.height;oI.style.left=oI.style.top=oI.style.right=oI.style.bottom="auto";switch(T){case BMAP_ANCHOR_TOP_LEFT:oI.style.top=oH+"px";oI.style.left=e+"px";break;case BMAP_ANCHOR_TOP_RIGHT:oI.style.top=oH+"px";oI.style.right=e+"px";break;case BMAP_ANCHOR_BOTTOM_LEFT:oI.style.bottom=oH+"px";oI.style.left=e+"px";break;case BMAP_ANCHOR_BOTTOM_RIGHT:oI.style.bottom=oH+"px";oI.style.right=e+"px";break;default:break}var i=["TL","TR","BL","BR"];ht.rc(this._container,"anchor"+i[C]);ht.ac(this._container,"anchor"+i[T])},getAnchor:function(){return this._opts.anchor},setOffset:function(e){if(!e){return}this._opts=this._opts||{};this._opts.offset=new mS(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 iv("onshow"))},hide:function(){if(this._visible===false){return}this._visible=false;if(this._container){this._container.style.display="none"}this.dispatchEvent(new iv("onhide"))},isPrintable:function(){return !!this._opts.printable},isVisible:function(){if(!this._container&&!this._map){return false}return !!this._visible},_asyncLoadCode:function(){var e=this;kg.load("control",function(){if(e._asyncDraw){e._asyncDraw()}})}});var gt={TOP_LEFT:0,TOP_RIGHT:1,BOTTOM_LEFT:2,BOTTOM_RIGHT:3};cu.ControlAnchor=gt;window.BMAP_ANCHOR_TOP_LEFT=0;window.BMAP_ANCHOR_TOP_RIGHT=1;window.BMAP_ANCHOR_BOTTOM_LEFT=2;window.BMAP_ANCHOR_BOTTOM_RIGHT=3;window.BMAP_ANCHOR_TOP_CENTER=4;window.BMAP_ANCHOR_MIDDLE_LEFT=5;window.BMAP_ANCHOR_CENTER=6;window.BMAP_ANCHOR_MIDDLE_RIGHT=7;window.BMAP_ANCHOR_BOTTOM_CENTER=8;function iY(e){if(typeof kS!=="undefined"&&kS.sendMessage){kS.sendMessage("CopyrightControl")}jK.call(this);e=e||{};this._opts={printable:false};ht.extend(this._opts,e);this._copyrightCollection=[];this.defaultAnchor=BMAP_ANCHOR_BOTTOM_LEFT;this.defaultOffset=new mS(5,2);this.setAnchor(e.anchor);this._canShow=true;this.sateMapStyle=false;this.blockInfoWindow=false;this._asyncLoadCode()}iY.inherits(jK,"CopyrightControl");ht.extend(iY.prototype,{initialize:function(e){this._map=e;return this._container},addCopyright:function(T){var e={minZoom:0,bounds:null,content:"",mapType:""};for(var C in T){e[C]=T[C]}if(this._map){var oJ=e.minZoom;if(oJ===-1||oJthis._map.getMaxZoom()){e.minZoom=this._map.getMinZoom()}if(e.mapType!==""&&!gy[e.mapType]){e.mapType=BMAP_NORMAL_MAP}}var oH=this.getCopyright(T.id);if(oH){for(var oI in e){oH[oI]=e[oI]}}else{this._copyrightCollection.push(e)}},getCopyright:function(T){for(var C=0,e=this._copyrightCollection.length;CBMAP_NAVIGATION_CONTROL_ZOOM){this._opts.type=BMAP_NAVIGATION_CONTROL_LARGE;return}this._opts.type=e},getType:function(){return this._opts.type}});window.BMAP_MAPTYPE_CONTROL_HORIZONTAL=0;window.BMAP_MAPTYPE_CONTROL_DROPDOWN=1;window.BMAP_MAPTYPE_CONTROL_MAP=2;function G(i){if(typeof kS!=="undefined"&&kS.sendMessage){kS.sendMessage("MapTypeControl")}jK.call(this);i=i||{};this._opts={printable:false,type:i.type||BMAP_MAPTYPE_CONTROL_MAP,mapTypes:[BMAP_NORMAL_MAP,BMAP_SATELLITE_MAP,BMAP_HYBRID_MAP]};if(K.apiVersionIsGL()){this._opts.mapTypes=[BMAP_NORMAL_MAP,BMAP_EARTH_MAP,BMAP_HYBRID_MAP]}this.defaultAnchor=BMAP_ANCHOR_TOP_RIGHT;this.defaultOffset=new mS(10,10);this.setAnchor(i.anchor);this._opts=ht.extend(ht.extend(this._opts,{offset:this.defaultOffset,enableSwitch:true}),i);if(i.mapTypes instanceof Array){this._opts.mapTypes=i.mapTypes.slice(0)}var e=this;kg.load("control",function(){e._asyncDraw()})}G.inherits(jK,"MapTypeControl");ht.extend(G.prototype,{initialize:function(e){this._map=e;return this._container},showStreetLayer:function(e){this._map.showStreetLayer(e)}});function m9(e){if(typeof kS!=="undefined"&&kS.sendMessage){kS.sendMessage("ZoomControl")}jK.call(this);e=e||{};this._opts={};this._opts=ht.extend(this._opts,e);this._zoomInDisabled=false;this._zoomOutDisabled=false;this._zoomInTapped=false;this._zoomOutTapped=false;this.defaultAnchor=gt.BOTTOM_RIGHT;this.defaultOffset=new mS(15,20);this.setAnchor(e.anchor);this._asyncLoadCode()}m9.inherits(jK,"ZoomControl");ht.extend(m9.prototype,{initialize:function(e){this._map=e;return this._container}});function jl(e){if(typeof kS!=="undefined"&&kS.sendMessage){kS.sendMessage("LocationControl")}jK.call(this);e=e||{};this._opts={autoZoom:true,autoViewport:true,showAddressBar:!K.apiVersionIsGL(),enableAutoLocation:false,locationIcon:null,};this._opts=ht.extend(this._opts,e);this.defaultAnchor=gt.BOTTOM_LEFT;this.defaultOffset=new mS(10,50);this.watchPosition=this._opts.watchPosition||false;this.useCompass=this._opts.useCompass||false;this.locMarker=null;this.locLevel=16;this.addressComponent=null;this.setAnchor(this._opts.anchor);this.onLocationStart=e.onLocationStart||null;this._asyncLoadCode()}jl.inherits(jK,"LocationControl");ht.extend(jl.prototype,{initialize:function(e){this._map=e;return this._container},startLocation:function(){this._startLocationCalled=true},location:function(){this.startLocation()},getAddressComponent:function(){return this.addressComponent},stopLocationTrace:function(){},setOptions:function(e){e=e||{};ht.extend(this._opts,e)}});function cA(e){if(typeof kS!=="undefined"&&kS.sendMessage){kS.sendMessage("LogoControl")}jK.call(this);e=e||{};this._opts={};this._opts=ht.extend(this._opts,e);this.defaultAnchor=gt.BOTTOM_LEFT;this.defaultOffset=new mS(5,15);if(c7()){this.defaultOffset=new mS(10,10)}this.setAnchor(e.anchor)}cA.inherits(jK,"LogoControl");ht.extend(cA.prototype,{initialize:function(i){this._map=i;var e=this._container=document.createElement("div");e.innerHTML='';i.getContainer().appendChild(e);return e}});function n6(e){if(typeof kS!=="undefined"&&kS.sendMessage){kS.sendMessage("OverviewMapControl")}jK.call(this);e=e||{};this._opts={printable:false,zoomInterval:4,isOpen:Boolean(e.isOpen),size:e.size||new mS(150,150),padding:4};this._opts=ht.extend(this._opts,e);this.defaultAnchor=gt.BOTTOM_RIGHT;this.defaultOffset=new mS(0,0);this.setSize(this._opts.size);this.setAnchor(this._opts.anchor);this._asyncLoadCode()}n6.inherits(jK,"OverviewMapControl");ht.extend(n6.prototype,{initialize:function(e){this._map=e;return this._container},remove:function(){jK.prototype.remove.call(this)},isOpen:function(){return this._opts.isOpen},changeView:function(){this._opts.isOpen=!this._opts.isOpen},setSize:function(e){if(!(e instanceof mS)){e=new mS(150,150)}if(e.width<=0){e.width=150}if(e.height<=0){e.height=150}this._opts.size=e},getSize:function(){return this._opts.size},});function aV(e,i){this._map=e;this._indoorInfo=i;this._visible=true;this._adjustVisible=true;this._isMobile=c7();this._sizeConfig={FLOOR_BTN_HEIGHT:this._isMobile?35:26,SWITCH_ARROW_HEIGHT:this._isMobile?20:15};this._init()}aV.prototype._init=function(){this._render();this._bindDom();this._bind();this._adjustDisplayHeight();var e=new iv("onindoor_bar_show");e.uid=this._indoorInfo.uid;e.floors=this._indoorInfo.floors;this._map.dispatchEvent(e)};aV.prototype._render=function(){if(!this._indoorInfo){return}var oK=this._isMobile;var e=this._div=c8("div");ht.ac(e,"floor-select-container");oK&&ht.ac(e,"mobile");oK&&ht.ac(e,"all-border-radius");var i=this._btnTop=c8("button");ht.ac(i,"floor-switch-top");ht.ac(i,"top-border-radius");var oI=c8("div");ht.ac(oI,"floor-switch-top-icon");i.appendChild(oI);var oH=this._btnBottom=c8("button");var C=c8("div");ht.ac(C,"floor-switch-bottom-icon");oH.appendChild(C);ht.ac(oH,"floor-switch-bottom");ht.ac(oH,"bottom-border-radius");var T=this._floorsContainer=c8("div");ht.ac(T,"floors-container");T.appendChild(this._createFloorsDom());this._div.appendChild(i);this._div.appendChild(T);this._div.appendChild(oH);var oL=0;if(this._btnTop.style.display===""){oL=2*this._sizeConfig.SWITCH_ARROW_HEIGHT}this._div.style.height=parseInt(this._floorsContainer.style.height,10)+oL+"px";this._map.getContainer().appendChild(this._div);if(!oK){var oJ=this;setTimeout(function(){oJ._div.style.right="20px"},20)}};aV.prototype._createFloorsDom=function(){if(!this._indoorInfo){return}var C=this._ol=c8("ol");var oI=this._indoorInfo.currentFloor;for(var oH=this._indoorInfo.floors.length-1;oH>=0;oH--){var oJ=this._indoorInfo.floors[oH].floorName;var e=c8("li");var T=c8("button");ht.ac(T,"btn-select-floor");if(oH===oI){ht.ac(T,"selected")}T.setAttribute("data-floor",oH);T.innerHTML=oJ;e.appendChild(T);C.appendChild(e)}return C};aV.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()};aV.prototype._bindDom=function(){var e=this;ht.on(this._floorsContainer,"click",function(T){var C=T.target||T.srcElement;if(C.tagName.toLowerCase()==="button"){e._map.showIndoor(e._indoorInfo.uid,parseInt(C.getAttribute("data-floor"),10));var i=new iv("onindoor_bar_click");i.uid=e._indoorInfo.uid;e._map.dispatchEvent(i)}});ht.on(this._floorsContainer,"mouseover",function(C){var i=C.target;if(i.tagName.toLowerCase()==="button"){ht.ac(i,"hover")}});ht.on(this._floorsContainer,"mouseout",function(C){var i=C.target;if(i.tagName.toLowerCase()==="button"){ht.rc(i,"hover")}});ht.on(this._floorsContainer,"touchstart",function(C){var i=C.target;if(i.tagName.toLowerCase()==="button"){ht.ac(i,"onmousedown")}});ht.on(this._floorsContainer,"touchend",function(C){var i=C.target;if(i.tagName.toLowerCase()==="button"){ht.rc(i,"onmousedown")}});ht.on(this._btnTop,"mouseover",function(i){if(this._disable){return}ht.ac(this,"hover")});ht.on(this._btnTop,"mouseout",function(i){ht.rc(this,"hover")});ht.on(this._btnBottom,"mouseover",function(i){if(this._disable){return}ht.ac(this,"hover")});ht.on(this._btnBottom,"mouseout",function(i){ht.rc(this,"hover")});ht.on(this._btnTop,"touchstart",function(i){if(this.className.indexOf("disable")>-1){return}ht.ac(this,"onmousedown")});ht.on(this._btnTop,"touchend",function(i){ht.rc(this,"onmousedown")});ht.on(this._btnBottom,"touchstart",function(i){if(this.className.indexOf("disable")>-1){return}ht.ac(this,"onmousedown")});ht.on(this._btnBottom,"touchend",function(i){ht.rc(this,"onmousedown")});ht.on(this._btnTop,"click",function(i){e._setBarSliderTop(parseInt(e._ol.style.top,10)+26)});ht.on(this._btnBottom,"click",function(i){e._setBarSliderTop(parseInt(e._ol.style.top,10)-26)});ht.on(this._div,"mousemove",aE);ht.on(this._div,"wheel",kI);ht.on(this._div,"mousewheel",kI);this._map.addEventListener("resize",function(){e._adjustDisplayHeight()})};aV.prototype._adjustDisplayHeight=function(){if(!this._indoorInfo){return}var oI=this._map.getSize().height;var oJ=this._sizeConfig.FLOOR_BTN_HEIGHT;var oK=oI-291-100;if(this._isMobile){oK=oI-12-108-this._map.config.bottomOffset}var e=this._indoorInfo.floors.length;var C=e*oJ;var T=e;var oM=0;var oN=this._floorsContainer.children[0];if(C>oK){this._showArrow=true;ht.rc(oN.children[0].children[0],"top-border-radius");ht.rc(oN.children[e-1].children[0],"bottom-border-radius")}else{this._showArrow=false;ht.ac(oN.children[0].children[0],"top-border-radius");ht.ac(oN.children[e-1].children[0],"bottom-border-radius")}while(C>oK){if(T===0){break}T--;oM=2*this._sizeConfig.SWITCH_ARROW_HEIGHT;C=T*oJ+oM}this._currentDisplayHeight=C;if(T<3){this._setAdjustVisbile(false)}else{this._setAdjustVisbile(true)}this._floorsContainer.style.height=T*oJ+"px";var oH=this._indoorInfo.currentFloor;var i=e-oH;var oL=oH-1;this._div.style.height=parseInt(this._floorsContainer.style.height,10)+oM+"px";var oO=-(e-(oH+Math.round(T/2)))*oJ;this._setBarSliderTop(oO);if(T=i*C){T=e-i*C;ht.ac(this._btnBottom,"disable");ht.rc(this._btnBottom,"hover");this._btnBottom._disable=true}else{ht.rc(this._btnBottom,"disable");this._btnBottom._disable=false}if(T>=0){T=0;ht.ac(this._btnTop,"disable");ht.rc(this._btnTop,"hover");this._btnTop._disable=true}else{ht.rc(this._btnTop,"disable");this._btnTop._disable=false}this._ol.style.top=T+"px"};aV.prototype._setAdjustVisbile=function(e){if(this._adjustVisible===e){return}this._adjustVisible=e;if(e&&this._visible){this._div.style.display="";this._div.style.right="20px"}else{this._div.style.display="none"}};aV.prototype._bind=function(){var i=this._map;var e=this;i.on("indoor_status_changed",function(oK){if(e._visible===false){return}var C=e._ol;var oI=oK.uid;if(!oI){return}var oJ=oK.floor;for(var oH=0;oH=lg.HIGH_RES_MIN_RATIO?2:1;this._imgPath=K.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()}ht.extend(mt.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 e=!K.uiVersionIsGL();var C=this._div=c8("div");var i=C.style;i.position="absolute";i.zIndex=5;i.top="0";i.left="0";i.width="52px";i.height="52px";if(e){C.className="BMap_navCtrl3D_compass"}else{i.height="54px";i.background="url("+this._imgPath+") no-repeat";i.backgroundSize="266px auto"}this._rotateCCW=this._createButton();this._rotateCCW.title="逆时针转动";i=this._rotateCCW.style;i.left="2px";i.top="5px";i.zIndex="1";i.width="15px";i.height="42px";i.backgroundPosition="-75px -5px";this._rotateCW=this._createButton();this._rotateCW.title="顺时针转动";i=this._rotateCW.style;i.right="2px";i.top="5px";i.zIndex="1";i.width="15px";i.height="42px";i.backgroundPosition="-75px -5px";i.WebkitTransform=i.transform="scaleX(-1)";this._compass=this._createButton();this._compass.title="恢复正北方向";i=this._compass.style;i.left="19px";i.top="4px";i.width="14px";i.height="44px";if(e){this._compass.className="BMap_navCtrl3D_needle";i.background="none"}else{i.backgroundPosition="-56px -4px"}i.WebkitTransform=i.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=c8("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(){mh(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 iv("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 iv("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 C=false;if(e._target.getTilt()!==0){C=true;e._target.setTilt(0,e._setHeadingOptions)}if(e._target.getHeading()%360!==0){C=true;e._target.resetHeading(e._setHeadingOptions)}if(!C){e._target.setLock(false)}i.fire(new iv("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(C){e._updateUI()});i.addEventListener("animation_start",function(C){e._isOperating=true});i.addEventListener("animation_end",function(C){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 ez(C,i){this._map=C;this._target=C;var T=C.temp.originMapType||C.mapType;if(T==="B_EARTH_MAP"&&C._earth){this._target=C._earth}this._outContainer=i||C.getContainer();this._imgRatio=i8()>=lg.HIGH_RES_MIN_RATIO?2:1;this._imgPath=K.imgPath+"gl-navi-control-pc4"+(this._imgRatio===2?"-2x.png":".png");this._enabled=true;this._diffBgPosition=3;if(K.uiVersionIsGL()){this._diffBgPosition=0}var e=this;this._setTiltOptions={callback:function(){e._target.setLock(false)}};this._init()}ht.extend(ez.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 i=!K.uiVersionIsGL();this._isV4=i;var e=this._div=c8("button");e.title="倾斜";var C=e.style;if(i){e.className="BMap_navCtrl3D_tilt";e.textContent="2D"}else{C.backgroundImage="url("+this._imgPath+")";C.position="absolute";C.zIndex=5;C.outline="none";C.border="none";C.cursor="pointer";C.width="26px";C.height="26px";C.top="56px";C.right="13px";C.backgroundSize="266px auto";C.backgroundPosition="-110px 1px";C.backgroundColor="#fff";C.backgroundRepeat="no-repeat";C.boxShadow="1px 2px 1px rgba(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(T){if(!e._enabled){return}if(e._target.getLock()){return}var i=e._target.getTilt();var C;if(i===e._map.getCurrentMaxTilt()){C="out"}else{if(i===0){C="in"}else{C=e._preTrend?e._preTrend:"in"}}e._curTrend=C;e._clickTimer=setTimeout(function(){e._map.fire(new iv("ontiltmsdown"));e._tiltAni=new ih({duration:9999999,render:function(oH){i=e._target.getTilt();if(C==="in"&&i0){e._target.setTilt(i-1,{noAnimation:true})}}},finish:function(){e._tiltAni=null}});e._clickTimer=null},200);T.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(T){if(!e._enabled){return}if(!e._clickTimer){return}if(e._target.getLock()){return}clearTimeout(e._clickTimer);e._map.fire(new iv("ontiltclick"));var i=e._target.getTilt();e._target.setLock(true);T.stopPropagation();var C=e._map.getCurrentMaxTilt();if(e._curTrend==="in"){e._target.setTilt(C,e._setTiltOptions)}else{if(e._curTrend==="out"){e._target.setTilt(0,e._setTiltOptions)}else{if(i0?"3D":"2D";if(this._enabled){this._div.title=C>0?"恢复":"倾斜";this._div.classList.remove("BMap_navCtrl3D_tilt_disabled")}else{this._div.title="请放大地图后操作";this._div.classList.add("BMap_navCtrl3D_tilt_disabled")}return}var i=0;var T=0;var e=0;if(C>0){i=78}if(this._mouseOver){e=52}if(this._enabled===false){T=26;e=0;i=0}var oH="-"+(110+i+T+e-this._diffBgPosition)+"px "+(1+this._diffBgPosition)+"px";this._div&&(this._div.style.backgroundPosition=oH);if(this._enabled){if(C>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 kF(i){eV.call(this);this._opts={container:null,cursor:"default",marker:true};this._opts=ht.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;kg.load("menu",function(){e._draw()})}kF.inherits(eV,"ContextMenu");ht.extend(kF.prototype,{initialize:function(i,e){this._map=i;this._overlay=e||null},remove:function(){this._map=this._overlay=null},addItem:function(oH,e){if(!oH||oH._type!="menuitem"||oH._text==""||oH._width<=0){return}for(var T=0,C=this._items.length;Tthis._items.length-1){e=-1}oH._insertIndex=e;if(e===-1){this._items.push(oH);this._rItems.push(oH)}else{this._items.splice(e,0,oH);this._rItems.splice(e,0,oH)}},removeItem:function(T){if(!T||T._type!="menuitem"){return}for(var C=0,e=this._items.length;Cthis._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(C){if(!this._dividers[C]){return}for(var T=0,e=this._items.length;TC){this._items[T]._dIndex--}}this._dividers.splice(C,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}});function lv(C,T,i){if(!C||!T||typeof T!="function"){return}eV.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=C+"";this._callback=T;this._map=null;this._type="menuitem";this._contextmenu=null;this._container=null;this._enabled=true;var e=this;kg.load("menu",function(){e._draw()})}lv.inherits(eV,"MenuItem");ht.extend(lv.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},setIcon:function(){console.warn("当前版本暂不支持 menuItem.setIcon")}});function lx(e,i){this.setSouthWest(e);this.setNorthEast(i)}ht.extend(lx.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.latfy.HALF_SIZE){e-=fy.HALF_SIZE*2}return new d7(e,(this.sw.lat+this.ne.lat)/2)}},intersects:function(C){if(!C||C.isEmpty()||this.isEmpty()){return null}if(Math.max(C.sw.lng,C.ne.lng)Math.max(this.sw.lng,this.ne.lng)||Math.max(C.sw.lat,C.ne.lat)Math.max(this.sw.lat,this.ne.lat)){return null}var oH=Math.max(this.sw.lng,C.sw.lng);var i=Math.min(this.ne.lng,C.ne.lng);var T=Math.max(this.sw.lat,C.sw.lat);var e=Math.min(this.ne.lat,C.ne.lat);return new lx(new d7(oH,T),new d7(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 C=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.lngC){this.sw.lat=C}if(this.ne.lat=0&&e<90||e>=270&&e<360){if(this.normalizedTopRight.lng-180&&e.lat<90&&e.lat>-90){return e}return this.convertMC2LL(e)},convertMC2LL:function(e){if(e===null){return e}if(!e){return new d7(0,0)}var C;var oH;C=new d7(Math.abs(e.lng),Math.abs(e.lat));for(var T=0;T=this.MCBAND[T]){oH=this.MC2LL[T];break}}var oI=this.convertor(e,oH);return new dZ(oI.lat,oI.lng)},convertLL2MC:function(oJ){if(!oJ){return new d7(0,0)}var oL=oJ.lat;var T=oJ.lng;T=this.getLoop(oJ.lng,-180,180);oL=dy(oL,-85,85);var oI;for(var oH=0;oH=this.LLBAND[oH]){oI=this.LL2MC[oH];break}}if(!oI){for(oH=0;oH1){oH=1}if(oH<-1){oH=-1}return this.EARTHRADIUS*Math.acos(oH)},getRange:function(C,i,e){if(i!=null){C=Math.max(C,i)}if(e!=null){C=Math.min(C,e)}return C},getLoop:function(C,i,e){while(C>e){C-=e-i}while(Ci-1){e=e-i}while(e<0){e=e+i}return e},getLoopBox:function(e,C){var i=this.HALF_SIZE*2;if(e[0]>0&&C[2]<0){C[2]=C[2]+i}else{if(e[0]<0&&C[0]>0){C[0]=C[0]-i}}return C},createOrUpdateTileCoord:function(C,e,T,i){if(i!==undefined){i[0]=C;i[1]=e;i[2]=T;return i}else{return[C,e,T]}},createOrUpdateTileRange:function(e,T,oH,C,i){if(i!==undefined){i.minX=e;i.maxX=T;i.minY=oH;i.maxY=C;return i}else{return{minX:e,maxX:T,minY:oH,maxY:C}}},fromEPSG4326:function(C,oL,oJ){var oH=C.length;var oI=oJ>1?oJ:2;var e=oL;if(e===undefined){if(oI>2){e=C.slice()}else{e=new Array(oH)}}for(var T=0;Tthis.MAX_SAFE_Y){oK=this.MAX_SAFE_Y}else{if(oK<-this.MAX_SAFE_Y){oK=-this.MAX_SAFE_Y}}e[T+1]=oK}return e},toEPSG4326:function(C,oK,oJ){var oH=C.length;var oI=oJ>1?oJ:2;var e=oK;if(e===undefined){if(oI>2){e=C.slice()}else{e=new Array(oH)}}for(var T=0;T90){i=90}}while(e<-180){e+=360}while(e>180){e-=360}e=e||0;i=i||0;d7.call(this,e,i)}dZ.inherits(d7,"LatLng");ht.extend(dZ.prototype,{equals:function(e){return(this.lat===e.lat&&this.lng===e.lng)},equalsEpsilon:function(e,i){i=i||1e-7;return(Math.abs(this.lat-e.lat)180){C=360-C}return C},toString:function(){return"LatLng"},toGeoJSON:function(){var i="Point";var C=[this.lng,this.lat];var e={type:"Feature",geometry:{type:i,coordinates:C},properties:this.properties};return e}});function ej(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 dZ(e.lat,e.lng);this._ne=new dZ(i.lat,i.lng);this._swLng=e.lng;this._swLat=e.lat;this._neLng=i.lng;this._neLat=i.lat}}ht.extend(ej.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(C._swLat,C._neLat)Math.max(this._swLat,this._neLat)){return false}var oH=Math.max(this._swLng,C._swLng);var i=Math.min(this._neLng,C._neLng);var T=Math.max(this._swLat,C._swLat);var e=Math.min(this._neLat,C._neLat);this._sw=new dZ(T,oH);this._ne=new dZ(e,i);this._swLng=oH;this._swLat=T;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 C=e.lat;if(!this._sw){this._sw=new dZ(0,0)}if(!this._ne){this._ne=new dZ(0,0)}if(!this._swLng||this._swLng>i){this._sw.lng=this._swLng=i}if(!this._neLng||this._neLngC){this._sw.lat=this._swLat=C}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=cO(this._map.container,this._html);ht.on(e,"mouseup",function(C){if(C.button==2){kI(C)}});ht.on(e,"contextmenu",kI);e.style.display="none"},getDrawPoint:function(T,oJ,oH){T=window.event||T;var i=T.offsetX||T.layerX||0;var oI=parseInt(T.offsetY)||parseInt(T.layerY)||0;var C=T.target||T.srcElement;if(C!=aF.getDom(this._map)&&oJ==true){while(C&&C!=this._map.container){if(!(C.clientWidth==0&&C.clientHeight==0&&C.offsetParent&&C.offsetParent.nodeName.toLowerCase()=="td")){i+=C.offsetLeft;oI+=C.offsetTop}C=C.offsetParent}}if(C!=aF.getDom(this._map)&&C!=this._map.container){return}if(typeof i==="undefined"||typeof oI==="undefined"){return}if(isNaN(i)||isNaN(oI)){return}if(oH){i=i+oH.x;oI=oI+oH.y}return this._map.pixelToPointIn(new hT(i,oI))},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 bv(){this._type="overlay"}bv.inherits(ht.BaseClass,"Overlay");bv.getZIndex=function(i,e){i=i*1;if(!i){return 0}if(e){i=m5.convertMC2LL(new d7(0,i)).lat}return(i*-100000)<<1};ht.extend(bv.prototype,{_i:function(oJ){this._map=oJ;if(!this.domElement&&c0(this.initialize)){this.domElement=this.initialize(oJ);if(this.domElement){this.domElement.style.WebkitUserSelect="none";if(this.enableDraggingMap!==undefined&&!this.enableDraggingMap&&!(this instanceof D)){var oI=["mouseout","mouseover","click","keydown","selectstart"];var C=(window.PointerEvent||window.MSPointerEvent)&&(navigator.maxTouchPoints>0||navigator.msMaxTouchPoints>0);var e=["mousedown"];if(C){if(window.PointerEvent){e=["pointerdown"]}else{if(window.MSPointerEvent){e=["MSPointerDown"]}}}for(var T=0;T=0;oJ--){if(T._customOverlays[oJ].enableMassClear!==false){this.removeOverlay(T._customOverlays[oJ]);T._customOverlays.splice(oJ,1)}}});oH.addEventListener("infowindowopen",function(oK){var oJ=this.infoWindow;if(oJ){ht.hide(oJ.popDom);ht.hide(oJ.shadowDom)}});function C(){if(this.getMapTypeId()==="B_EARTH_MAP"||this._renderType==="webgl"){if(T._zoomingOrMoving===false){this._panes.markerMouseTarget.style.display="none";T._zoomingOrMoving=true}}}function e(oL){if(this.getMapTypeId()==="B_EARTH_MAP"||this._renderType==="webgl"){if(T._zoomingOrMoving===true){if(this._panes.markerMouseTarget){this._panes.markerMouseTarget.style.display=""}T._zoomingOrMoving=false;for(var oK=0;oK1){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 lx();this.points=[];this.greatCirclePoints=[];this._parseCache=[];this._holesCache=[];this._parseCacheGL=[];this._parseCacheGLRaw=[];this._areaCacheGL=[];this._strokeStyleInfoForGL=[[]];this._fillStyleInfoForGL="";this.vertexMarkers=[];this._temp={}}mi.JOININDEX={miter:0,round:1,bevel:2};mi.CAPINDEX={round:0,butt:1,square:2};mi.inherits(g0,"Graph");mi.getGraphPoints=function(i){var e=[];if(!i||i.length===0){return e}if(typeof i==="string"){var C=i.split(";");ht.each(C,function(oH){var T=oH.split(",");e.push(new d7(T[0],T[1]))})}if(i.constructor===Array&&i.length>0){e=i}return e};mi.parseTolerance={0:[0.09,0.005,0.0001,0.00001],1:[9000,500,20,1]};ht.extend(mi.prototype,{initialize:function(e){this.map=e;return null},draw:function(){},setPoints:function(e){this._clearCache();this.points=mi.getGraphPoints(e).slice(0);this._calcBounds()},setPathIn:function(e){this.setPoints(e)},_calcBounds:function(){if(!this.points){return}var e=this;e._bounds=new lx();if(!this.hasMultipleParts){ht.each(this.points,function(i){e._bounds.extend(i)})}else{ht.each(this.points,function(i){ht.each(i,function(C){e._bounds.extend(C)})})}},getPoints:function(){return this.points},getPathIn:function(){return this.points},setPointAt:function(i,e){if(!e||!this.points[i]){return}this._clearCache();this.points[i]=new d7(e.lng,e.lat);this._calcBounds()},setPositionAt:function(i,e){if(!e||!this.points[i]){return}var C=m5.convertLL2MC(e);this.setPointAt(i,C)},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},getBoundsIn:function(){this._bounds.setMinMax();return this._bounds},getBounds:function(){var e=this.getBoundsIn();var i=new lx(m5.convertMC2LL(e.getSouthWest()),m5.convertMC2LL(e.getNorthEast()));i.setMinMax();return i},remove:function(){if(this.map){this.map.removeEventListener("onmousemove",this._graphMouseEvent);this.map.removeEventListener("onclick",this._graphClickEvent)}g0.prototype.remove.call(this);this._clearCache();var e=new iv("onlineupdate");e.action="remove";e.overlay=this;this.fire(e)},enableEditing:function(){if(this.points.length<2){return}this._config.enableEditing=true;var e=this;kg.load("poly",function(){e.addVertexs()},true)},disableEditing:function(){this._config.enableEditing=false;var e=this;kg.load("poly",function(){e.clearVertexs()},true)},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 C=0;if(this.points.length<=1){this._length=0;return C}for(var e=0;e0){oH=this.greatCirclePoints}var oI=this.getParseTolerance(e.getZoom(),1);if(!this.hasMultipleParts){var oL=fQ(oH,oI);oL=mm(oL,oI)}else{var oL=[];for(var C=0;CoH.maxY){C.bottom=4;C.all+=C.bottom}}if(e>oH.maxX){C.right=2;C.all+=C.right}else{if(e=this.tokens.length-1};this.isCommandOrEnd=function(){if(this.isEnd()){return true}return this.tokens[this.i+1].match(/^[A-Za-z]$/)!=null};this.isRelativeCommand=function(){switch(this.command){case"m":case"l":case"h":case"v":case"c":case"s":case"q":case"t":case"a":case"z":return true;break}return false};this.getToken=function(){this.i++;return this.tokens[this.i]};this.getScalar=function(){return parseFloat(this.getToken())};this.nextCommand=function(){this.previousCommand=this.command;this.command=this.getToken()};this.getPoint=function(){var C=new fF.Point(this.getScalar(),this.getScalar());return this.makeAbsolute(C)};this.getAsControlPoint=function(){var C=this.getPoint();this.control=C;return C};this.getAsCurrentPoint=function(){var C=this.getPoint();this.current=C;return C};this.getReflectedControlPoint=function(){if(this.previousCommand.toLowerCase()!="c"&&this.previousCommand.toLowerCase()!="s"&&this.previousCommand.toLowerCase()!="q"&&this.previousCommand.toLowerCase()!="t"){return this.current}var C=new fF.Point(2*this.current.x-this.control.x,2*this.current.y-this.control.y);return C};this.makeAbsolute=function(C){if(this.isRelativeCommand()){C.x+=this.current.x;C.y+=this.current.y}return C};this.addMarker=function(T,oH,C){if(C!=null&&this.angles.length>0&&this.angles[this.angles.length-1]==null){this.angles[this.angles.length-1]=this.points[this.points.length-1].angleTo(C)}this.addMarkerAngle(T,oH==null?null:oH.angleTo(T))};this.addMarkerAngle=function(T,C){this.points.push(T);this.angles.push(C)};this.getMarkerPoints=function(){return this.points};this.getMarkerAngles=function(){for(var T=0;T1){oM*=Math.sqrt(o1);oL*=Math.sqrt(o1)}var oT=(oO==oK?-1:1)*Math.sqrt(((Math.pow(oM,2)*Math.pow(oL,2))-(Math.pow(oM,2)*Math.pow(o9.y,2))-(Math.pow(oL,2)*Math.pow(o9.x,2)))/(Math.pow(oM,2)*Math.pow(o9.y,2)+Math.pow(oL,2)*Math.pow(o9.x,2)));if(isNaN(oT)){oT=0}var oS=new fF.Point(oT*oM*o9.y/oL,oT*-oL*o9.x/oM);var oH=new fF.Point((o4.x+oP.x)/2+Math.cos(C)*oS.x-Math.sin(C)*oS.y,(o4.y+oP.y)/2+Math.sin(C)*oS.x+Math.cos(C)*oS.y);var oZ=function(pa){return Math.sqrt(Math.pow(pa[0],2)+Math.pow(pa[1],2))};var oV=function(pb,pa){return(pb[0]*pa[0]+pb[1]*pa[1])/(oZ(pb)*oZ(pa))};var o7=function(pb,pa){return(pb[0]*pa[1]=1){o5=0}var oY=1-oK?1:-1;var o3=o8+oY*(o5/2);var i=new fF.Point(oH.x+oM*Math.cos(o3),oH.y+oL*Math.sin(o3));o2.addMarkerAngle(i,o3-oY*Math.PI/2);o2.addMarkerAngle(oP,o3-oY*Math.PI);oN.addPoint(oP.x,oP.y);if(o0!=null){var oV=oM>oL?oM:oL;var oW=oM>oL?1:oM/oL;var oU=oM>oL?oL/oM:1;o0.translate(oH.x,oH.y);o0.rotate(C);o0.scale(oW,oU);o0.arc(0,0,oV,o8,o8+o5,1-oK);o0.scale(1/oW,1/oU);o0.rotate(-C);o0.translate(-oH.x,-oH.y)}}break;case"Z":case"z":if(o0!=null){o0.closePath()}o2.current=o2.start}}return oN};this.getMarkers=function(){var T=this.PathParser.getMarkerPoints();var oI=this.PathParser.getMarkerAngles();var oH=[];for(var C=0;Cthis.x2){this.x2=oH}}if(oI!=null){if(isNaN(this.y1)||isNaN(this.y2)){this.y1=oI;this.y2=oI}if(oIthis.y2){this.y2=oI}}};this.addX=function(oH){this.addPoint(oH,null)};this.addY=function(oH){this.addPoint(null,oH)};this.addBoundingBox=function(oH){this.addPoint(oH.x1,oH.y1);this.addPoint(oH.x2,oH.y2)};this.addQuadraticCurve=function(oM,oL,oI,oH,oO,oN){var oK=oM+2/3*(oI-oM);var oJ=oL+2/3*(oH-oL);var oQ=oK+1/3*(oO-oM);var oP=oJ+1/3*(oN-oL);this.addBezierCurve(oM,oL,oK,oQ,oJ,oP,oO,oN)};this.addBezierCurve=function(oU,oT,oL,oJ,oQ,oO,oW,oV){var oM=[oU,oT],oK=[oL,oJ],oI=[oQ,oO],oH=[oW,oV];this.addPoint(oM[0],oM[1]);this.addPoint(oH[0],oH[1]);for(nt=0;nt<=1;nt++){var oX=function(o1){return Math.pow(1-o1,3)*oM[nt]+3*Math.pow(1-o1,2)*o1*oK[nt]+3*(1-o1)*Math.pow(o1,2)*oI[nt]+Math.pow(o1,3)*oH[nt]};var oZ=6*oM[nt]-12*oK[nt]+6*oI[nt];var o0=-3*oM[nt]+9*oK[nt]-9*oI[nt]+3*oH[nt];var oY=3*oK[nt]-3*oM[nt];if(o0==0){if(oZ==0){continue}var oS=-oY/oZ;if(0=0){T=T+1}else{T=1+T}var i=this._initOptions.rotation===0?this.style.rotation:(this.style.rotation-this._initOptions.rotation);while(i<0){i+=360}var C=e.domElement.style;C.width=this._initOptions.width+"px";C.height=this._initOptions.height+"px";C.transform="rotate("+i+"deg) scale("+T+")"}if(!this.isReDraw){this._refresh(e)}}};hQ.prototype._refresh=function(e){e.textureCoord=e.textureCoordGLMap=null;var i=new iv("onstatus_change");i.overlay=e;i.action="setIcon";i.imageUrlChanged=true;setTimeout(function(){e.fire(i)},100)};hQ.prototype.generateRenderData=function(){var i=this.offset=this.anchor;var e=this.size;var C=[];C.push(-i.width,i.height-e.height,0);C.push(e.width-i.width,i.height-e.height,0);C.push(e.width-i.width,i.height,0);C.push(-i.width,i.height-e.height,0);C.push(e.width-i.width,i.height,0);C.push(-i.width,i.height,0);return{vertex:C}};hQ.prototype.getCurrentImageUrl=function(){return this.id};hQ.prototype.getRenderData=function(){this._renderData=this.generateRenderData();return this._renderData};hQ.prototype.setAnchor=function(e){if(e instanceof mS){this.anchor=e;this.offset=e}};hQ.prototype.toString=function(){return"Symbol"};var ic={14:"m-0.00573,-10c-5.51975,0 -9.99427,4.47453 -9.99427,9.99428c0,5.51974 4.47452,9.99425 9.99427,9.99425c5.51972,0 9.99426,-4.47452 9.99426,-9.99425c0,-5.51975 -4.47453,-9.99428 -9.99426,-9.99428zm0,17.92491c-4.37412,0 -7.93132,-3.55788 -7.93132,-7.93063c0,-4.37345 3.5572,-7.93134 7.93132,-7.93134c4.37411,0 7.93062,3.55721 7.93062,7.93134c0,4.37412 -3.55789,7.93063 -7.93062,7.93063zm-0.00068,-15.4088c-0.38027,0 -0.68696,0.30807 -0.68696,0.68765l0,6.34078l-4.15752,1.81815c-0.34794,0.15266 -0.50611,0.55837 -0.35344,0.90632c0.11278,0.25787 0.36445,0.4119 0.6292,0.4119c0.09214,0 0.18635,-0.01857 0.27575,-0.05845l4.55635,-1.99279c0.00344,-0.00137 0.00619,-0.00275 0.00894,-0.00412l0.00275,-0.00138c0.01032,-0.00413 0.01581,-0.01376 0.02545,-0.01719c0.07151,-0.03576 0.13821,-0.07771 0.19185,-0.1341c0.02337,-0.02338 0.03644,-0.05364 0.05431,-0.08045c0.03301,-0.04401 0.06946,-0.08733 0.0894,-0.14028c0.0165,-0.04126 0.01787,-0.08596 0.02613,-0.12997c0.00894,-0.04469 0.02614,-0.08389 0.02614,-0.1286l0,-6.7905c0,-0.37889 -0.30807,-0.68697 -0.68833,-0.68697z",13:"m-0.00706,-9.5c-5.24281,0 -9.49294,4.25065 -9.49294,9.49294c0,5.24331 4.25014,9.49294 9.49294,9.49294c5.24281,0 9.49294,-4.24964 9.49294,-9.49294c0,-5.2423 -4.25013,-9.49294 -9.49294,-9.49294zm3.08857,3.85997c0.61044,0 1.10279,0.96873 1.10279,2.16271s-0.49384,2.1647 -1.10279,2.1647c-0.60844,0 -1.10228,-0.96873 -1.10228,-2.16372s0.49434,-2.16369 1.10228,-2.16369zm-6.28628,0c0.60844,0 1.10228,0.96873 1.10228,2.16271s-0.49284,2.1647 -1.10228,2.1647s-1.10277,-0.96873 -1.10277,-2.16372s0.49383,-2.16369 1.10277,-2.16369zm3.21167,12.16493c-1.87667,0 -3.63373,-1.14814 -5.14663,-3.14239c1.56571,1.02156 3.27993,1.59064 5.07786,1.59064c1.90905,0 3.72343,-0.63985 5.36539,-1.78497c-1.54429,2.11685 -3.35767,3.33672 -5.29662,3.33672l-0.00001,0z",12:"m9.27295,5.92958l-2.64443,-4.57961c-0.79727,-1.37992 -2.10131,-3.63983 -2.8986,-5.01973l-2.64441,-4.57858c-0.79782,-1.38093 -2.10186,-1.38093 -2.89913,0l-2.64335,4.57858c-0.79728,1.3799 -2.10188,3.63981 -2.89916,5.01973l-2.64387,4.57961c-0.79728,1.38101 -0.14472,2.50988 1.44983,2.50988l16.37221,0c1.59561,0 2.24711,-1.12887 1.45091,-2.50988l0,0zm-8.88166,0.70811l-1.56837,0l0,-1.50484l1.56837,0l0,1.50484zm-0.07527,-2.61447l-1.41621,0l-0.14044,-6.44231l1.68427,0l-0.12761,6.44231l0,0z",11:"m8.08295,-6.56414l-3.59319,0l0,-1.43586l-8.98155,0l0,1.43586l-3.59321,0c-1.0569,0 -1.915,0.85509 -1.915,1.91159l0,9.92258c0,1.05357 0.8581,1.91158 1.915,1.91158l16.16796,0c1.05692,0 1.91501,-0.85801 1.91501,-1.91158l0,-9.92258c0,-1.0565 -0.85809,-1.91159 -1.91501,-1.91159l0,0zm-8.08397,12.66884c-3.20143,0 -5.80643,-2.60031 -5.80643,-5.79596c0,-3.19569 2.605,-5.79891 5.80643,-5.79891s5.80789,2.60322 5.80789,5.79891c0,3.19565 -2.60794,5.79596 -5.80789,5.79596zm0,-9.6804c-2.15036,0 -3.89142,1.7394 -3.89142,3.88444c0,2.14503 1.74252,3.8844 3.89142,3.8844c2.1489,0 3.89141,-1.73937 3.89141,-3.8844c0,-2.14503 -1.74105,-3.88444 -3.89141,-3.88444z",10:"m0,-10c-0.20885,0 -0.39491,0.08583 -0.55177,0.24149c-0.15674,0.15536 -0.28646,0.37838 -0.39429,0.65665c-0.21586,0.55655 -0.34853,1.33844 -0.42114,2.27477c-0.07231,0.93446 -0.08474,2.02273 -0.05447,3.18765c-2.58175,1.05925 -7.81787,3.24648 -8.23854,3.73474c-0.56001,0.65029 -0.37908,1.3954 -0.15331,1.89002l8.608,-1.75235c0.18202,2.28374 0.4407,4.5455 0.66615,6.31771c-0.8418,0.24646 -2.41323,0.73303 -2.73754,1.03474c-0.4469,0.41562 -0.4469,1.75793 -0.4469,1.75793l3.52318,-0.28665c0.08286,0.57874 0.13486,0.9163 0.13486,0.9163l0.00511,0.03042l0.02778,0l0.06486,0l0.02778,0l0.00511,-0.03042c0,0 0.05185,-0.33756 0.13486,-0.9163l3.52424,0.28665c0,0 0,-1.34231 -0.44688,-1.75793c-0.32446,-0.30172 -1.89697,-0.7895 -2.73847,-1.0358c0.22484,-1.76681 0.4832,-4.02001 0.66507,-6.29634l8.50712,1.73203c0.22561,-0.49462 0.40765,-1.23973 -0.15237,-1.89002c-0.41538,-0.48221 -5.52504,-2.62071 -8.1386,-3.69423c0.03119,-1.17999 0.01971,-2.28285 -0.05353,-3.22816l0,-0.00233c-0.07263,-0.93523 -0.20545,-1.71635 -0.42114,-2.27244c-0.10784,-0.27827 -0.23634,-0.50114 -0.3932,-0.65665c-0.15689,-0.15567 -0.34293,-0.24149 -0.55195,-0.24149l0,0l0,0l0,0l0.00001,0l0,0l-0.00003,0.00001z",3:"m-10,0l10,-10l10,10l-10,10l-10,-10z",5:"M0,0 L-5,-15 0,-10 5,-15 z",6:"M0,0 L5,15 0,10 -5,15z",7:"M-5,-15 L0,0 5,-15",8:"M-5,15 L0,0 5,15",9:"m0,-24c-4.4183,0 -8,3.58167 -8,8c0,1.42102 0.3816,2.75 1.0312,3.90601c0.1079,0.19202 0.221,0.38098 0.3438,0.56299l6.625,11.53101l6.625,-11.53101c0.102,-0.151 0.19,-0.31097 0.281,-0.46899l0.063,-0.09399c0.649,-1.15601 1.031,-2.48499 1.031,-3.90601c0,-4.41833 -3.582,-8 -8,-8zm0,4c2.209,0 4,1.79089 4,4c0,2.20898 -1.791,4 -4,4c-2.2091,0 -4,-1.79102 -4,-4c0,-2.20911 1.7909,-4 4,-4z"};var dn={BMap_Symbol_SHAPE_CIRCLE:1,BMap_Symbol_SHAPE_RECTANGLE:2,BMap_Symbol_SHAPE_RHOMBUS:3,BMap_Symbol_SHAPE_STAR:4,BMap_Symbol_SHAPE_BACKWARD_CLOSED_ARROW:5,BMap_Symbol_SHAPE_FORWARD_CLOSED_ARROW:6,BMap_Symbol_SHAPE_BACKWARD_OPEN_ARROW:7,BMap_Symbol_SHAPE_FORWARD_OPEN_ARROW:8,BMap_Symbol_SHAPE_POINT:9,BMap_Symbol_SHAPE_PLANE:10,BMap_Symbol_SHAPE_CAMERA:11,BMap_Symbol_SHAPE_WARNING:12,BMap_Symbol_SHAPE_SMILE:13,BMap_Symbol_SHAPE_CLOCK:14};function fI(i,e){hQ.call(this);e=e||{};this.style={anchor:e.anchor||new mS(0,0),fillColor:e.fillColor||"#000",fillOpacity:e.fillOpacity||0,scale:e.scale||1,rotation:e.rotation||0,strokeColor:e.strokeColor||"#000",strokeOpacity:e.strokeOpacity===undefined?1:e.strokeOpacity,strokeWeight:e.strokeWeight};this._type=(typeof i==="number")?i:"UserDefined";this._anchor=this.style.anchor;this._originOffset=new mS(0,0);this.anchor=new mS(0,0);this._rawPath=i;this._buildPath(true)}fI.inherits(hQ,"SVGSymbol");fI.generateKey=function(T,i){if(!T){return null}if(parseInt(T)){T=parseInt(T)}if(typeof T==="number"){if(!ic[T]&&![0,1,2,0,4][T]){return null}}var e={anchor:i.anchor||new mS(0,0),fillColor:i.fillColor||"#000",fillOpacity:i.fillOpacity||0,scale:i.scale||1,rotation:i.rotation||0,strokeColor:i.strokeColor||"#000",strokeOpacity:i.strokeOpacity===undefined?1:i.strokeOpacity,strokeWeight:i.strokeWeight};var C=u({path:T,style:e});return"symbol_svg_icon_"+C};ht.extend(fI.prototype,{_buildPath:function(oR){var oL=this;var oN=oL._rawPath;if(parseInt(oN)){oN=parseInt(oN)}if(ic[oN]){oN=ic[oN]}oL.id=fI.generateKey(oN,oL.style);if(!oL.id){return}this._originOffset=new mS(0,0);this._innerOffset=null;this._rotationAngle=0;switch(oN){case dn.BMap_Symbol_SHAPE_CIRCLE:var oO=oL._calSize(2),oM=oO,oW=oL.style.scale,oH=oL._anchor;this.size=new mS(oO,oM);this.anchor=new mS(oO/2+oH.width*oW,oM/2+oH.height*oW);oL.path=dn.BMap_Symbol_SHAPE_CIRCLE;break;case dn.BMap_Symbol_SHAPE_RECTANGLE:var oO=oL._calSize(4),oM=oL._calSize(2),oH=oL._anchor,oT=oL.style.strokeWeight!==undefined?oL.style.strokeWeight:oL.style.scale,oW=oL.style.scale;this.size=new mS(oO,oM);this._originOffset=new mS(Math.floor(-oT/2),Math.floor(-oT/2));this.anchor=new mS(oO/2+oH.width*oW,oM/2+oH.height*oW);oL.path=dn.BMap_Symbol_SHAPE_RECTANGLE;break;case dn.BMap_Symbol_SHAPE_STAR:var oO=oL._calSize(20),oM=oO,oH=oL._anchor,oW=oL.style.scale;this.size=new mS(oO,oM);this.anchor=new mS(oO/2+oH.width*oW,oM/2+oH.height*oW);oL.path=dn.BMap_Symbol_SHAPE_STAR;break;default:var oN=new fF(oN),T=oN.bounds(),oQ=oL.style.rotation*Math.PI/180,oT=oL.style.strokeWeight!==undefined?oL.style.strokeWeight:oL.style.scale,oW=oL.style.scale,oH=oL._anchor;var oV=new mS(Math.floor(T.x1*oW-oT/2),Math.floor(T.y1*oW-oT/2)),e={topleft:new hT(Math.floor(T.x1*oW-oT/2)-oW*oH.width,Math.floor(T.y1*oW-oT/2)-oW*oH.height),bottomleft:new hT(Math.floor(T.x1*oW-oT/2)-oW*oH.width,Math.ceil(T.y2*oW-oT/2)-oW*oH.height),topright:new hT(Math.ceil(T.x2*oW+oT/2)-oW*oH.width,Math.floor(T.y1*oW-oT/2)-oW*oH.height),bottomright:new hT(Math.ceil(T.x2*oW+oT/2)-oW*oH.width,Math.ceil(T.y2*oW+oT/2)-oW*oH.height)},i={},oU=[],oK=[];var oS=e.topleft.x===0?0:Math.atan(e.topleft.y/e.topleft.x),C=oS+oQ;for(var oP in e){var oJ=Math.cos(oQ)*e[oP].x-Math.sin(oQ)*e[oP].y,oI=Math.sin(oQ)*e[oP].x+Math.cos(oQ)*e[oP].y;i[oP]=new hT(oJ,oI);oU.push(oJ);oK.push(oI)}xmax=Math.max.apply(Math,oU),ymax=Math.max.apply(Math,oK),xmin=Math.min.apply(Math,oU),ymin=Math.min.apply(Math,oK);this.size=new mS(Math.ceil(xmax-xmin),Math.ceil(ymax-ymin));this.anchor=new mS(-xmin,-ymin);this._originOffset=new mS(xmin-i.topleft.x,ymin-i.topleft.y);this._innerOffset=new hT(oV.width,oV.height);this._rotationAngle=oQ;oL.path=oN;break}this.imageSize=new mS(this.size.width,this.size.height);this.offset=this.anchor;if(oR){this.resetInitOptions()}},_calSize:function(e){if(this.style.strokeWeight){return e*this.style.scale+this.style.strokeWeight%3+this.style.strokeWeight}else{return e*this.style.scale+this.style.scale+this.style.scale%2}},render:function(C){var oN=this,T=this.style.scale,oO,oP=this.size;var oL=(C&&C.config&&C.config.ratio)||1;if(this.context){oO=this.context;if(this.context.canvas.width/oL!==this.size.width||this.context.canvas.height/oL!==this.size.height){this.context.canvas.width=this.size.width*oL;this.context.canvas.height=this.size.height*oL}oO.clearRect(0,0,this.size.width*oL,this.size.height*oL);oO.fillStyle=kY.convert2rgba(oN.style.fillColor,oN.style.fillOpacity);oO.strokeStyle=kY.convert2rgba(oN.style.strokeColor,oN.style.strokeOpacity);oO.save()}else{return false}oO.scale(oL,oL);oO.lineCap="round";oO.lineJoin="round";oO.lineWidth=oN.style.strokeWeight||T;if(oN._originOffset){oO.translate(-oN._originOffset.width,-oN._originOffset.height)}if(oN._rotationAngle){oO.rotate(oN._rotationAngle)}if(oN._innerOffset){oO.translate(-oN._innerOffset.x,-oN._innerOffset.y)}switch(oN.path){case dn.BMap_Symbol_SHAPE_CIRCLE:oO.arc(oP.width/2,oP.height/2,T,0,2*Math.PI);break;case dn.BMap_Symbol_SHAPE_RECTANGLE:oO.rect(0,0,4*T,2*T);break;case dn.BMap_Symbol_SHAPE_STAR:oO.beginPath();var oI=oP.width/2,oK=T*10;var oH=(2*Math.PI)/10;for(var oJ=11;oJ!=0;oJ--){var e=oK*(oJ%2+1)/2;var oM=oH*oJ;oO.lineTo((e*Math.sin(oM))+oI,(e*Math.cos(oM))+oI)}oO.closePath();break;default:oO.lineWidth=oO.lineWidth/T;oO.scale(T,T);oN.path.draw(oO)}oO.fill();oO.stroke();oO.restore();this.data=oO.getImageData(0,0,this.size.width*oL,this.size.height*oL);return true},setPath:function(e){this._rawPath=e;this._buildPath();this.update()},setAnchor:function(e){if(K.apiVersionIsGL()){this._anchor=this.style.anchor=e;this._buildPath();this.update()}else{if(e instanceof mS){this.anchor=e;this.offset=e}}},setRotation:function(e){this.style.rotation=e;this._buildPath();this.update()},setScale:function(e){this.style.scale=e;this._buildPath();this.update()},setStrokeWeight:function(e){this.style.strokeWeight=e;this._buildPath();this.update()},setStrokeColor:function(e){e=kY.convert2rgba(e,this.style.strokeOpacity);this.style.strokeColor=e;this._buildPath();this.update()},setStrokeOpacity:function(e){this.style.strokeOpacity=e;this._buildPath();this.update()},setFillOpacity:function(e){this.style.fillOpacity=e;this._buildPath();this.update()},setFillColor:function(e){this.style.fillColor=e;this._buildPath();this.update()}});cu.SymbolShapeType=dn;(function(){for(var e in dn){if(dn.hasOwnProperty(e)){window[e]=dn[e]}}})();function nC(oI,T,C){if(!oI||!T){return}this.imageUrl=null;this.imageDom=null;if(typeof oI==="string"){this.imageUrl=oI}else{this.imageDom=oI;if(!this.imageDom.id){this.imageDom.id=cu.getGUID("icon_dom_")}}this.size=T;var oH=new mS(Math.floor(T.width/2),Math.floor(T.height/2));var i={offset:oH,imageOffset:new mS(0,0)};C=C||{};for(var e in C){i[e]=C[e]}if(C.anchor){i.offset=C.anchor}this.anchor=this.offset=i.offset;this.imageOffset=i.imageOffset;this.infoWindowOffset=C.infoWindowOffset||this.offset;if(C.infoWindowAnchor){this.infoWindowOffset=C.infoWindowAnchor}this.printImageUrl=C.printImageUrl||"";this.imageSize=C.imageSize||this.size;this.srcSetObject={};this.setImageSrcset(C.srcset||C.srcSet)}nC.prototype.setImageUrl=function(e){if(!e){return}this.imageUrl=e;this._renderData=null};nC.prototype.getCurrentImageUrl=function(){if(window.devicePixelRatio>1&&this.srcSetObject["2x"]){return this.srcSetObject["2x"]}return this.imageUrl};nC.prototype.setPrintImageUrl=function(e){if(!e){return}this.printImageUrl=e};nC.prototype.setSize=function(e){if(!e){return}this.size=new mS(e.width,e.height);this._renderData=null};nC.prototype.setOffset=function(e){if(!e){return}this.anchor=this.offset=new mS(e.width,e.height);this._renderData=null};nC.prototype.setAnchor=function(e){this.setOffset(e)};nC.prototype.setImageOffset=function(e){if(!e){return}this.imageOffset=new mS(e.width,e.height);this._renderData=null};nC.prototype.setInfoWindowOffset=function(e){if(!e){return}this.infoWindowOffset=new mS(e.width,e.height)};nC.prototype.setInfoWindowAnchor=function(e){this.setInfoWindowOffset(e)};nC.prototype.setImageSize=function(e){if(!e){return}this.imageSize=new mS(e.width,e.height)};nC.prototype.setImageSrcset=function(C){var e="";if(!C){return}for(var i in C){if(C.hasOwnProperty(i)){this.srcSetObject[i]=C[i];e=C[i]+" "+i+","}}this.srcSet=e};nC.prototype.toString=function(){return"Icon"};nC.prototype.generateRenderData=function(oI){var C=this.offset;var e=this.size;var oK=this.imageOffset;var oJ=[];oJ.push(-C.width,C.height-e.height,0);oJ.push(e.width-C.width,C.height-e.height,0);oJ.push(e.width-C.width,C.height,0);oJ.push(-C.width,C.height-e.height,0);oJ.push(e.width-C.width,C.height,0);oJ.push(-C.width,C.height,0);if(oI!==0){for(var oH=0;oH730){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=K.imgPath;this.overlay=null;this._extraMargins=null;var e=this;kg.load("infowindow",function(){e._draw()})}f7.inherits(ht.BaseClass,"InfoWindow");ht.extend(f7.prototype,{_setExtraMargins:function(e){if(e&&e.length===4){this._extraMargins=[e[0],e[1],e[2],e[3]]}else{this._extraMargins=null}},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||""},getContent:function(){return this.content},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(){ht.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},getPositionIn:function(){if(this.overlay&&this.overlay.getPositionIn){return this.overlay.getPositionIn()}if(this.overlay&&this.overlay.getPoint){var e=this.overlay.getPoint();if(!e){return null}if(!K.apiVersionIsGL()){return m5.convertLL2MC(e)}return e}return null},getTitle:function(){return this._config.title||""},getPosition:function(){if(!K.apiVersionIsGL()){if(this.overlay&&this.overlay.getPosition){return this.overlay.getPosition()}}return this.latLng},getPoint:function(){var e=this.getPositionIn();return mX(m5.convertMC2LL(e),this.coordType)},getOffset:function(){return this._config.offset},dispose:function(){ht.BaseClass.prototype.decontrol.call(this)},toString:function(){return"InfoWindow"}});lg.prototype.openInfoWindow=function(oI,e,T){if(!K.apiVersionIsGL()){return this._openInfoWindow30(oI,e)}var oH=e;var C=(T&&T.coordType)||cu.coordType;oH=iK(oH,C);oI.latLng=new dZ(oH.lat,oH.lng);var i=m5.convertLL2MC(oH);this.openInfoWindowIn(oI,i)};lg.prototype._openInfoWindow30=function(T,e){if(!(T instanceof f7)||!e){return}T.latLng=new dZ(e.lat,e.lng);var i=this.temp;if(!i.marker){var C=new nC(K.imgPath+"blank.gif",{width:1,height:1});i.marker=new od(e,{icon:C,offset:new mS(0,0),clickable:false});i.marker._fromMap=1}else{i.marker.setPoint(e)}this.addOverlay(i.marker);i.marker.show();i.marker.openInfoWindow(T)};lg.prototype.closeInfoWindow=function(){var e=this.temp.infoWin||this.temp._infoWin;if(e&&e.overlay){e.overlay.closeInfoWindow()}};lg.prototype.openInfoWindowIn=function(T,e){if(!T||T.toString()!=="InfoWindow"||!e||e.toString()!=="Point"){return}var i=this.temp;if(!i.marker){var C=new nC(K.imgPath+"blank.gif",{width:1,height:1});i.marker=new od(e,{icon:C,width:1,height:1,offset:new mS(0,0),infoWindowOffset:new mS(0,0),clickable:false});i.marker._fromMap=1}else{i.marker.setPoint(e)}this.addOverlay(i.marker);i.marker.show();i.marker.openInfoWindow(T)};g0.prototype.openInfoWindow=function(e){if(this.map){this.map.closeInfoWindow();e._visible=true;this.map.temp._infoWin=e;e.overlay=this;ht.BaseClass.call(e,e.hashCode)}};g0.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 b2(C,i){g0.call(this);this.content=C;this.map=null;this.domElement=null;var T=fo();this._config={width:0,offset:new mS(0,0),styles:{backgroundColor:T.labelBackground,border:"1px solid "+T.labelBorderColor,color:T.labelTextColor,padding:"1px",whiteSpace:"nowrap",fontSize:"12px",zIndex:"80",MozUserSelect:"none"},enableClicking:true,point:null,enableMassClear:true,anchor:0};i=i||{};this.coordType=i.coordType||cu.coordType;this.setConfig(i);if(this._config.width<0){this._config.width=0}this.point=this._config.point;var e=this;kg.load("marker",function(){e._draw()})}b2.inherits(g0,"Label");ht.extend(b2.prototype,{setPoint:function(e){if(e&&e.toString()==="Point"&&!this.getMarker()){this.point=this._config.point=iK(e,this.coordType)}},setContent:function(e){this.content=e},getContent:function(e){return this.content},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 mS(e.width,e.height)},getOffset:function(){return this._config.offset},setStyle:function(e){e=e||{};this._config.styles=ht.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},setAnchor:function(e){this._config.anchor=e!=null?e:0;this.draw()},getAnchor:function(){return this._config.anchor},getPositionIn:function(){var e=this.getPoint?this.getPoint():this.point;if(!e){return null}if(!K.apiVersionIsGL()){return m5.convertLL2MC(e)}return e},setPositionIn:function(e){if(!e){return}if(!K.apiVersionIsGL()){this.setPoint(m5.convertMC2LL(e))}else{this.point=this._config.point=new d7(e.lng,e.lat)}},});function lq(T,C){var oH={};var e=(C&&C.coordType)||cu.coordType;for(var i in C){if(C.hasOwnProperty(i)){if(i==="position"){if(!K.apiVersionIsGL()){oH.point=iK(C[i],e)}else{oH.point=m5.convertLL2MC(iK(C[i],e))}this.latLng=iK(C[i],e)}else{oH[i]=C[i]}}}b2.call(this,T,oH)}lq.inherits(b2,"LabelOut");ht.extend(lq.prototype,{toString:function(){return"Label"},setPosition:function(e){this.latLng=new dZ(e.lat,e.lng);var i;if(!K.apiVersionIsGL()){i=e}else{i=m5.convertLL2MC(e)}this.setPoint(i)},getPosition:function(){return mX(this.latLng,this.coordType)}});function cw(){}ht.extend(cw,{isGeoJSON:function(e){if(!e||typeof e!=="object"){return false}if(e instanceof Array){var i=e[0];if(!i||typeof i!=="object"){return false}return i.type==="Feature"||!!i.geometry}if(e.type==="FeatureCollection"||e.type==="Feature"){return true}return !!(e.type&&e.coordinates)},pick:function(e,oH){if(!this.isGeoJSON(e)){return null}var C=h5.normalize(e);if(!C.length){return null}if(C.length>1){this._warn("GeoJSON 含多个要素,仅使用第一个;如需全部渲染请使用 GeoJSONLayer 或可视化图层")}var i=C[0];var T=null;if(oH==="point"){T=this._pickPoint(i)}else{if(oH==="polygon"){T=this._pickPolygon(i)}else{T=this._pickLine(i)}}if(!T){return null}return{points:T,properties:i.properties,id:i.id}},_pickPoint:function(e){var i=e.coordinates;if(e.type==="Point"){return this._toPoint(i)}if(e.type==="MultiPoint"){if(i.length>1){this._warn("GeoJSON 含多个点,Marker 仅使用第一个")}return this._toPoint(i[0])}this._warn("GeoJSON 几何类型 "+e.type+" 不适用于 Marker");return null},_pickLine:function(i){var e=h5.toLineStrings(i);if(!e.length){this._warn("GeoJSON 几何类型 "+i.type+" 不适用于 Polyline");return null}if(e.length>1){this._warn("GeoJSON 含多条线,Polyline 仅使用第一条")}return this._toPoints(e[0])},_pickPolygon:function(i){var e=h5.toPolygons(i);if(!e.length){this._warn("GeoJSON 几何类型 "+i.type+" 不适用于 Polygon");return null}if(e.length>1){this._warn("GeoJSON 含多个面,Polygon 仅使用第一个")}var C=e[0];if(C.length>1){this._warn("Polygon 覆盖物不支持岛洞,已忽略内环")}return this._toPoints(C[0])},_toPoint:function(e){if(!e||e.length<2){return null}return new d7(e[0],e[1])},_toPoints:function(C){if(!C||!C.length){return null}var e=[];for(var T=0;T1||e<0){return}this._config.fillOpacity=e;this.setDomAttribute("fillopacity",e)},getFillOpacity:function(){return this._config.fillOpacity},setFillColor:function(e){this._config.fillColor=e||"";this.setDomAttribute("fillcolor",e)},getFillColor:function(){return this._config.fillColor},setIcon:function(i){if(!i||!this.map){return}this._config.icon=i;if(this._config.icon){var e=this._config.icon.getCurrentImageUrl();var T=i.getCurrentImageUrl()!==e;this._config.icon=i;this.textureCoord=this.textureCoordGLMap=null;this.draw();var C=new iv("onstatus_change");C.overlay=this;C.action="setIcon";C.imageUrlChanged=T;this.fire(C)}},getIcon:function(){return this._config.icon},setPosition:function(e){this.latLng=new dZ(e.lat,e.lng);var i=m5.convertLL2MC(e);this.setPositionIn(i)},getPosition:function(){var e=this.getPositionIn();return mX(m5.convertMC2LL(e),this.coordType)}});function iH(C,e){mi.call(this,e);this._normalizedBounds=new lx();this.setPoints(C);this._addlog(e);var i=this;kg.load("poly",function(){i._draw()})}iH.inherits(mi,"Polyline");ht.extend(iH.prototype,{_addlog:function(e){var i=1;var C="normal";if(e&&e.strokeTexture){i=2;C="texture"}kS.sendMessage("Polyline","bindtype",C)},getBoundsIn:function(e){if(!e){this._bounds.setMinMax();return this._bounds}this._normalizedBounds.setMinMax();return this._normalizedBounds},setPoints:function(oJ){this._clearCache();this.points=mi.getGraphPoints(oJ).slice(0);if(this._config.geodesic===true){this.greatCirclePoints.length=0;for(var oH=0;oH15437726){if(oI.lng0){ht.each(e.greatCirclePoints,function(i){e._bounds.extend(i)})}else{ht.each(e.points,function(i){e._bounds.extend(i)})}e._normalizedBounds.setSouthWest(e._bounds.getSouthWest());e._normalizedBounds.setNorthEast(e._bounds.getNorthEast());if(e._normalizedBounds.sw.lng<-lg.WORLD_SIZE_MC_HALF||e._normalizedBounds.ne.lng>lg.WORLD_SIZE_MC_HALF){e._normalizedBounds.sw.lng=-lg.WORLD_SIZE_MC_HALF;e._normalizedBounds.ne.lng=lg.WORLD_SIZE_MC_HALF}},calcGreatCirclePoints:function(T,C){var oI=T.latLng;var oH=C.latLng;if(oI.equalsEpsilon(oH,0.00001)){return}var e=m5.getDistance(ml(oI.lng),ml(oI.lat),ml(oH.lng),ml(oH.lat));if(e<250000){return}var oM=Math.round(e/150000);var oQ=this.calcAngularDistance(oI,oH);this.greatCirclePoints.push(T);var oP=oI.lng;var oO=T;for(var oJ=0;oJ30037726){if(oN.lng30037726){if(C.lng0){ht.each(e.greatCirclePoints,function(i){e._bounds.extend(i)})}else{ht.each(e.points,function(i){e._bounds.extend(i)})}e._normalizedBounds.setSouthWest(e._bounds.getSouthWest());e._normalizedBounds.setNorthEast(e._bounds.getNorthEast());if(e._normalizedBounds.sw.lng<-lg.WORLD_SIZE_MC_HALF||e._normalizedBounds.ne.lng>lg.WORLD_SIZE_MC_HALF){e._normalizedBounds.sw.lng=-lg.WORLD_SIZE_MC_HALF;e._normalizedBounds.ne.lng=lg.WORLD_SIZE_MC_HALF}},getPathIn:function(){return this._path},setPathIn:function(e){this._path=e;this.setPoints(e)},getCpsIn:function(){return this._cps},setCpsIn:function(e){this._cps=e;this.setPoints(this._path)},calcBezierPoints:function(T,oI){var C=[];for(var e=0;e0){ht.each(e.greatCirclePoints,function(i){e._bounds.extend(i)})}else{ht.each(e.points,function(i){ht.each(i,function(C){e._bounds.extend(C)})})}e._normalizedBounds.setSouthWest(e._bounds.getSouthWest());e._normalizedBounds.setNorthEast(e._bounds.getNorthEast());if(e._normalizedBounds.sw.lng<-lg.WORLD_SIZE_MC_HALF||e._normalizedBounds.ne.lng>lg.WORLD_SIZE_MC_HALF){e._normalizedBounds.sw.lng=-lg.WORLD_SIZE_MC_HALF;e._normalizedBounds.ne.lng=lg.WORLD_SIZE_MC_HALF}}});function kA(C,e){mi.call(this,e);e=e||{};this.coordType=this.coordType||e.coordType||cu.coordType;if(typeof e.fillOpacity==="number"){this._config.fillOpacity=e.fillOpacity}else{this._config.fillOpacity=0.6}dy(this._config.fillOpacity,0,1);if(e.fillColor===""){this._config.fillColor=""}else{if(e.fillColor){this._config.fillColor=e.fillColor}else{this._config.fillColor=fo().fillColor}}this._parseFillCacheWebGL=[];this.setPoints(C,e);var i=this;kg.load("poly",function(){i._draw()})}kA.inherits(mi,"Polygon");ht.extend(kA.prototype,{setPoints:function(oI){var T=[];if(typeof oI==="string"||oI.length===1||oI[0] instanceof d7||oI[0] instanceof dZ||this instanceof j8||oI.length===0){if(oI.length===1){oI=oI[0]}var e=this._processSinglePointArray(oI);this._userPoints=e.userPoints;T=e.innerPoints;this.hasMultipleParts=false}else{this._userPoints=[];for(var oH=0;oH1&&!innerPoints[0].equals(innerPoints[innerPoints.length-1])){innerPoints.push(new d7(innerPoints[0].lng,innerPoints[0].lat))}return{userPoints:i,innerPoints:innerPoints}},setPointAt:function(C,e,i){var T=i!==undefined&&i!==null;if(!T&&this._userPoints[0]&&this._userPoints[0][C]){T=true;i=0}if((!this._userPoints[C]&&!T)||(T&&!this._userPoints[i]&&!this._userPoints[i][C])){return}this._clearCache();if(T){this._userPoints[i][C]=new d7(e.lng,e.lat);this.points[i][C]=new d7(e.lng,e.lat);if(C===0&&!this.points[i][0].equals(this.points[i][this.points[i].length-1])){this.points[i][this.points[i].length-1]=new d7(e.lng,e.lat)}}else{this._userPoints[C]=new d7(e.lng,e.lat);this.points[C]=new d7(e.lng,e.lat);if(C===0&&!this.points[0].equals(this.points[this.points.length-1])){this.points[this.points.length-1]=new d7(e.lng,e.lat)}}this._calcBounds()},setPositionAt:function(C,e,i){var T=i!==undefined&&i!==null;if(!T&&this._userPoints[0]&&this._userPoints[0][C]){T=true;i=0}if((!this._userPoints[C]&&!T)||(T&&!(this._userPoints[i]&&this._userPoints[i][C]))){return}var oH=m5.convertLL2MC(e);this.setPointAt(C,oH,i)},getPoints:function(){var e=this._userPoints;if(e.length===0){e=this.points}return e},getPathIn:function(){return this.getPoints()}});function mu(C,e){this.coordType=(e&&e.coordType)||cu.coordType;if(!C||C.length===0){return}var i=this.setPath(C,true);kA.call(this,i,e)}mu.inherits(kA,"PolygonOut");ht.extend(mu.prototype,{toString:function(){return"Polygon"},toGeoJSON:function(){var oH="Polygon";var oI=[];var oK=this.getPath();if(this.hasMultipleParts){oH="Multi"+oH;for(var T=0;T1&&!innerPoints[0].equals(innerPoints[innerPoints.length-1])){innerPoints.push(new d7(innerPoints[0].lng,innerPoints[0].lat))}return{userPoints:i,innerPoints:innerPoints}},setPointAt:function(i,e){if(!this._userPoints[i]){return}this._clearCache();this._userPoints[i]=new d7(e.lng,e.lat);this.points[i]=new d7(e.lng,e.lat);if(i===0&&!this.points[0].equals(this.points[this.points.length-1])){this.points[this.points.length-1]=new d7(e.lng,e.lat)}this._calcBounds()},getPoints:function(){var e=this._userPoints;if(e.length===0){e=this.points}return e},getPathIn:function(){return this.getPoints()},setTopFillOpacity:function(e){if(e>1||e<0){return}this._config.topFillOpacity=e;this._setDomAttribute("topfillopacity",e)},getTopFillOpacity:function(){return this._config.topFillOpacity},setSideFillOpacity:function(e){if(e>1||e<0){return}this._config.sideFillOpacity=e;this._setDomAttribute("sidefillopacity",e)},getSideFillOpacity:function(){return this._config.sideFillOpacity},setTopFillColor:function(e){this._config.topFillColor=e||"";this._setDomAttribute("topfillcolor",e)},getTopFillColor:function(){return this._config.topFillColor},setSideFillColor:function(e){this._config.sideFillColor=e||"";this._setDomAttribute("sidefillcolor",e)},getSideFillColor:function(){return this._config.sideFillColor},setAltitude:function(e){this._config.altitude=Number(e);this.draw();var i=new iv("onlineupdate");i.overlay=this;this.dispatchEvent(i)},getAltitude:function(){return this._config.altitude}});function cl(oK,oI,oL){if(!oK||oK.length===0){return}this.userPath=oK;var e=[];if(typeof oK==="string"||oK[0] instanceof d7||oK[0] instanceof dZ){var oM=this._processSinglePointArray(oK);for(var oH=0;oH1||e<0){return}this._config.opacity=e;this.doOnceDraw()},setDisplayOnMinLevel:function(e){this._config.displayOnMinLevel=e;this.doOnceDraw()},getDisplayOnMinLevel:function(){return this._config.displayOnMinLevel},setDisplayOnMaxLevel:function(e){this._config.displayOnMaxLevel=e;this.doOnceDraw()},getDisplayOnMaxLevel:function(){return this._config.displayOnMaxLevel},getOpacity:function(){return this._config.opacity},getImageURL:function(){return this._config.url},setImage:function(e,C){this._config.src=e;this._config.url=e;this._texture=null;var i=this;this.imageLoad&&this.imageLoad(this._config.src,function(T,oH){if(oH){i._texture=T;if(C){i.setBounds(C,true)}i.doOnceDraw()}})},setImageURL:function(e,i){this.setImage(e,i)},setFomular:function(e,i){if(e&&i){this._config.fomularJS=e;this._config.fomularC=i;this.fHashcode=u({str:this._config.fomularC});this.doOnceDraw()}},setIsPixelMap:function(e){this.isPixelMap=e;this.doOnceDraw()},getImagePixel:function(T){if(!this._config.isPixelMap||!this.canPixelMap()){return null}if(!this.getImageMaskPixel(T)){return null}if(this.imageObject){var C=Math.floor((T.lng-this.points[3].lng)/this.lngMC);var e=Math.floor((-T.lat+this.points[3].lat)/this.latMC);var i=Math.floor((e*this.imageObject.width+C)*4);if(C>this.imageObject.width||C<0){return null}if(e>this.imageObject.height||e<0){return null}if(i+3>this.imageObject.data.data.length){return null}return[this.imageObject.data.data[i],this.imageObject.data.data[i+1],this.imageObject.data.data[i+2],this.imageObject.data.data[i+3],]}return null},getValue:function(i){if(this._config.isPixelMap&&i&&this._config.fomularJS){if(!(i instanceof Array)){i=this.getImagePixel(i.point)}var e=this._config.fomularJS({r:i[0],g:i[1],b:i[2],a:i[3]});if(e>=this._config.clamp[0]&&e<=this._config.clamp[1]){return e}}return null},setImageObject:function(C){var e=document.createElement("canvas");e.width=C.width;e.height=C.height;var i=e.getContext("2d");i.drawImage(C,0,0,C.width,C.height);this.imageObject={width:C.width,height:C.height,data:i.getImageData(0,0,C.width,C.height)};this.updatePixelMc();i=null;e=null},updatePixelMc:function(){if(this.imageObject){var e=Math.abs(this.points[2].lng-this.points[0].lng);var i=Math.abs(this.points[2].lat-this.points[0].lat);this.lngMC=e/this.imageObject.width;this.latMC=i/this.imageObject.height}},setMaskImageObject:function(C){var e=document.createElement("canvas");e.width=C.width;e.height=C.height;var i=e.getContext("2d");i.drawImage(C,0,0,C.width,C.height);this.imageMaskObject={width:C.width,height:C.height,data:i.getImageData(0,0,C.width,C.height)};i=null;e=null},getImageMaskPixel:function(e){if(!this.imageMaskObject){return true}var T=this._toOverlayPixelsGL([e]);var oL=this.maskOverlayPixels;var oI=oL[1][0]-oL[0][0];var oH=oL[1][1]-oL[0][1];var C=Math.floor((T[0][0]-oL[0][0])/oI*this.imageMaskObject.width);var i=Math.floor((-T[0][1]+oL[1][1])/oH*this.imageMaskObject.height);var oK=Math.floor((i*this.imageMaskObject.width+C)*4);if(C>this.imageMaskObject.width||C<0){return null}if(i>this.imageMaskObject.height||i<0){return null}var oJ=this.imageMaskObject.data.data;if(oK+3>oJ.length){return false}if(oJ[oK+3]>0){if(this._config.maskData>-1&&this._config.maskData!==oJ[oK]){return false}return true}return false},doOnceDraw:function(){var e=new iv("onlineupdate");e.overlay=this;this.dispatchEvent(e)},destroy:function(){this.points=[];this.imageMaskObject=null}});function iO(T,oN){if(!T){return}oN=oN||{};var oI=[];if(oN.sysType==="fixed"){oI=T}else{if(T instanceof lx){var oK=Math.min(T.sw.lng,T.ne.lng);var oH=Math.max(T.sw.lng,T.ne.lng);var oJ=Math.min(T.sw.lat,T.ne.lat);var C=Math.max(T.sw.lat,T.ne.lat);var oM=[new d7(oK,oJ),new d7(oH,oJ),new d7(oH,C),new d7(oK,C)];var e=mi.getGraphPoints(oM).slice(0);for(var oL=0;oLthis.maxZoom||e||!this.visible){this.hide(true);return false}else{this.show(true);return true}}return false},hide:function(e){if(!e){this.visible=false}this._visible=false;ht.hide(this.domElement)},show:function(e){if(!e){this.visible=true}this._visible=true;ht.show(this.domElement)},draw:function(){if(!this.div||!this.point){return}if(this.nextTick&&this.div.style.position!=="absolute"){this.div.style.opacity=0;setTimeout(function(){this.div.style.opacity=1;this.draw()}.bind(this),0)}if(this.div.children[0]){var oI=this.div.children[0].clientWidth;var e=this.div.children[0].clientHeight;if(!oI&&this.lastClientWidth){oI=this.lastClientWidth;e=this.lastClientHeight}this.lastClientWidth=oI;this.lastClientHeight=e}var T=0;var C=0;var oH=m5.convertLL2MC(this.point);var i=this.map.pointToOverlayPixelIn(oH,{useRound:false});if(!this.useTranslate){T=this.div.children[0]?oI*this.anchors[0]:0;C=this.div.children[0]?e*this.anchors[1]-(this.fixBottom?0:25):0}this.div.style.position="absolute";this.div.style.left=i.x-T+this.offsetX+"px";this.div.style.top=i.y-C+this.offsetY+"px";this.div.style.boxSizing="border-box";if(!this.isDraw()){return}},addEventListener:function(C,oH){if(!this.div||!this.map){return}var i=this;var T=this.map;function e(oL){var oJ=new iv("onclick").inherit(oL);oJ.type=oL.type;var oK=oL.srcElement||oL.target;var oI=oL.clientX||oL.pageX;var oN=oL.clientY||oL.pageY;if(oL&&oJ&&oK&&oI&&oN){var oM=ht.Dom.getOffset(T.container);oJ.pixel=new hT(oI-oM.left,oN-oM.top);oJ.latLng=T.pixelToPoint(oJ.pixel)}return oJ}switch(C){case"mouseover":if(this.div.style){this.div.style.cursor="pointer"}ht.on(this.div,"mouseover",function(oJ){i.div.style.cursor="pointer";var oI=e(oJ);i.dispatchEvent(oI);oH(oI)});break;case"mouseout":ht.on(this.div,"mouseout",function(oJ){var oI=e(oJ);i.dispatchEvent(oI);oH(oI)});break;case"click":if(this.div.style){this.div.style.cursor="pointer"}ht.on(this.div,"click",function(oJ){var oI=e(oJ);i.dispatchEvent(oI);oH(oI)});break;default:break}},setPoint:function(e,oH){if(e instanceof d7){if(!oH){this.div.innerHTML="";this.div.appendChild(this.createDom(this.properties))}this.point=iK(e,this.coordType);if(this.synUpdate){this.map.dispatchEvent(new iv("onrefresh"));return}var T=0;var C=0;if(!this.useTranslate){T=this.div.clientWidth*this.anchors[0];C=this.div.clientHeight*this.anchors[1]-(this.fixBottom?0:25)}var oI=m5.convertLL2MC(this.point);var i=this.map.pointToOverlayPixelIn(oI,{useRound:false});this.div.style.position="absolute";this.div.style.left=i.x-T+this.offsetX+"px";this.div.style.top=i.y-C+this.offsetY+"px"}},setRotation:function(oK){oK=oK+this.rotationInit;while(oK<0){oK+=360}this._rotation=oK%360;var oI=0;var C=this._rotation;if((this._rotation>90&&this._rotation<270)&&this.rotationFlip){oI=180;C-=360}else{oI=0}if(this.rotationFlip){var oM=((this.div.clientWidth||0)*this.anchors[0]||0)-(this._originOpt.offsetY||0)+(this._originOpt.offsetX||0);if(Math.abs(this._rotation-80)<=10||Math.abs(this._rotation-260)<=10){this.offsetX=oM}else{if(Math.abs(this._rotation-100)<=10||Math.abs(this._rotation-280)<=10){this.offsetX=-oM}else{this.offsetX=this._originOpt.offsetX||0}}}var i=this.div.style.transform;const oH=/translate\(([^)]+)/;const oL=i.match(oH);if(oL){const oJ=oL[1].split(",");const T=oJ[0].trim();const e=oJ[1].trim();this.div.style.transform="translate("+T+", "+e+") rotateZ("+C+"deg) rotateX("+oI+"deg)"}else{this.div.style.transform="rotateZ("+C+"deg) rotateX("+oI+"deg)"}},setRotationOrigin:function(e){while(e<0){e+=360}this._rotationOrigin=e%360;this.updateRotation()},updateRotation:function(){if(!this.map||!this.autoFollowHeadingChanged){return}var e=(this._rotationOrigin+this.map.getHeading());this.setRotation(e)},getRotation:function(){return this._rotation},getPoint:function(){return mX(this.point,this.coordType)},setProperties:function(e){if(e instanceof Object){Object.assign(this.properties,e);this.div.innerHTML="";this.div.appendChild(this.createDom(this.properties))}},getProperties:function(){return this.properties},toString:function(){return"CustomOverlay"},_getPixPos:function(C,e){var T=m5.convertLL2MC(this.point);var i=this.map.pointToOverlayPixelIn(T,{zoom:C,center:e,fixPosition:true});return i},});function ii(e){if(typeof kS!=="undefined"&&kS.sendMessage){kS.sendMessage("CanvasLayer")}bv.call(this);this.options=e||{};this.paneName=this.options.paneName||"labelPane";this.zIndex=this.options.zIndex||0;this.contextType=this.options.contextType||"2d";this.enableMassClear=this.options.enableMassClear!==false;this._bindedResize=null}ii.inherits(bv,"CanvasLayer");ii.prototype.initialize=function(T){this._map=T;var i=this.canvas=document.createElement("canvas");var e=this.ctx=this.canvas.getContext(this.contextType);i.style.cssText="position:absolute;left:0;top:0;pointer-events:none;z-index:"+this.zIndex+";";this.adjustSize();this.adjustRatio(e);var oH=T.getPanes()[this.paneName];if(oH){oH.appendChild(i)}var C=this;this._bindedResize=function(){if(!C.canvas||!C._map){return}C.adjustSize();C.adjustRatio(C.ctx);C.draw()};T.addEventListener("resize",this._bindedResize);return this.canvas};ii.prototype.adjustSize=function(){var i=this._map.getSize();var e=this.canvas;e.width=i.width;e.height=i.height;e.style.width=e.width+"px";e.style.height=e.height+"px"};ii.prototype.adjustRatio=function(i){var oH=i.backingStorePixelRatio||i.webkitBackingStorePixelRatio||i.mozBackingStorePixelRatio||i.msBackingStorePixelRatio||i.oBackingStorePixelRatio||i.backingStorePixelRatio||1;var T=(window.devicePixelRatio||1)/oH;var e=i.canvas.width;var C=i.canvas.height;i.canvas.width=e*T;i.canvas.height=C*T;i.canvas.style.width=e+"px";i.canvas.style.height=C+"px";i.scale(T,T)};ii.prototype.draw=function(){if(!this.canvas||!this._map){return}if(this._map._renderType!=="webgl"){this.canvas.style.left=-this._map.offsetX+"px";this.canvas.style.top=-this._map.offsetY+"px"}this.dispatchEvent("draw");this.options.update&&this.options.update.apply(this,arguments)};ii.prototype.remove=function(){if(this._map&&this._bindedResize){this._map.removeEventListener("resize",this._bindedResize);this._bindedResize=null}if(this.canvas&&this.canvas.parentNode){this.canvas.parentNode.removeChild(this.canvas)}this.canvas=null;this.ctx=null;this.domElement=null;this.dispatchEvent(new iv("onremove"))};ii.prototype.getContainer=function(){return this.canvas};ii.prototype.show=function(){if(!this.canvas&&this._map){this._map.addOverlay(this)}if(this.canvas){this.canvas.style.display="block"}};ii.prototype.hide=function(){if(this.canvas){this.canvas.style.display="none"}};ii.prototype.setZIndex=function(e){this.zIndex=e;if(this.canvas){this.canvas.style.zIndex=e}};ii.prototype.getZIndex=function(){return this.zIndex};var aW={};function lB(C,i){ht.BaseClass.call(this);this.content=C;this.map=null;this._config={width:0,height:0,maxWidth:600,offset:new mS(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=K.imgPath;this.overlay=null;var e=this;kg.load("simpleInfowindow",function(){e._draw()})}lB.inherits(ht.BaseClass,"SimpleInfoWindow");ht.extend(lB.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(){ht.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(){ht.BaseClass.prototype.decontrol.call(this)},toString:function(){return"SimpleInfoWindow"}});lg.prototype.openSimpleInfoWindow=function(oH,e){if(!oH||oH.toString()!="SimpleInfoWindow"||!e||e.toString()!="Point"){return}var i=m5.convertLL2MC(e);var C=this.temp;if(!C.marker){var T=new nC(K.imgPath+"blank.gif",{width:1,height:1});C.marker=new od(i,{icon:T,width:1,height:1,offset:new mS(0,0),infoWindowOffset:new mS(0,0),clickable:false});C.marker._fromMap=1}C.marker.setPositionIn(i);this.addOverlay(C.marker);C.marker.show();C.marker.openSimpleInfoWindow(oH)};lg.prototype.closeSimpleInfoWindow=function(){var e=this.temp.infoWin||this.temp._infoWin;if(e&&e.overlay){e.overlay.closeSimpleInfoWindow()}};g0.prototype.openSimpleInfoWindow=function(e){if(this.map){this.map.closeSimpleInfoWindow();e._visible=true;this.map.temp._infoWin=e;e.overlay=this;ht.BaseClass.call(e,e.hashCode)}};g0.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 dK(C,e){mi.call(this,e);e=e||{};this._config.showRegion=e.showRegion||"inside";this._config.isBuildingMask=e.isBuildingMask&&true;this._config.isPoiMask=e.isPoiMask&&true;this._config.isMapMask=e.isMapMask&&true;this._config.path=C;this._parseFillCacheWebGL=[];this.setPoints(C,e);var i=this;kg.load("poly",function(){i._draw()})}dK.inherits(mi,"MapMask");ht.extend(dK.prototype,{setPoints:function(i){var e=mi.getGraphPoints(i).slice(0);this.hasMultipleParts=false;mi.prototype.setPoints.call(this,e)},setPathIn:function(e){this.setPoints(e)},_processSinglePointArray:function(e){var i=mi.getGraphPoints(e).slice(0);innerPoints=i.slice(0);if(innerPoints.length>1&&!innerPoints[0].equals(innerPoints[innerPoints.length-1])){innerPoints.push(new d7(innerPoints[0].lng,innerPoints[0].lat))}return{userPoints:i,innerPoints:innerPoints}},getPoints:function(){var e=this._userPoints;if(e.length===0){e=this.points}return e},getPathIn:function(){return this.getPoints()}});function os(oI,C){if(!oI||oI.length===0){return}var oH=[];if(oI[0] instanceof d7){var e=this._processSinglePointArray(oI);for(var T=0;T=4){mq=window.B_HOST_TILE_BASE_URLS}var oy={B_NORMAL_MAP:{tileUrls:fv(K.tileDomain,K.rasterTilePath),vectorTileUrls:fv(K.tileDomain,K.vectorTilePath),languageTileUrls:function(e){switch(e){case BMAP_LANGUAGE_ZH:return fv(K.tileDomain,K.vectorTilePath);default:if(window._BMapSecurityConfig&&window._BMapSecurityConfig["serviceHost"]){return fv([window._BMapSecurityConfig["serviceHost"]],K.enVectorTilePath)}return fv(K.enTileDomain,K.enVectorTilePath)}},tileSize:256,baseUnits:256,zoomLevelMin:3,zoomLevelMax:19,minDataZoom:3,maxDataZoom:19,minZoom:3,maxZoom:19,webgl:{minZoom:3,maxZoom:25},zoomLevelBase:18,errorUrl:K.imgPath+"bg.png",bounds:new lx(new d7(-21364736,-11708041.66),new d7(23855104,12474104.17)),imgExtend:"png"},B_SATELLITE_MAP:{tileUrls:[K.urlProtocol+"//"+(mq[0]||"apimaponline0.bdimg.com/starpic/?qt=satepc&"),K.urlProtocol+"//"+(mq[0]||"apimaponline1.bdimg.com/starpic/?qt=satepc&"),K.urlProtocol+"//"+(mq[0]||"apimaponline2.bdimg.com/starpic/?qt=satepc&"),K.urlProtocol+"//"+(mq[0]||"apimaponline3.bdimg.com/starpic/?qt=satepc&"),],tileSize:256,baseUnits:256,zoomLevelMin:3,zoomLevelMax:19,minDataZoom:3,maxDataZoom:19,minZoom:3,maxZoom:19,zoomLevelBase:18,errorUrl:K.imgPath+"bg.png",bounds:new lx(new d7(-21364736,-10616832),new d7(23855104,15859712)),imgExtend:"png"},B_STREET_MAP:{tileUrls:fv(K.tileDomain,K.rasterTilePath),tileSize:256,baseUnits:256,zoomLevelMin:3,zoomLevelMax:19,minDataZoom:3,maxDataZoom:19,minZoom:3,maxZoom:19,zoomLevelBase:18,errorUrl:K.imgPath+"bg.png",bounds:new lx(new d7(-21364736,-10616832),new d7(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:K.imgPath+"blank.gif",bounds:new lx(new d7(-21364736,-10616832),new d7(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:K.imgPath+"blank.gif",bounds:new lx(new d7(-21364736,-10616832),new d7(23855104,15859712)),imgExtend:"png"},B_NONE_MAP:{tileUrls:"",tileSize:256,baseUnits:256,zoomLevelMin:3,zoomLevelMax:19,minDataZoom:3,maxDataZoom:19,minZoom:3,maxZoom:19,zoomLevelBase:18,errorUrl:K.imgPath+"bg.png",bounds:new lx(new d7(-21364736,-11708041.66),new d7(23855104,12474104.17)),imgExtend:"png"}};var gy=oy;function ar(e,i,C){this._name=e;this._layers=[];if(i){this._layers=i instanceof kR?[i]:(i.slice?i.slice(0):[i])}C=C||{};this._opts={tips:C.tips||"",labelText:C.labelText||"",minZoom:C.minZoom==null?3:C.minZoom,maxZoom:C.maxZoom==null?19:C.maxZoom,tileSize:C.tileSize==null?256:C.tileSize,textColor:C.textColor||"black",errorImageUrl:C.errorImageUrl||"",bounds:C.bounds||new lx(new d7(-21364736,-16023552),new d7(23855104,19431424)),projection:C.projection||new m5()};if(typeof C.id==="string"){this.id=C.id;this.mapTypeId=C.id;this._config=gy&&gy[C.id]?gy[C.id]:null}if(typeof C.compatType==="string"){this.compatType=C.compatType}}ht.extend(ar.prototype,{getName:function(){return this._name},getTips:function(){return this._opts.tips},getLabelText:function(){return this._opts.labelText},getTileLayer:function(){return this._layers[0]},getTileLayers:function(){return this._layers},getTileSize:function(){return this._opts.tileSize},getMinZoom:function(){return this._opts.minZoom},getMaxZoom:function(){return this._opts.maxZoom},getTextColor:function(){return this._opts.textColor},getProjection:function(){return this._opts.projection},getErrorImageUrl:function(){return this._opts.errorImageUrl}});function mP(oI,C,e,T){var i=gy&&gy[oI]?gy[oI]:null;T=T||{};var oH={id:oI,compatType:T.compatType||"",tips:e||"",labelText:T.labelText||"",minZoom:i&&i.minZoom!=null?i.minZoom:3,maxZoom:i&&i.maxZoom!=null?i.maxZoom:19,tileSize:i&&i.tileSize!=null?i.tileSize:256,errorImageUrl:i&&i.errorUrl?i.errorUrl:"",bounds:i&&i.bounds?i.bounds.clone?i.bounds.clone():i.bounds:undefined,projection:new m5()};return new ar(C,null,oH)}ar.builtin={BMAP_NORMAL_MAP:mP("B_NORMAL_MAP","地图","显示普通地图",{compatType:"BMAP_NORMAL_MAP"}),BMAP_SATELLITE_MAP:mP("B_SATELLITE_MAP","卫星","显示卫星影像",{compatType:"BMAP_SATELLITE_MAP"}),BMAP_HYBRID_MAP:mP("B_SATELLITE_MAP","混合","显示带有街道的卫星影像",{compatType:"BMAP_HYBRID_MAP",labelText:"路网"}),BMAP_EARTH_MAP:mP("B_EARTH_MAP","地球","显示地球",{compatType:"BMAP_EARTH_MAP"}),BMAP_NONE_MAP:mP("B_NONE_MAP","空白","显示空白地图",{compatType:"BMAP_NONE_MAP"})};function eq(oJ,oK,C,e,oI){if(oI&&gy[oI]){this.mapTypeName=oI}else{this.mapTypeName=le}if(oJ&&oJ instanceof Array){var oH=true;for(var T=0;T=gy[this.mapTypeName].webgl.minZoom){if(gy[this.mapTypeName].webgl){if(oK>=gy[this.mapTypeName].webgl.minZoom){this.minZoom=oK}else{this.minZoom=gy[this.mapTypeName].webgl.minZoom}}else{if(oK>=gy[this.mapTypeName].minZoom){this.minZoom=oK}else{this.minZoom=gy[this.mapTypeName].minZoom}}}if(typeof C==="number"){if(gy[this.mapTypeName].webgl){if(C<=gy[this.mapTypeName].webgl.maxZoom){this.maxZoom=C}else{this.maxZoom=gy[this.mapTypeName].webgl.maxZoom}}else{if(C<=gy[this.mapTypeName].maxZoom){this.maxZoom=C}else{this.maxZoom=gy[this.mapTypeName].maxZoom}}}if(this.maxZoomthis.maxZoom){return false}var oI=this.containsPoint(e,oH);if(oI){return oI}for(var C=0;Cthis.maxZoom){return oH}for(var C=0;C0){oN[oJ.name]=oJ;oN.push(oJ.name)}var oR=oN.length-oP.bufferNumber;for(var oS=0;oR>0&&oS0&&this._transparentPng){this.img.src=K.imgPath+"blank.gif"}else{this.img.src=this.src}};lf.prototype._callCbks=function(){var C=this;for(var e=0;e8);function ne(e){this.tileLayers=[];this.map=e;this.bufferNumber=300;this.mapTiles=[];this.bufferTiles=[];this.config=gy[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={}}cu.register(function(i){if(i._renderType==="webgl"){return}var e=i.tileMgr=new ne(i);i.addEventListener("mousewheel",function(C){e.mouseWheel(C)});i.addEventListener("dblclick",function(C){e.dblClick(C)});i.addEventListener("rightdblclick",function(C){e.dblClick(C)});i.addEventListener("minuspress",function(C){e.keypress(C)});i.addEventListener("pluspress",function(C){e.keypress(C)});i.addEventListener("load",function(C){if(this.mapType===cZ){return}e.loadTiles()});i.addEventListener("zoomstartcode",function(C){if(this.mapType===cZ){return}e._zoom(C)});i.addEventListener("moving",function(C){if(this.mapType===cZ){return}e.moveGridTiles()});i.addEventListener("resize",function(C){if(this.mapType===cZ){return}e.resizeMap(C)});i.addEventListener("addtilelayer",function(C){e.addTileLayer(C)});i.addEventListener("removetilelayer",function(C){e.removeTileLayer(C)})});ht.extend(ne.prototype,{addTileLayer:function(T){var C=this;var i=T.target;C.tileLayers.push(i);if(C.map.loaded){C.moveGridTiles()}},removeTileLayer:function(oN){var oO=this;var oL=oN.target;var oJ=oL.mapType;var oI=oO.mapTiles;var oQ=oO.bufferTiles;for(var C in oQ){var T=C.split("-")[1];if(T==oJ){delete oQ[C]}}for(var C in oI){var T=C.split("-")[1];if(T==oJ){delete oI[C]}}if(oO.zoomsDiv&&oO.zoomsDiv.parentNode){oO.zoomsDiv.parentNode.removeChild(oO.zoomsDiv);oO.zoomsDiv.innerHTML=""}var oH=oO.map;if(oH.deepZoom){var oP=oH.deepZoom.preDeepZoomDiv;if(oP&&oP.parentNode){oP.parentNode.removeChild(oP)}}for(var oM=0,oK=oO.tileLayers.length;oM=1.5?2:1;this.normalUdt=ob("ditu","normal").udt;this.numLoading=0;this.numTileLoading=0;this.firstTileLoad=false;this.retry=this.opts.retry||false;this.retryTime=this.opts.retryTime||600;this.useThumbData=false;this.useThumbData=this.opts.useThumbData||false;this.thumbUpsample=this.opts.thumbUpsample||false;this.preciseVertex=this.opts.preciseVertex||false;if(this.baseLayer){this.useThumbData=true}if(typeof this.opts.customLayer==="boolean"){this.customLayer=this.opts.customLayer}else{this.customLayer=true}this.tileLoadFunction=this.opts.tileLoadFunction}kR.inherits(eV,"TileLayer");kR.prototype.isTileLayer=true;ht.extend(kR.prototype,{isTransparentPng:function(){return this.transparentPng},getTilesUrl:function(oO,e){var oN=mF(this.mapType);var C=gy[oN];if(typeof C!=="object"){return null}var T=oO.x;var oP=oO.y;T=hx.calcLoopParam(T,e).col;var i="";if(this.opts.tileUrlTemplate){i=this.opts.tileUrlTemplate;i=i.replace(/\{X\}/,oP);i=i.replace(/\{Y\}/,T);i=i.replace(/\{Z\}/,e)}else{if(oN===le){var oM=this.isCanvasMap?0:1;var oI=C.tileUrls[Math.abs(oP+T)%C.tileUrls.length];if(window.offLineIPAddress){oI=window.offLineIPAddress+"tile5/"}var oH=this.map.config.style;i=oI+"?qt=vtile&x="+T+"&y="+oP+"&z="+e+(oH==="default"?"":("&styleId=1"))+"&styles=pl&udt="+this.normalUdt+"&scaler="+this.scaler+"&showtext="+oM+"&ak="+hh+"&is_has_bmap_proxy="+kZ+"&from=gl";i=i.replace(/-(\d+)/gi,"M$1")}if(oN===j7){var oJ=ob("ditu","satellite");var oL=oJ.ver;var oK=oJ.udt;i=C.tileUrls[Math.abs(oP+T)%C.tileUrls.length]+"u=x="+T+";y="+oP+";z="+e+";v="+oL+";type=sate&fm=46&udt="+oK;i=i.replace(/-(\d+)/gi,"M$1")}}return i},initialize:function(oJ){this.map=oJ;if(oJ._renderType==="webgl"){var oI=null;if(this.customLayer!==false){oI=this.getTilesUrl}ht.extend(this,hO);this.labelProcessor=new m7(this);this.callbackDataQueue=[];if(oI){this.getTilesUrl=oI}var C=this;oJ.on("indoor_data_refresh",function(oK){if(!C.baseLayer){return}C._refreshIndoorData(oK.uid,oK.floor)});oJ.on("custom_labels_ready",function(oK){if(C.mapType!==le&&oK.model==="custom"){return}if((oK.model==="custom")||oK.model==="mvt_"+C.drawIndex){C._doWorkAfterLabelImageLoad(oK.virtualTile,oK.labelCanvas,null,oK.imgKey)}});oJ.on("glmoduleloaded",function(){if(!C.baseLayer){return}C.updateAllIconsTextureCoords()});oJ.on("layer_update",function(oL){if(C.dataType===2&&oJ.customLoaded&&oJ.areaCustomLoaded){var oK=new iv("onlayer_clear");oJ.fire(oK)}});oJ.on("layer_clear",function(oK){if(C.dataType===2){C.clearCache()}});if(this.ontology&&this.ontology._initEvent){this.ontology._initEvent(oJ)}}if(!oJ.temp.layerZIndex){oJ.temp.layerZIndex=0}this.zIndex=this.zIndex||1;if(oJ.getRenderType()==="dom"){this.zIndex=oJ.tileMgr.tileLayers.length}else{if(this.baseLayer){this.zIndex=0}else{if(this.zIndex>0){this.adjustZIndex()}else{var e=oJ._featureMgr.result.bkData;this.zIndex=e.length||1}}}if(!oJ.temp.layid){oJ.temp.layid=0}if(!this.opts.mapType){this.mapType="BMAP_CUSTOM_LAYER_"+oJ.temp.layid;oJ.temp.layid++}else{this.mapType=mF(this.opts.mapType)}var T=gy[this.mapType];if(!T){gy[this.mapType]={tileUrls:[],tileSize:256,baseUnits:256,zoomLevelMin:1,zoomLevelMax:19,minZoom:3,maxZoom:19,minDataZoom:3,maxDataZoom:19,zoomLevelBase:18,errorUrl:K.imgPath+"/blank.gif",bounds:new lx(new d7(-21364736,-10616832),new d7(23855104,15859712)),imgExtend:"png"}}if(oJ._renderType!=="webgl"){var oH=cO(oJ.platform,'
    ');oH.style.display="";oH.style.left=Math.ceil(-oJ.offsetX+oJ.width/2)+"px";oH.style.top=Math.ceil(-oJ.offsetY+oJ.height/2)+"px";this.tilesDiv=oH}this.isCanvasMap=oJ.isCanvasMap();this.lastZoom=oJ.getZoom();var i=this;this.addEventListener("initDrawData",function(oK){if(i.opts.boundary){i.addBoundary(i.opts.boundary)}});oJ.on("destroy",function(){i.destroy()})},clearCache:function(){this.tileCache.clear();this.map._featureMgr.clearData(this.drawIndex);this.map._featureMgr.setLabelData([],this.drawIndex);this.map._featureMgr.clearLabelOverlayData(this.drawIndex);this.labelProcessor.iconCache.clear()},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},adjustZIndex:function(){if(this.map&&this.map._featureMgr){var e=this.map._featureMgr.result.bkData;while(e[this.zIndex]){this.zIndex+=1}}},_getAdjoinZIndex:function(oH){var C=this.zIndex;if(this.map&&this.map._featureMgr){var e=this.map._featureMgr.result.bkData;if(oH==="up"){for(var T=this.zIndex+1;T0;T--){if(e[T]){C=T;break}}}}return C},setZIndex:function(e){this.setTargetZIndex(e)},setTargetZIndex:function(e){this.removeLabel&&this.removeLabel(this.zIndex);this.zIndex=e;this.drawIndex=e;if(this.tilesDiv){this.tilesDiv.style.zIndex=e}},calcLoopParam:function(e,i){return hx.calcLoopParam(e,i)},addBoundary:function(oI){if(!oI||!this.map){return}if(typeof oI==="string"){oI=[oI]}for(var T=0;T-1;oH--){var oI={};C=T.children[oH].style;oI.top=parseInt(C.top,10);oI.left=parseInt(C.left,10);this._zoomAniInfo[oH]=oI}},prepareLabelLayer:function(){var oH=this._map;if(this._enableCanvas2dMap&&oH.canvas2dMapMgr){if(this.touchZoomLabelCanvas){this.touchZoomLabelCanvas.parentNode.removeChild(this.touchZoomLabelCanvas)}var i=oH.canvas2dMapMgr._labelCanvas;this.touchZoomLabelCanvas=i.cloneNode(false);var e=this.touchZoomLabelCanvas.getContext("2d");e.drawImage(i,0,0);oH.platform.insertBefore(this.touchZoomLabelCanvas,oH.platform.firstChild);var T=parseInt(i.style.left,10);var C=parseInt(i.style.top,10);this.touchZoomLabelCanvas.style.zIndex=9;this.touchZoomLabelCanvas.style[this._transformOriginStyleName]=(this._fixPosition.x-(oH.offsetX+T))+"px "+(this._fixPosition.y-(oH.offsetY+C))+"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 T=this._map;if(T.getRenderType()==="dom"){if(T.overlayDiv){T.overlayDiv.style.visibility="hidden"}if(T.overlayDivEx){T.overlayDivEx.style.visibility="hidden"}}var oI=T.tileMgr.tileLayers;var oH;for(var C=0,e=oI.length;C-1;oP--){var oN=this._zoomAniInfo[oP];oO=T.children[oP].style;var oH=oN.left-oK.x;var C=oN.top-oK.y;oN.dx=oH*e-oH;oN.dy=C*e-C;oN.preDx=oH-oH;oN.preDy=C-C;oW=oN.preDx+(oN.dx-oN.preDx);oL=oN.preDy+(oN.dy-oN.preDy)+oM;oO.left=oN.left+oW+"px";oO.top=oN.top+oL+"px";oO.width=oO.height=256*e+"px"}if(this._enableCanvas2dMap){var oV=!oU._isIE9?"translate3d(0px, "+oM+"px, 0) scale("+e+")":"translate(0px, "+oM+"px) scale("+e+")";this.touchZoomLabelCanvas.style[oR]=oV}},setZoomFinish:function(){this._animationDiv=null},startAnimation:function(oJ){this.prepareLayer();this.hideNonAnimationLayers();var o2=this._map;if(this.touchZoomLabelCanvas){this.touchZoomLabelCanvas.style.display="none"}oJ=oJ||{};var o0=oJ.zoomCount||0;var oO=oJ.fixPosition;var oY=oJ.fixMCPosition;var oM=oJ.pixOffset;this._zoomCount=o0;var T=o2.getZoom();var o1=T+o0;var e=o2.config.enableContinuousZoom;var oS=0.5;var oN=5;var C=Math.pow(2,o0);var o4=this._baseLayerDiv;var oP={x:oO.x-parseInt(o4.style.left,10)-o2.offsetX,y:oO.y-parseInt(o4.style.top,10)-o2.offsetY};var oK=this._animationDiv;var oW=oK.children.length;var o6=this._preZoomTimes;var oZ=[];var oX=this._transformStyleName;var oL=this._transformOriginStyleName;for(var oV=oW-1;oV>-1;oV--){var oT={};var oU=oK.children[oV].style;oT.top=parseInt(oU.top,10);oT.left=parseInt(oU.left,10);var oI=oT.left-oP.x;var oH=oT.top-oP.y;oT.dx=oI*C-oI;oT.dy=oH*C-oH;oT.preDx=oI*o6-oI;oT.preDy=oH*o6-oH;oZ[oV]=oT}var o3=this;var oR;var o5;var oQ;this._zoomAni=new ih({fps:60,duration:e?500:1,transition:function(i){i=i*oN/(2*oS);return oN*i-oS*i*i},render:function(pf){pf=pf*(4*oS)/(oN*oN);oR=o6+pf*(C-o6);var o8=T+v(oR);var pd=null;var pc=0;var pg=0;if(oJ.onAnimationBeforeLooping){var ph=oJ.onAnimationBeforeLooping(pf,o8);pd=ph.loopingCenter;pc=ph.yDiff;pg=ph.totalYDiff}for(var o9=oZ.length-1;o9>-1;o9--){var pa=oZ[o9];if(oK.children[o9]){var pe=oK.children[o9].style;o5=pa.preDx+(pa.dx-pa.preDx)*pf-oM.width*pf;oQ=pa.preDy+(pa.dy-pa.preDy)*pf-oM.height*pf+pc;pe.left=pa.left+o5+"px";pe.top=pa.top+oQ+"px";pe.height=pe.width=256*oR+"px"}}var o7=oM.width*pf;var pb=oM.height*pf;if(o2.isRestrict){o3._enableCanvas2dMap&&o3._canvas2dMapMgr.clearLabel()}else{o3._enableCanvas2dMap&&o3._canvas2dMapMgr.drawLabel(oR,oO,T,o1,o0,pf,o7,pb,pg,pc)}o3._preZoomTimes=oR;o3._preRenderTick=pf;oJ.onAnimationLooping&&oJ.onAnimationLooping(pf,o8,pd)},finish:function(){o3._preZoomTimes=1;o3._zoomAni=null;o3._animationDiv=null;oJ.onAnimationFinish&&oJ.onAnimationFinish();o3.showNonAnimationLayers()}});return this._zoomAni},stopAnimation:function(){if(this._zoomAni){this._zoomAni.stop();this._zoomAni=null}}});function oE(e){this._initVars(e);this._initColorCanvas();this._bindEvent(e)}ht.extend(oE.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,C=c8("canvas"),e=C.style;e.width=i+"px";e.height=i+"px";C.width=i;C.height=i;this._colorCvsSize=i;this._colorCvs=C;this._colorCtx=C.getContext("2d")},getLabelImageData:function(oT){var oS=oT.textImg;var C=oT.textPos;var oQ=this.ratio;var oO=this.sizeRatio/oQ;var oH=this._colorCtx;var oL=this._colorCvsSize;oH.clearRect(0,0,oL,oL);var oN=0;var e=0;var oK=0;for(var oM=0;oMoN){oN=C[oM].width;e=oM;oK=C[oM].drawX}}oN/=oO;var oP=0;for(var oM=0,oJ=C.length;oMoN){oN=oR.width/oO}oP+=oR.height/oO+2*oQ}var T=oH.getImageData(0,0,oN,oP);var oI=oH.getImageData(0,0,oN,oP);return[T,oI]},_bindEvent:function(i){var e=this,C=i._map;C.addEventListener("onspotmouseover",function(oJ){if(!this.isCanvasMap()||!this.temp.isPermitSpotOver||this.config.enableIconHighlight===false){return}if(oJ.spots.length>0){var oI=oJ.spots[0].userdata.uid;var oH=oJ.spots[0].userdata.name;var T=e.findLabelByUid(oI,oH);T&&e._toHighLightColor(T)}});C.addEventListener("onspotmouseout",function(oJ){if(!this.isCanvasMap()||!this.temp.isPermitSpotOver){return}if(oJ.spots.length>0){var oI=oJ.spots[0].userdata.uid;var oH=oJ.spots[0].userdata.name;var T=e.findLabelByUid(oI,oH);T&&e._toDefaultColor(T)}});C.addEventListener("onspotclick",function(oJ){if(!this.isCanvasMap()||!this.temp.isPermitSpotOver){return}if(oJ.spots&&oJ.spots.length>0){var oI=oJ.spots[0].userdata.uid;var oH=oJ.spots[0].userdata.name;var T=e.findLabelByUid(oI,oH);T&&e._changeBaseMapState(T)}else{e._recoverNormalState()}});C.on("spot_status_reset",function(){e._recoverNormalState()});C.on("spot_highlight",function(oH){var T=e.findLabelByUid(oH.uid);T&&e._changeBaseMapState(T)})},_getTextBound:function(oR){if(!oR.textPos){return null}var oP=this.ratio;var oN=this.sizeRatio/oP;var C=oR.textPos;var oQ=oR.baseDrawX;var oO=oR.baseDrawY;var oL=oQ*oP+(C[0].drawX-oQ)/oN;var oJ=oO*oP+(C[0].drawY-oO)/oN;var oH=oL+C[0].width/oN;var e=oJ+C[0].height/oN;for(var oM=0,oK=C.length;oMoH){oH=oI+oS.width}if(T+oS.height>e){e=T+oS.height}}return[oL,oJ,oH,e]},_toHighLightColor:function(C){if(C._tempRank&&C._tempRank==this.RANK5){return}var oK=this._getTextBound(C);if(!oK){return}var T=Math.round(oK[0]);var i=Math.round(oK[1]);var e=this.getLabelImageData(C);var oI=e[0];var oH=e[1];var oJ=this._canvas2dMapMgr.getFilterImageData(oI,this.RANK5);C._oldImgData=oH;this._labelCtx.putImageData(oJ,T,i)},_toDefaultColor:function(e){if(e._tempRank&&e._tempRank==this.RANK5){return}if(e._oldImgData){var i=this.sizeRatio;var C=this._getTextBound(e);if(!C){return}this._labelCtx.putImageData(e._oldImgData,Math.round(C[0]),Math.round(C[1]));e._oldImgData=null}},_changeBaseMapState:function(T){var C=this._canvas2dMapMgr;var i=T.guid;var e=T.guidExt;var oH={guid:i,name:T.name,guidExt:e};C._labelStrategy.setStrategyInfo(oH);C._loadData()},_recoverNormalState:function(){var e=this._canvas2dMapMgr;e._labelStrategy.setStrategyInfo(null);e._loadData()},findLabelByUid:function(oI,T){var oK=this._canvas2dMapMgr,e=oK._computedLabel;for(var oH=0,C=e.length;oHpK){pK=pN.drawX+pN.width}if(pN.drawY+pN.height>pJ){pJ=pN.drawY+pN.height}}}}}else{oO.tileX=T;oO.tileY=C;oV=T+oO.minXOriginal;oT=C+oO.minYOriginal;pK=T+oO.maxXOriginal;pJ=C+oO.maxYOriginal}if(oV!=undefined){var pC=pz+(oV-pz)/ps;var pB=py+(oT-py)/ps;var pe=pz+(pK-pz)/ps;var pc=py+(pJ-py)/ps;oO.minX=pC;oO.minY=pB;oO.maxX=pe;oO.maxY=pc;var pG=(pC+pe)/2,pF=(pB+pc)/2,pn=oU+(pG-pD/2)*oY,pl=oS+(pm/2-pF)*oY;oO.geoX=pn;oO.geoY=pl;pg.push(oO)}}}if(pR){for(var pd=0,o9=pR.length;pdpK){pK=o3+pE.width}if(oR+pE.height>pJ){pJ=oR+pE.height}if(oX.length===2){var o2=oX[1];var o0=pz+o2.destX;var oQ=py+o2.destY;if(oQpK){pK=o0+o2.width}if(oQ+o2.height>pJ){pJ=oQ+o2.height}}pv._tempBounds=[oV,oT,pK,pJ];var pk=oP.iconPos;var oJ=pk.geoX;var oH=pk.geoY;var pz=(oJ-oU)/oY+pD/2;var py=(oS-oH)/oY+pm/2;var oV=pz+pk.destX;var oT=py+pk.destY;var pK=oV+pk.width;var pJ=oT+pk.height;oP.textPos=oP.textPos||oP._textPos;var oX=oP.textPos;var pE=oX[0];var o3=pz+pE.destX;var oR=py+pE.destY;if(o3pJ){pJ=oR+pE.height}if(oX.length===2){var o2=oX[1];var o0=pz+o2.destX;var oQ=py+o2.destY;if(o0pJ){pJ=oQ+o2.height}}oP._tempBounds=[oV,oT,pK,pJ]}for(var pd=0,o9=pR.length;pdpP[2]||pL[3]pP[3])){oW++;if(ph.textPos){ph._textPos=ph.textPos;delete ph.textPos}}var pP=pQ._tempBounds;if(!(pL[2]pP[2]||pL[3]pP[3])){oW++;if(pQ.textPos){pQ._textPos=pQ.textPos;delete pQ.textPos}}if(oW>=2){if(pH.textPos){pH._textPos=pH.textPos;delete pH.textPos}}}}for(var pd=0,o9=pR.length;pdpK){pK=pE.drawX+pE.width}if(pE.drawY+pE.height>pJ){pJ=pE.drawY+pE.height}if(oX.length===2){var o2=oX[1];o2.drawX=pz+o2.destX;o2.drawY=py+o2.destY;if(o2.drawXpK){pK=o2.drawX+o2.width}if(o2.drawY+o2.height>pJ){pJ=o2.drawY+o2.height}}}var pC=pz+(oV-pz)/ps;var pB=py+(oT-py)/ps;var pe=pz+(pK-pz)/ps;var pc=py+(pJ-py)/ps;pi.minX=pC;pi.minY=pB;pi.maxX=pe;pi.maxY=pc;var pu=(pC+pe)/2;var pt=(pB+pc)/2;var oK=oU+(pu-pD/2)*oY;var oI=oS+(pm/2-pt)*oY;pi.geoX=oK;pi.geoY=oI;pg.push(pi)}}var pw=this._strategyInfo;if(pw){var pf=pw.guid;var po=pw.name;var o5=pw.guidExt;for(var pd=0,o9=pg.length;pdpj.maxX-pb||pH.maxY-pbpj.maxY-pb)){pH.arrIntersectIndex.push(pa)}}}for(var pd=0,o9=pg.length;pdoL){var C=oJ.splice(0,oI);for(var oM=0,oK=C.length;oM0){this.isDrawText=true}},_loadLabelData:function(oP,oO,oN,C,oQ,e){var oI=oP.toString();var T=oO.toString();var oK="cbk_"+oI.replace("-","_")+"_"+T.replace("-","__")+"_"+Math.floor(oN);var oU=h4+"."+oK;var oT=this._labelDataUrls;var oM=Math.abs(oP+oO)%oT.length;var oZ=oT[oM];if(window.offLineIPAddress){oZ=window.offLineIPAddress+"pvd/"}var i=this.labelStyleParam;var oS="?qt=vtile";var oV="";if(this._map.config.style!=="default"){oV="&styleId=1"}var oR="x={x}&y={y}&z={z}&udt={udt}&v={v}&styles={styles}"+oV+"&textonly=1&textimg=1&scaler={scaler}&fn="+encodeURIComponent(oU);var oW=hx.calcLoopParam(oP,oN).col;var oL=this.ratio>1?2:1;var oJ=oR.replace(/{x}/,oW).replace(/{y}/,oO).replace(/{z}/,Math.floor(oN)).replace(/{styles}/,i).replace(/{udt}/,this._udt).replace(/{v}/,this._version).replace(/{scaler}/,oL);var oH=oZ+oS+"¶m="+window.encodeURIComponent(ho(oJ));var oY=this;var oX=oY._map;cu[oK]=function(o0){oY._vectorDrawLib.parseLabelData(o0,oP,oO,oN,C,oQ,function(o5){var o2=oX.getCenterIn();var o6=oX.getZoom();var o8="viewKey_"+Math.floor(o2.lng)+"_"+Math.floor(o2.lat)+"_"+o6;oY._labelCount--;var o9=oY._getCache(oP,oO,oN,C).updateLabelCounter;oY._labelCount-=o9;var o3=oY._curViewLabels;if(o8===e||(oY._labelCount<0&&o6===oN)){o3.push(o5)}if(o8===e){oY.statResponseCount++}if(oY._labelCount<=0){var o1=(new Date()).getTime();oY.updateLabel();var o4=(new Date()).getTime();var o7=new iv("oncanvasmaploaded");o7.drawTime=o4-o1;if(oY.statResponseCount===oY.statRequestCount){o7.isAllLoadedDrawing=true}oX.dispatchEvent(o7)}oY._setCacheValue(oP,oO,oN,C,o5);delete cu[oK]})};jU.load(oH)},drawLabel:function(C,T,oN,i,oL,oH,e,oI,oM,oJ){var oK=this;if(!oK._computedLabel){return}if(oK._computedLabel._zoom!==oN){oK.clearLabel();return}oK._map.temp.isPermitSpotOver=false;oK.clearLabel();oK._vectorDrawLib.zoomingIconAndText(this._labelCtx,oK._computedLabel,C,T,i,oL,oH,e,oI,oM,oJ)},_addSpotData:function(){this._spotData=[];var oN=this._map.getZoom();for(var oI=0,oH=this._computedLabel.length;oIoN)){continue}var oJ=[];oJ[0]=(oK.minX-oK.maxX)/2;oJ[1]=(oK.minY-oK.maxY)/2;oJ[2]=(oK.maxX-oK.minX)/2;oJ[3]=(oK.maxY-oK.minY)/2;var T=null;if(oK.iconPos){T=new d7(oK.iconPos.geoX,oK.iconPos.geoY)}var C=oK.name?oK.name.replace("\\\\","
    "):"";if(oK.iconPos&&oK.iconPos.iconType.indexOf("ditie")>-1&&this._map.getZoom()>14){C=""}var oM={n:C,pt:new d7(oK.geoX,oK.geoY),userdata:{iconPoint:T,uid:oK.guid,name:C,type:oK.iconPos?oK.iconPos.iconType:"",iconImg:oK.iconImg,mapPoi:true,adver_log:oK.adver_log||""},bd:oJ,tag:"MAP_SPOT_INFO"};this._spotData.push(oM)}var oL=new iv("onspotsdataready");oL.spots=this._spotData;this._map._spotDataOnCanvas=this._spotData;this._map.dispatchEvent(oL)},isClickableLabel:function(e){if(e.isDel||(!e.guid&&!e.name)){return false}return true},getFilterImageData:function(C,oJ){if(this._map&&this._map.config.enableIconHighlight===false){return C}var oK=C.data,oI=this._labelStrategy,oJ=parseInt(oJ);for(var oL=0,oH=oK.length;oL0&&!oO){continue}var oS=Math.round(o1[0]/100);var oR=Math.round(o1[1]/100);var o4={lng:oY+oS,lat:oX-(oV*oL-oR)};var oJ=oS/oL;var oI=oV-oR/oL;var oW=o1[7]||"";var o9=o1[5];var oZ={type:"fixed",name:oW,textImg:oU,rank:o1[4],baseX:oJ,baseY:oI,iconPos:null,textPos:null,guid:o1[3]||"",tracer:o5,direction:o9,startScale:3};if((o9!==m1&&oO||!oO)&&o8!==null){oZ.iconPos=this._getIconPosition(o8,oN,oJ,oI,o4);if(oZ.iconPos){C=oZ.iconPos.width;oT=oZ.iconPos.height}}if(C===0){oZ.direction=m1}if(oO){oZ.textPos=this._getTextDrawData(o1,oJ,oI,C,oT)}if(oZ.textPos||oZ.iconPos){o0.push(oZ)}}}},_isVisible:function(e,i){var T;if(!this._binaryCache[e]){T=e.toString(2);if(T.length<8){T=new Array(8-T.length+1).join("0")+T}this._binaryCache[e]=T}T=this._binaryCache[e];var C=hR[i].start;return T[i-C]==="1"},_getIconPosition:function(oK,oI,C,i,e){var T=this._map.config.style;var oL=cu["iconSetInfo"+T][oK];if(!oL){if(oK.charCodeAt(0)>=48&&oK.charCodeAt(0)<=57){oL=cu["iconSetInfo"+T]["_"+oK]}}if(!oL){return null}var oH=oL[0];var oJ=oL[1];oH=oH*oI;oJ=oJ*oI;return{srcX:0,srcY:0,destX:C-oH/2,destY:i-oJ/2,width:oH,height:oJ,geoX:e.lng,geoY:e.lat,mcPt:e,iconType:oK}},_getTextDrawData:function(oR,oQ,oP,T,oN){var oW=oR[5];if(typeof oW!=="number"){oW=0}var oL=this.ratio;var oK=oL/2;T*=oK;oN*=oK;var oM=oR[12];var oH=oM.length;var oZ=0;var oY=0;var oV=[];var oU=0;var oX=0;for(var oT=0;oT0&&e>0){oV.push({srcX:oI,srcY:i,destX:oZ,destY:oY,width:C,height:e})}}if(oV.length>0){return oV}return null},_getLineLabelInfo:function(oO,T,oH,o3,pg,oV,o1,o0,o2,oU){if(oO.length!==10){return}var o5=this.ratio;var C=this.ratio;var pc=oO[7].length;var oW=oO[1];var pe=oO[3];var pk=oO[8];var oK=oO[4];var e=2;var oI=oK.slice(0,e);for(var ph=e;phoS){oS=po+oJ}if(pn+oM>oR){oR=pn+oM}}oX.push({angle:oQ,srcX:oL,srcY:oN,destX:po,destY:pn,width:oJ,height:oM})}var pd={type:"line",textImg:T,rank:oW,baseX:pa,baseY:o8,arrWordPos:oX,minXOriginal:o6,minYOriginal:o4,maxXOriginal:oS,maxYOriginal:oR,text:""};oU.push(pd)}},alterColor:function(oJ,e,oI){var C=this._colorCtx,i=this._canvas2dMapMgr;C.clearRect(0,0,oJ.width,oJ.height);C.drawImage(e,oJ.srcX,oJ.srcY,oJ.width,oJ.height,0,0,oJ.width,oJ.height);var oH=C.getImageData(0,0,oJ.width,oJ.height),T=i.getFilterImageData(oH,oI);C.putImageData(T,0,0)},drawIconAndText:function(oV,oU,e){var oM=this.ratio;var oK=this.sizeRatio/oM;var oO=2/oM;var o6=this;for(var oY=0,oW=oU.length;oY10&&o1<350){oV.save();var o4=Math.round(o7+o0.width/2);var o3=Math.round(o5+o0.height/2);oV.translate(o4,o3);oV.rotate(-o1/180*Math.PI);oV.drawImage(oS,o0.srcX,o0.srcY,o0.width,o0.height,-Math.round(o0.width/2),-Math.round(o0.height/2),o0.width/oK,o0.height/oK);oV.restore()}else{oV.drawImage(oS,o0.srcX,o0.srcY,o0.width,o0.height,o7,o5,o0.width/oK,o0.height/oK)}}}}}},isCollide:function(oI,oR,oQ,e,oK,C,oM){for(var oH=0,T=C.length;oHoL[1]+oL[3]+oP||oQ+oKoL[2]+oL[4]+oO)){return true}}}return false},zoomingIconAndText:function(o6,o0,T,o4,o5,px,pd,oO,pj,pc,oX){var py=this.ratio;var oP=this.sizeRatio/py;var pz=2/py;var pJ=py/2;var pt=o4.x;var ps=o4.y;var o7=2*py;if(oX!==0){ps+=pc}var oS=undefined,oL=undefined,oI=undefined,oN=undefined,oW=undefined;var pi=px>0?true:false;if(!pi){oS=[];var pm=1-pd}for(var pF=0,pD=o0.length;pF10&&o3<350){var pv=po+pw.width/2;var pu=pn+pw.height/2;var oH=o3/180*Math.PI;var pa=Math.cos(oH);var oT=Math.sin(oH);var pl=pa;var oU=pa;var pk=oT;var oV=-oT;var o2=pv-pv*pa-pu*oT;var e=pu+pv*oT-pu*pa;o6.save();o6.transform(pl,oV,pk,oU,o2,e);o6.drawImage(oJ,pw.srcX,pw.srcY,oN,oW,oL,oI,oN/oP,oW/oP);o6.restore()}else{o6.drawImage(oJ,pw.srcX,pw.srcY,oN,oW,oL,oI,oN/oP,oW/oP)}!pi&&oS.push([pF,oL,oI,oN,oW])}}o6.restore()}}}});function gL(e){this.initVars(e)}ht.extend(gL.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(oI,oM){var oK=this;this.bizData=oI;this.objTextsPng=null;this.arrIconsPng=null;var C=oI.textsPng;var oO=oI.iconsPng;if(!C||!oO){return}var oL=new Image();oL.onload=function(){oK.objTextsPng=this;oK.calcIconAndTextInfo(oM);this.onload=null};oL.src=this.base64Prefix+C;var oN=oO.length;var e=[];for(var oH=0;oHoK.width||i>oK.height)&&(e>oK.width||oO>oK.height)){return false}return true},_setPlatformPosition:function(oN,oM,oP){oP=oP||{};if(oN===0&&oM===0&&!oP.point){return}if(isNaN(oP.initMapOffsetX)){oP.initMapOffsetX=this.offsetX}if(isNaN(oP.initMapOffsetY)){oP.initMapOffsetY=this.offsetY}var oJ=ml(this._heading);if(this._tilt>0){oM=oM/Math.cos(ml(this._tilt))}var oO=oN*Math.cos(oJ)+oM*Math.sin(oJ);var oL=-oN*Math.sin(oJ)+oM*Math.cos(oJ);oO=oO+oP.initMapOffsetX;oL=oL+oP.initMapOffsetY;if(oP.point){var i=this.restrictCenter(oP.point);if(!i.equals(this.centerPoint)){this.centerPoint=i.clone();this.fire(new iv("oncenter_changed"))}}else{var T=this.offsetX-oO;var e=this.offsetY-oL;var oK=this.centerPoint.lng;var oI=this.centerPoint.lat;var oH=new d7(oK,oI);var C=this.getZoomUnits();this.centerPoint=this.restrictCenter(new d7(oH.lng+T*C,oH.lat-e*C),C);this.fire(new iv("oncenter_changed"))}this.offsetX=oO;this.offsetY=oL;this.dispatchEvent(new iv("onmoving"))},restrictCenter:function(oQ,oJ){if(this.config.restrictCenter===false){return oQ}oJ=oJ||this.getZoomUnits();var oN=this.pixelToPointIn(new hT(this.width,0),{center:oQ});var e=this.pixelToPointIn(new hT(0,this.height),{center:oQ});var oP=oQ.lng;var oO=oQ.lat;if(!!this.config.restrictBounds&&!this.config.restrictBounds.isEmpty()){var oS=this.config.restrictBounds;var oK=oS.getSouthWest();var oT=oS.getNorthEast();var oR=m5.convertLL2MC(oK);var oH=m5.convertLL2MC(oT);oQ.lng=this.calcNewLngByBounds(oP,e,oN,oR.lng,oH.lng,oJ);oQ.lat=this.calcNewLatByBounds(oO,e,oN,oR.lat,oH.lat,oJ);return oQ}var T=this.pixelToPointIn(new hT(0,0),{center:oQ});var oL=this.pixelToPointIn(new hT(0,this.height),{center:oQ});if(this.zoomLevel<5){if(T.lat>lg.MAX_LAT&&oL.latlg.MAX_LAT){oQ.lat=lg.MAX_LAT-this.height/2*oJ}else{if(oL.latoI&&e.latoJ&&e.lngoI){oH=oI-this.height/2*e}else{if(T.latC){i=C-this.width/2*e}else{if(oI.lngoN){this._tilt=oN}if(oR){if(this._heading%360!==0||this._tilt>0){var oO=this._webglMapCamera.fromScreenPixelToMC(oK.x,oK.y,{center:T,zoom:this.zoomLevel});if(oO){var oU=oO.sub(oP);var e=T.sub(oU);this.centerPoint=this.restrictCenter(e)}}else{var i=this.getZoomUnits();var e=new d7(oR.lng-i*(oK.x-this.width/2),oR.lat+i*(oK.y-this.height/2));this.centerPoint=this.restrictCenter(e,i)}this.fire(new iv("oncenter_changed"))}this._checkFireZoomend();oI.callback&&oI.callback();return}this._animationInfo.zoom={current:this.zoomLevel,diff:C-this.zoomLevel,target:C};var oT=this;var oH=this._tilt;if(this.fixPoint||oH>lg.MAX_DRAG_TILT_L2){oI.renderCallback=function(){var oY=oT.getCurrentMaxTilt();if(oT._tilt>oY){oT._tilt=oY}var oZ=oT.fixPixel;if(!oT.fixPixel||!oT.fixPoint){return}var oV=oT.fixPixel;var o5=oT.fixPoint;var o2=oT.fixCenter;var o0=oT.mousePosMCPoint;if(oT._heading%360!==0||oT._tilt>0){var oW=oT._webglMapCamera.fromScreenPixelToMC(oV.x,oV.y,{center:o2,zoom:oT.zoomLevel,tilt:oT._tilt});if(oW){var o4=oW.sub(o0);var oX=o2.sub(o4);oT.centerPoint=oT.restrictCenter(oX)}}else{var o1=oV;var o3=oT.getZoomUnits();var oX=new d7(o5.lng-o3*(o1.x-oT.width/2),o5.lat+o3*(o1.y-oT.height/2));oT.centerPoint=oT.restrictCenter(oX,o3)}oT.fire(new iv("oncenter_changed"))}}if(oI.fromMouseWheel===true){this._startInfiniteZoomAnimation(oI);oI.callback&&oI.callback();oT._checkFireZoomend();return}if(!oI.callback){oI.callback=function(){oT._checkFireZoomend()}}else{var oM=oI.callback;oI.callback=function(oV,oW){oM(oV,oW);oT._checkFireZoomend()}}this._startAnimation(oI)},_checkFireZoomend:function(){var e=this;if(e.fireZoomendTimer){clearTimeout(e.fireZoomendTimer)}e.fireZoomendTimer=setTimeout(function(){if(e.zoomEventStatus==="zooming"){e.fire(new iv("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)},flyToIn:function(C,pa,oV){oV=oV||{};var oH=this._getProperZoom(pa);pa=oH.zoom;if(this.centerPoint.equals(C)&&this.zoomLevel===pa&&typeof oV.heading!=="number"&&typeof oV.tilt!=="number"){return}var e=this.getHeading()%360;var oN=this.getTilt();var oT=0;var oX=0;var oQ=this.getBounds().containsPoint(C);if(typeof oV.heading==="number"){oT=oV.heading}else{if(oQ){oT=e}}if(typeof oV.tilt==="number"){oX=oV.tilt}else{if(oQ){oX=oN}}this._heading=e;var o7=oT-e;var o3=oX-oN;var oR=this;var oJ=this.zoomLevel;var oK=1.42;var oZ=this.zoomScale(pa-oJ);var pc=this.getZoomUnits();var oP=this.centerPoint.div(pc);var pd=C.div(pc);var o6=this.worldSize();var o2=oK;var o1=Math.max(this.width,this.height);var o0=o1/oZ;var oO=pd.sub(oP).mag();var i=o2*o2;function o9(pf){var pe=(o0*o0-o1*o1+(pf?-1:1)*i*i*oO*oO)/(2*(pf?o0:o1)*i*oO);return Math.log(Math.sqrt(pe*pe+1)-pe)}function T(pe){return(Math.exp(pe)-Math.exp(-pe))/2}function oL(pe){return(Math.exp(pe)+Math.exp(-pe))/2}function oU(pe){return T(pe)/oL(pe)}var oM=o9(0);var o4=function(pe){return(oL(oM)/oL(oM+o2*pe))};var o5=function(pe){return o1*((oL(oM)*oU(oM+o2*pe)-T(oM))/i)/oO};var oI=(o9(1)-oM)/o2;if(Math.abs(oO)<0.000001||oI===Infinity||isNaN(oI)){if(Math.abs(o1-o0)<0.000001){this._animationInfo.zoom={current:this.zoomLevel,diff:pa-this.zoomLevel};this._animationInfo.center={current:this.centerPoint,diff:C.sub(this.centerPoint)};this._animationInfo.heading={current:e,diff:oT-e};this._animationInfo.tilt={current:oN,diff:oX-oN};this.setLock(true);this._startAnimation({callback:function(pe){oR.setLock(false);if(oV.callback){oV.callback(pe)}},duration:oV.duration});return}var pb=o05){o8=(oI-5)/2+o8}}var oW=oV.duration||1000*oI/o8;if(isNaN(oW)){var oY={};for(var oS in oV){oY[oS]=oV[oS];oY.noAnimation=true}this.centerAndZoomIn(C,pa,oY);return}this.fire(new iv("onmovestart"));this.fire(new iv("onzoomstart"));this.setLock(true);this._startAnimation({duration:oW,renderCallback:function(pe,pf){var pg=pe*oI;var pj=o5(pg);var pi=oJ+oR.scaleZoom(1/o4(pg));if(pioR.getMaxZoom()){pi=oR.getMaxZoom()}if(pi!==oR.zoomLevel){oR.zoomLevel=pi;oR.fire(new iv("onzoom_changed"))}oR.centerPoint=oP.add(pd.sub(oP).mult(pj)).mult(pc);oR.fire(new iv("oncenter_changed"));if(typeof oT==="number"){var ph=pe/0.7;if(ph>1){ph=1}oR.setHeading(e+o7*pe,{noAnimation:true})}if(typeof oX==="number"){oR.setTilt(oN+o3*pe,{noAnimation:true})}},callback:function(pe,pf){oR.setLock(false);if(pf&&pf.stop===true){oR.fire(new iv("onmoveend"));oR.fire(new iv("onzoomend"));oV.callback&&oV.callback(pe);return}if(pa!==oR.zoomLevel){oR.zoomLevel=pa;oR.fire(new iv("onzoom_changed"))}oR.fire(new iv("onmoveend"));oR.fire(new iv("onzoomend"));oV.callback&&oV.callback(pe)}})},zoomScale:function(e){return Math.pow(2,e)},scaleZoom:function(e){return Math.log(e)/Math.LN2},panToIn:function(i,C){C=C||{};if(!i||i.equals(this.centerPoint)){C.callback&&C.callback();return}var T=this.pointToPixelIn(i);var e=Math.round(this.width/2);var oI=Math.round(this.height/2);var oH=this._ifUseAnimation(i,this.zoomLevel);if(C.noAnimation===true||oH===false){this._stopAllAnimations();this._applyHeadingTilt(C);this._panToIn(e-T.x,oI-T.y,i);C.callback&&C.callback();return}this.flyToIn(i,this.zoomLevel,C)},_applyHeadingTilt:function(e){if(!e){return}if(typeof e.heading==="number"&&e.heading!==this._heading){this._setValue("heading",e.heading)}if(typeof e.tilt==="number"&&e.tilt!==this._tilt){this._setValue("tilt",e.tilt)}},_panToIn:function(i,e,T){var C=this.temp;if(C.operating===true){return}if(C.dragAni){C.dragAni.stop(false,{readyToMove:true});C.dragAni=null}this.dispatchEvent(new iv("onmovestart"));this._setPlatformPosition(i,e,{point:T});this.dispatchEvent(new iv("onmoveend"))},_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}},panBy:function(i,e,C){i=Math.round(i)||0;e=Math.round(e)||0;C=C||{};if(!K.apiVersionIsGL()){if(C.noAnimation===undefined&&C.enableAnimation!==undefined){C.noAnimation=!C.enableAnimation}}if(Math.abs(i)<=this.width&&Math.abs(e)<=this.height&&C.noAnimation!==true){this._panBy(i,e,C)}else{this._panToIn(i,e,C.point);C.callback&&C.callback()}},_panBy:function(i,e,oH){if(this.temp.operating===true){return}oH=oH||{};this.dispatchEvent(new iv("onmovestart"));var T=this;var C=T.temp;C.pl=T.offsetX;C.pt=T.offsetY;if(C.tlPan){C.tlPan._options.onStop=null;C.tlPan.cancel()}if(C.dragAni){C.dragAni.stop(false,{readyToMove:true});C.dragAni=null}C.tlPan=new ih({fps:oH.fps||T.config.fps,duration:oH.duration||T.config.actionDuration,transition:oH.transition||jD.easeInOutQuad,render:function(oI){this.terminative=T.temp.operating;if(T.temp.operating){return}T._setPlatformPosition(i*oI,e*oI,{initMapOffsetX:C.pl,initMapOffsetY:C.pt})},finish:function(oI){T.dispatchEvent(new iv("onmoveend"));T.temp.tlPan=false;if(T.temp.stopArrow===true){T.temp.stopArrow=false;if(T.temp.arrow!==0){T._arrow()}}},onStop:function(){T.dispatchEvent(new iv("onmoveend"));T.temp.tlPan=false}})},_startAnimation:function(i){var oH=this._animationInfo;var C=this;i=i||{};if(C._ani){C._ani.stop(!!i.goToEnd,{stopCurrentAnimation:i.stopCurrentAnimation})}if(C._infiniteAni){C._infiniteAni.stop();C._infiniteAni=null}var oI=i.duration||500;var oJ=i.transition||jD.ease;var e=new iv("onanimation_start");this.fire(e);if(i.unstopable){oH=this._animationInfoUnstopable}var T=new ih({duration:oI,transition:oJ,render:function(oM,oL){for(var oK in oH){if(!oH.hasOwnProperty(oK)){continue}var oO=oH[oK].current;var oN=oH[oK].diff;C._setValueTick(oK,oO,oN,oM)}if(i.renderCallback){i.renderCallback(oM,oL)}},finish:function(oK){C.fire(new iv("onanimation_end"));if(i.unstopable){C._animationInfoUnstopable={};C._unstopableAni=null}else{C._ani=null;C._animationInfo={}}if(i.mapNeedCbk){i.mapNeedCbk()}if(i.callback){i.callback(oK)}},onStop:function(oK){oK=oK||{};C.fire(new iv("onanimation_end"));if(oK.stopCurrentAnimation){C._animationInfo={}}C._ani=null;if(i.mapNeedCbk){i.mapNeedCbk()}if(i.callback){i.callback(null,{stop:true})}}});if(i.unstopable){C._unstopableAni=T}else{C._ani=T}},_startInfiniteZoomAnimation:function(e){var i=this;if(i._ani){i._ani.stop(!!e.goToEnd,{stopCurrentAnimation:e.stopCurrentAnimation})}if(i._infiniteAni){return}this.fire(new iv("onanimation_start"));i._infiniteAni=new ih({duration:10000,transition:jD.linear,render:function(){var C=i._animationInfo.zoom;if(Math.abs(C.current-C.target)<0.001){i._setValue("zoom",C.target);i._infiniteAni&&i._infiniteAni.stop();return}C.current+=(C.target-C.current)*0.35;i._setValue("zoom",C.current);if(e.renderCallback){e.renderCallback()}},finish:function(){i._infiniteAni=null;i._animationInfo={};i.fire(new iv("onanimation_end"));if(e.callback){e.callback()}},onStop:function(){i._infiniteAni=null;i._animationInfo={};i.fire(new iv("onanimation_end"));if(e.callback){e.callback()}}})},_setValue:function(e,C){if(e==="zoom"){this._preZoomLevel=this.zoomLevel;var i=this._getProperZoom(C);C=i.zoom;if(C!==this.zoomLevel){this.zoomLevel=C;if(C<5&&!this.config.restrictBounds){this.restrictCenter(this.centerPoint)}this.fire(new iv("on"+e+"_changed"))}return}else{if(e==="center"){this.centerPoint=C}}this["_"+e]=C;this.fire(new iv("on"+e+"_changed"))},_setValueTick:function(e,oH,T,i){if(e==="center"){var C=new d7(oH.lng+T.lng*i,oH.lat+T.lat*i);this._setValue(e,C);return}if(e==="zoom"){this._setValue(e,Math.pow(oH,1-i)*Math.pow(oH+T,i));return}this._setValue(e,oH+T*i)},setHeading:function(T,i){i=i||{};if(T===this._heading){i.callback&&i.callback();return}var C=go(this._heading,360);var e=go(T,360);if(e===C){this._heading=e;i.callback&&i.callback();return}if(e===0&&C>180){e=360}if(i.noAnimation){this._setValue("heading",e);i.callback&&i.callback();return}if(i.unstopable){this._animationInfoUnstopable.heading={current:C,diff:e-C}}else{var oH=e-C;if(Math.abs(e-C)>180){if(oH>0){oH=oH-360}else{oH=oH+360}}this._animationInfo.heading={current:C,diff:oH}}this._startAnimation(i)},resetHeading:function(e){var C=this._heading;while(C<0){C+=360}C=C%360;if(C>180){C-=360}this._heading=C;var T={};if(e){for(var i in e){if(e.hasOwnProperty(i)){T[i]=e[i]}}}T.unstopable=true;this.setHeading(0,T)},getHeading:function(){while(this._heading>360){this._heading-=360}if(this._heading>180){this._heading-=360}return this._heading},setTilt:function(e,i){i=i||{};if(e===this._tilt){i.callback&&i.callback();return}if(e>lg.MAX_TILT){e=lg.MAX_TILT}if(e0){oO=1/Math.sqrt(oO);oR[0]=oQ[0]*oO;oR[1]=oQ[1]*oO}return oR};oM.dot=function(oP,oO){return oP[0]*oO[0]+oP[1]*oO[1]};oM.cross=function(oQ,oP,oO){var oR=oP[0]*oO[1]-oP[1]*oO[0];oQ[0]=oQ[1]=0;oQ[2]=oR;return oQ};oM.lerp=function(oQ,oP,oO,oR){var oT=oP[0],oS=oP[1];oQ[0]=oT+oR*(oO[0]-oT);oQ[1]=oS+oR*(oO[1]-oS);return oQ};oM.random=function(oO,oQ){oQ=oQ||1;var oP=oH()*2*Math.PI;oO[0]=Math.cos(oP)*oQ;oO[1]=Math.sin(oP)*oQ;return oO};oM.transformMat2=function(oR,oQ,oP){var oO=oQ[0],oS=oQ[1];oR[0]=oP[0]*oO+oP[2]*oS;oR[1]=oP[1]*oO+oP[3]*oS;return oR};oM.transformMat2d=function(oR,oQ,oP){var oO=oQ[0],oS=oQ[1];oR[0]=oP[0]*oO+oP[2]*oS+oP[4];oR[1]=oP[1]*oO+oP[3]*oS+oP[5];return oR};oM.transformMat3=function(oR,oQ,oP){var oO=oQ[0],oS=oQ[1];oR[0]=oP[0]*oO+oP[3]*oS+oP[6];oR[1]=oP[1]*oO+oP[4]*oS+oP[7];return oR};oM.transformMat4=function(oR,oQ,oP){var oO=oQ[0],oS=oQ[1];oR[0]=oP[0]*oO+oP[4]*oS+oP[12];oR[1]=oP[1]*oO+oP[5]*oS+oP[13];return oR};oM.rotate=function(oR,oP,oO,oV){var oU=oP[0]-oO[0];var oT=oP[1]-oO[1];var oQ=Math.sin(oV);var oS=Math.cos(oV);oR[0]=oU*oS-oT*oQ+oO[0];oR[1]=oU*oQ+oT*oS+oO[1];return oR};oM.forEach=(function(){var oO=oM.create();return function(oR,oV,oW,oU,oT,oP){var oS,oQ;if(!oV){oV=2}if(!oW){oW=0}if(oU){oQ=Math.min((oU*oV)+oW,oR.length)}else{oQ=oR.length}for(oS=oW;oS0){oO=1/Math.sqrt(oO);oR[0]=oQ[0]*oO;oR[1]=oQ[1]*oO;oR[2]=oQ[2]*oO}return oR};oL.dot=function(oP,oO){return oP[0]*oO[0]+oP[1]*oO[1]+oP[2]*oO[2]};oL.cross=function(oP,oU,oT){var oO=oU[0],oW=oU[1],oV=oU[2],oS=oT[0],oR=oT[1],oQ=oT[2];oP[0]=oW*oQ-oV*oR;oP[1]=oV*oS-oO*oQ;oP[2]=oO*oR-oW*oS;return oP};oL.lerp=function(oQ,oP,oO,oR){var oU=oP[0],oT=oP[1],oS=oP[2];oQ[0]=oU+oR*(oO[0]-oU);oQ[1]=oT+oR*(oO[1]-oT);oQ[2]=oS+oR*(oO[2]-oS);return oQ};oL.random=function(oO,oS){oS=oS||1;var oQ=oH()*2*Math.PI;var oR=(oH()*2)-1;var oP=Math.sqrt(1-oR*oR)*oS;oO[0]=Math.cos(oQ)*oP;oO[1]=Math.sin(oQ)*oP;oO[2]=oR*oS;return oO};oL.transformMat4=function(oR,oQ,oP){var oO=oQ[0],oT=oQ[1],oS=oQ[2];oR[0]=oP[0]*oO+oP[4]*oT+oP[8]*oS+oP[12];oR[1]=oP[1]*oO+oP[5]*oT+oP[9]*oS+oP[13];oR[2]=oP[2]*oO+oP[6]*oT+oP[10]*oS+oP[14];return oR};oL.transformMat3=function(oR,oQ,oP){var oO=oQ[0],oT=oQ[1],oS=oQ[2];oR[0]=oO*oP[0]+oT*oP[3]+oS*oP[6];oR[1]=oO*oP[1]+oT*oP[4]+oS*oP[7];oR[2]=oO*oP[2]+oT*oP[5]+oS*oP[8];return oR};oL.transformQuat=function(oU,o0,oO){var o1=o0[0],oZ=o0[1],oY=o0[2],oW=oO[0],oV=oO[1],oT=oO[2],oX=oO[3],oR=oX*o1+oV*oY-oT*oZ,oQ=oX*oZ+oT*o1-oW*oY,oP=oX*oY+oW*oZ-oV*o1,oS=-oW*o1-oV*oZ-oT*oY;oU[0]=oR*oX+oS*-oW+oQ*-oT-oP*-oV;oU[1]=oQ*oX+oS*-oV+oP*-oW-oR*-oT;oU[2]=oP*oX+oS*-oT+oR*-oV-oQ*-oW;return oU};oL.rotateX=function(oQ,oP,oO,oT){var oS=[],oR=[];oS[0]=oP[0]-oO[0];oS[1]=oP[1]-oO[1];oS[2]=oP[2]-oO[2];oR[0]=oS[0];oR[1]=oS[1]*Math.cos(oT)-oS[2]*Math.sin(oT);oR[2]=oS[1]*Math.sin(oT)+oS[2]*Math.cos(oT);oQ[0]=oR[0]+oO[0];oQ[1]=oR[1]+oO[1];oQ[2]=oR[2]+oO[2];return oQ};oL.rotateY=function(oQ,oP,oO,oT){var oS=[],oR=[];oS[0]=oP[0]-oO[0];oS[1]=oP[1]-oO[1];oS[2]=oP[2]-oO[2];oR[0]=oS[2]*Math.sin(oT)+oS[0]*Math.cos(oT);oR[1]=oS[1];oR[2]=oS[2]*Math.cos(oT)-oS[0]*Math.sin(oT);oQ[0]=oR[0]+oO[0];oQ[1]=oR[1]+oO[1];oQ[2]=oR[2]+oO[2];return oQ};oL.rotateZ=function(oQ,oP,oO,oT){var oS=[],oR=[];oS[0]=oP[0]-oO[0];oS[1]=oP[1]-oO[1];oS[2]=oP[2]-oO[2];oR[0]=oS[0]*Math.cos(oT)-oS[1]*Math.sin(oT);oR[1]=oS[0]*Math.sin(oT)+oS[1]*Math.cos(oT);oR[2]=oS[2];oQ[0]=oR[0]+oO[0];oQ[1]=oR[1]+oO[1];oQ[2]=oR[2]+oO[2];return oQ};oL.forEach=(function(){var oO=oL.create();return function(oR,oV,oW,oU,oT,oP){var oS,oQ;if(!oV){oV=3}if(!oW){oW=0}if(oU){oQ=Math.min((oU*oV)+oW,oR.length)}else{oQ=oR.length}for(oS=oW;oS0){oO=1/Math.sqrt(oO);oS[0]=oR[0]*oO;oS[1]=oR[1]*oO;oS[2]=oR[2]*oO;oS[3]=oR[3]*oO}return oS};oK.dot=function(oP,oO){return oP[0]*oO[0]+oP[1]*oO[1]+oP[2]*oO[2]+oP[3]*oO[3]};oK.lerp=function(oQ,oP,oO,oR){var oU=oP[0],oT=oP[1],oS=oP[2],oV=oP[3];oQ[0]=oU+oR*(oO[0]-oU);oQ[1]=oT+oR*(oO[1]-oT);oQ[2]=oS+oR*(oO[2]-oS);oQ[3]=oV+oR*(oO[3]-oV);return oQ};oK.random=function(oO,oP){oP=oP||1;oO[0]=oH();oO[1]=oH();oO[2]=oH();oO[3]=oH();oK.normalize(oO,oO);oK.scale(oO,oO,oP);return oO};oK.transformMat4=function(oS,oR,oP){var oO=oR[0],oU=oR[1],oT=oR[2],oQ=oR[3];oS[0]=oP[0]*oO+oP[4]*oU+oP[8]*oT+oP[12]*oQ;oS[1]=oP[1]*oO+oP[5]*oU+oP[9]*oT+oP[13]*oQ;oS[2]=oP[2]*oO+oP[6]*oU+oP[10]*oT+oP[14]*oQ;oS[3]=oP[3]*oO+oP[7]*oU+oP[11]*oT+oP[15]*oQ;return oS};oK.transformQuat=function(oU,o0,oO){var o1=o0[0],oZ=o0[1],oY=o0[2],oW=oO[0],oV=oO[1],oT=oO[2],oX=oO[3],oR=oX*o1+oV*oY-oT*oZ,oQ=oX*oZ+oT*o1-oW*oY,oP=oX*oY+oW*oZ-oV*o1,oS=-oW*o1-oV*oZ-oT*oY;oU[0]=oR*oX+oS*-oW+oQ*-oT-oP*-oV;oU[1]=oQ*oX+oS*-oV+oP*-oW-oR*-oT;oU[2]=oP*oX+oS*-oT+oR*-oV-oQ*-oW;return oU};oK.forEach=(function(){var oO=oK.create();return function(oR,oV,oW,oU,oT,oP){var oS,oQ;if(!oV){oV=4}if(!oW){oW=0}if(oU){oQ=Math.min((oU*oV)+oW,oR.length)}else{oQ=oR.length}for(oS=oW;oS=2&&e<=4){this.result.eleData[e][i||0]=C;return}else{if(e===0||e===5||e===6){C.sort(function(oH,T){return oH.overlay.zIndex-T.overlay.zIndex})}}this.result.eleData[e]=C},clearLabelOverlayData:function(e){if(e===undefined){this.result.eleData[2]=[];this.result.eleData[3]=[];this.result.eleData[4]=[]}this.result.eleData[2][e]=[];this.result.eleData[3][e]=[];this.result.eleData[4][e]=[]},clearData:function(T){var e=this.result.bkData;if(typeof T==="number"){if(e[T]){e[T][0]=[];e[T][1]=[];e[T][2]=[]}return}for(var C=0;C0){C[0].sort(function(oH,T){return oH.tileInfo.useZoom-T.tileInfo.useZoom})}}});var jj=(function(){var oQ=new Int8Array(4);var C=new Int32Array(oQ.buffer,0,1);var oL=new Float32Array(oQ.buffer,0,1);function oS(oZ){C[0]=oZ;return oL[0]}function i(oZ){oL[0]=oZ;return C[0]}function oM(oZ){var o1=(oZ[3]<<24|oZ[2]<<16|oZ[1]<<8|oZ[0]);var o0=oS(o1&4278190079);return o0}var oH=0;var oK=1;var oO=2;var oW=0;var oT=1;var oR=2;var oI=9;function oP(oZ,o0){var o1;if(o0%2===0){o1=[-oZ[1],oZ[0]]}else{o1=[oZ[1],-oZ[0]]}return o1}function e(oZ,o0,o1){var o2=oP(oZ,o0);var o3;if(o1===oK){return o2}else{if(o0===4||o0===5){o3=[o2[0]-oZ[0],o2[1]-oZ[1]]}else{o3=[o2[0]+oZ[0],o2[1]+oZ[1]]}if(o1===oH){i3.normalize(o3,o3)}return o3}}function oV(o0,oZ){return Math.sqrt(Math.pow(o0[0]-oZ[0],2)+Math.pow(o0[1]-oZ[1],2))}function T(o3,o2,o1,oZ){var o0=i3.dot(o3,o2);if(o1===oR||o1===oT){if((oZ===0||oZ===1)&&o0>0){return true}else{if((oZ===2||oZ===3)&&o0<0){return true}}}if((oZ===0||oZ===1)&&o0<0){return true}else{if((oZ===2||oZ===3)&&o0>0){return true}}return false}function oN(o0,o5,o7){var o6=oP(o0,o5);var o2;var o4=o0;var o3=o7;var o9=[];i3.normalize(o9,[o4[0]+o3[0],o4[1]+o3[1]]);var o8=i3.dot(o6,[-o9[1],o9[0]]);if(Math.abs(o8)<0.1){o8=1}var o1=1/o8;o2=[-o9[1]*o1,o9[0]*o1];var oZ=i3.dot(o0,o2);if(oZ<0){i3.negate(o2,o2)}return{cos2:oZ,offset:o2}}function oY(o0,o5,o7,oZ){var o6=oP(o0,o5);var o4;var o3;var o2;if(o5===0||o5===1){o4=o7;o3=o0}else{o4=o0;o3=o7}if(!o4||!o3){return o6}var o9=[o4[0]+o3[0],o4[1]+o3[1]];if(o9[0]===0&&o9[1]===0){i3.normalize(o9,o3)}else{i3.normalize(o9,o9)}var pa=T(o9,o6,oZ,o5);if(pa){return o6}var o8=i3.dot(o6,[-o9[1],o9[0]]);if(Math.abs(o8)<0.1){o8=1}var o1=1/o8;o2=[-o9[1]*o1,o9[0]*o1];return o2}function oX(pa,pb,o4,o3,pd,o9,o2,o5,o1,o8){var o7;var o0=0;var oZ=false;o7=o9.length/oI-1;function pc(pe){if(o5 instanceof Array){pe=Math.max(0,Math.min(pe,o5.length-1));return o5[pe]}else{return o5}}oJ(pb[0],pa[0],o4[0],pd,o3,4,pc(0),o1,undefined,o9,o8);o7++;o0++;oJ(pb[0],pa[0],o4[0],pd,o3,5,pc(0),o1,undefined,o9,o8);o7++;o0++;for(var o6=0;o60){o6+=oV(pc[o5],pc[o5-1]);o3.push(o6*10)}if(o5!==pc.length-1){var o2=[pc[o5+1][0]-pc[o5][0],pc[o5+1][1]-pc[o5][1]];var pf=[];if(o2[0]===0&&o2[1]===0){pf=[0,0]}else{i3.normalize(pf,o2)}o9[o9.length]=[pf[0],pf[1]]}}var pe;if(o4[0] instanceof Array){for(var o5=0;o50){this.zoomState=1}else{if(e<0){this.zoomState=-1}}this.lastZoom=i;return this.zoomState},releaseOutViewTileData:function(e){var oH=this.map._workerMgr.releasePendingData(e);for(var T=0,C=oH.length;T=0.5){o4=true}else{if(oP<0.5&&e>=0.5){o4=true}else{if(oP>=0.5&&e<0.5){o4=true}}}if(o4){this.cacheDataCollideLabels(0)}this.LAST_CALC_ZOOM=oN}else{if(this.tileLabels.length>0){this.cacheDataCollideLabels(ht.Browser.ie?50:30)}}},loadVectorLayerData:function(oM){this.map.temp.isPermitSpotOver=false;var oL=this;function oK(i,oP){var oS=oL.tileCache.getData(oP);if(!oS){return}if(!i||i.error){if(i.event){var oO=JSON.parse(i.event.msg||"{}");if(oO.status===403){if(cY.business===0&&cY.unauth===1){oL.watermarkTileKeys.push(oP);oL._checkTilesLoaded()}}cu.fetchDebug&&cu.fetchDebug.sendError({title:i.event.title,msg:i.event.msg,category:cu.fetchDebug.category.AJAX,level:cu.fetchDebug.levels.ERROR,url:i.event.title})}bi=true;if(oL.map.stickySpamCtrl&&cY.business===0&&cY.unauth===1){dX(jA,{from:"vtile"});oL.map.stickySpamCtrl.update(jA)}var oR=new iv("ontileloaderror");i=i||{};oR.error=i.error||"";oR.message=i.message||"";oL.map.fire(oR);if(cY.business!==0||cY.unauth!==1){oS.status="init";oS.reloadTimer=setTimeout(function(){if(oS.retry<3){oS.retry++;oS.status="loading";oL.loadVectorTileData(i.tileInfo,oK)}else{oL.tileCache.removeData(oP);oL._checkTilesLoaded()}},4000)}if(oL.map._featureMgr){oL.map._featureMgr.clearData(oL.drawIndex)}oL.getVectorLayerDataFromCache(oL.curViewTilesInfo,oL.getZoomState());return}if(oS.reloadTimer){clearTimeout(oS.reloadTimer);oS.reloadTimer=null}var oN=oL.map._displayOptions.language||"zh";var oQ=i.tileInfo.language||"zh";if(oQ!==oN){oL.tileCache.removeData(oP);oL._checkTilesLoaded();return}oL.callbackDataQueue.push([i,oP]);if(oL.processDataTimer){return}oL.processDataTimer=setTimeout(function(){while(oL.callbackDataQueue.length>0){var oU=oL.callbackDataQueue.shift();var oV=oL.map._displayOptions.language||"zh";var oW=oU[0].tileInfo.language||"zh";if(oW!==oV){oL.tileCache.removeData(oP)}else{oL.vectorTileDataCbk(oU[0],oU[1])}oL._checkTilesLoaded()}if(oL.map._featureMgr){oL.map._featureMgr.clearData(oL.drawIndex)}oL.getVectorLayerDataFromCache(oL.curViewTilesInfo,oL.getZoomState());var oT=new iv("onrefresh");oT.source="webgllayer";oL.map.dispatchEvent(oT);oL.processDataTimer=null},200)}for(var oJ=0,oH=oM.length;oJ0){var oO=Math.pow(2,oQ);if(Math.floor(oR.col/oO)===oI&&Math.floor(oR.row/oO)===oT){if(!this.thumbCache[oR.key]){this.map._featureMgr.setData(oR.tile,this.drawIndex,1);this.thumbCache[oR.key]=true;oU=true}}}else{if(oQ<0){var oN=Math.pow(2,-oQ);if(Math.floor(oI/oN)===oR.col&&Math.floor(oT/oN)===oR.row){if(!C||oR.zoom>C.zoom){C=oR}}}}}}if(!oJ&&C){var oH=this.getTileKey(T);if(!this.thumbCache[oH]&&this._placeUpsampleThumb(C.tile,C.tile.tileInfo,oH,T)){this.thumbCache[oH]=true;oU=true}}}if(oU){this.map._featureMgr.sortThumbData(this.drawIndex);var oP=this.map._featureMgr.result.bkData[this.drawIndex];if(oP&&oP[1]&&oP[1].length>1){oP[1].sort(function(oV,i){return oV.tileInfo.useZoom-i.tileInfo.useZoom})}}},_recordScreenTiles:function(){var oM=this.map._featureMgr.result.bkData[this.drawIndex];if(!oM){return}var oK={};var oH=0;for(var oN=0;oN<3;oN++){var e=oM[oN];if(!e){continue}for(var T=0;T0){return}this._lastScreenTiles=oK},loadVectorTileData:function(oT,oU){var oH=oT.col;var oI=oT.row;var e=oT.zoom;var oR=oT.baseTileSize;var T=this.getTilesUrl(new hT(oH,oI),e,oR);var oJ=this.map.getPrivateRegions();if(!this.processData&&this.map.getPrivateStatus()&&oJ){var oP=oT.useZoom;var oO=this.tileType.getMercatorSize(oP);var oN=oH*oO;var oM=oI*oO;var oQ=new d7(oN+oO/2,oM+oO/2);var oL=new lx(new d7(oN,oM),new d7(oN+oO,oM+oO));var oK=i8()>=1.5?2:1;for(var oS=0;oS65536){o2.renderData.base.push({type:"line",data:[jj.toTileSolidLineVertices(o8,4000),new Uint16Array(pb)]});o8=[];pb=[]}for(var o1=0;o10){oI=oH.labelProcessor.collisionTest(oI,-1)}}else{if(oJ||oL){if(this._collisionTimer){if(!oJ){clearTimeout(this._collisionTimer)}else{if(Date.now()-oH.lastCollisionTestTime>500){oH.lastCollisionTestTime=Date.now()}else{clearTimeout(this._collisionTimer)}}}this._collisionTimer=setTimeout(function(){if(oH&&!oH.map.tileMgr&&!oH.map.tileMgr.isExitTileLayer(oH)){oH._collisionTimer=null;return}oI=oH.labelProcessor.collisionTest(oH.tileLabels);if(oI){if(oH._isInnerLayer&&oH.map.stencil&&oH.map.stencil.isPoiMask){var oM=oH.isPoiInPolygon(oI);i.setLabelData(oM,oH.drawIndex)}else{i.setLabelData(oI,oH.drawIndex)}}oH.updateLabels();oH.map.dispatchEvent(new iv("onrefresh"));oH._collisionTimer=null},60);return}else{oI=oH.labelProcessor.getCachedLabels(oH.tileLabels)}}if(oI){if(oH._isInnerLayer&&oH.map.stencil&&oH.map.stencil.isPoiMask){var oK=oH.isPoiInPolygon(oI);i.setLabelData(oK,oH.drawIndex)}else{i.setLabelData(oI,oH.drawIndex)}}oH.updateLabels();oH.map.dispatchEvent(new iv("onrefresh"))}if(!C){clearTimeout(oH.cacheLabelTimer);T()}else{if(oH.cacheLabelTimer){return}oH.cacheLabelTimer=setTimeout(function e(){T()},C)}},isPoiInPolygon:function(C){var o2=this;var oQ=o2.map.stencil;var oI=o2.map._featureMgr.result.eleData[9];var oH=[];var T=false;for(var oW=0;oW1){T=true;for(var oT=0;oT0){var T=oI.getZoom();if(C.labelZoom-T<3){this.labelProcessor.updateLabels(C);var e=this.labelProcessor.fixDataFormat(C);i.setOverlayData(e[0],2,this.drawIndex);i.setOverlayData(e[1],3,this.drawIndex);i.setOverlayData(e[2],4,this.drawIndex)}else{i.clearLabelOverlayData(this.drawIndex)}oI.temp.isPermitSpotOver=false;this.labelProcessor.curSpotAdded=false}},loadRasterLayerData:function(oO,T){this.thumbCache={};var oP=this.getZoomState();if(T){var oN=this.useThumbData&&this.thumbUpsample&&this.tileType.getName()==="xyz";var oL=oN?[]:null;for(var oJ=0,oH=oO.length;oJ-1){C+="&ak="+hh+"&is_has_bmap_proxy="+kZ+"&from=gl"}var oI=this.getTileKey(i);this.loadTileImage(C,oI,e,i)},loadTileImage:function(oK,C,oI,e){var T=new Image();T.crossOrigin="anonymous";T.tileInfo=e;var oH;var oJ=this;function oL(){if(oJ.retry){oH&&clearInterval(oH);oH=null}}if(this.retry){var i=1;oH=setInterval(function(){if(i>3){oL();return}if(e.tileLoadFunction){e.tileLoadFunction(T,oK)}else{T.src=oK}i++},this.retryTime)}T.onload=function(){oL();oI&&oI(this,C)};T.onerror=function(){oL();cu.fetchDebug&&cu.fetchDebug.sendError({title:oK,msg:oK,category:cu.fetchDebug.category.RESOURCE,level:cu.fetchDebug.levels.ERROR,url:oK});oI&&oI(null,C)};if(e.tileLoadFunction){e.tileLoadFunction(T,oK)}else{T.src=oK}return T},_calcXYZTileVertex:function(oL,o4,C){var pp=oL.zoom;var oK=oL.col;var oS=oL.row;if(!oL.preciseVertex){return[0,0,C,0,0,o4,0,C,1,0,o4,o4,C,1,1,0,0,C,0,0,o4,o4,C,1,1,0,o4,C,0,1]}var ph=fy.resolutions[Math.floor(pp)];var o5=fy.gridSize;var pm=fy.origin;var oY=Math.pow(2,(18-pp));var pg=pm[0]+oK*o5[0]*ph;var oZ=pm[1]-oS*o5[1]*ph;var o0=pg+o5[0]*ph;var pf=oZ-o5[1]*ph;if(this.reproject){var pk=fy.toEPSG4326([pg,pf]);var pc=fy.toEPSG4326([o0,oZ]);var pi=Math.max(Math.abs(pc[0]-pk[0]),Math.abs(pc[1]-pk[1]));var oJ=Math.max(1,Math.min(16,Math.ceil(pi/0.5)));var o9=oJ+1;var pv=(o0-pg)/oJ,pu=(oZ-pf)/oJ;var oQ=fy.wgs84ToBd09mc(pk[0],pk[1]);var o2=oQ[0]/oY;var o1=oQ[1]/oY;oL._tileLBBdPixel=[o2,o1];var oP=this.reprojectSourceCRS==="EPSG4326";var oI=oP?(pc[0]-pk[0]):0;var po=oP?(pc[1]-pk[1]):0;var oM=o9*o9;var oO=new Float64Array(oM);var oN=new Float64Array(oM);var oU=new Float64Array(oM);var oR=new Float64Array(oM);for(var T=0;T<=oJ;T++){for(var oH=0;oH<=oJ;oH++){var pb=fy.toEPSG4326([pg+pv*oH,pf+pu*T]);var pj=fy.wgs84ToBd09mc(pb[0],pb[1]);var pt=T*o9+oH;oO[pt]=pj[0]/oY-o2;oN[pt]=pj[1]/oY-o1;if(oP){oU[pt]=(pb[0]-pk[0])/oI;oR[pt]=(pb[1]-pk[1])/po}else{oU[pt]=oH/oJ;oR[pt]=T/oJ}}}var ps=oJ*oJ*30;var pr=new Float32Array(ps);var oX=0;for(var o6=0;o60){var oN=T.dataIndex/256;i.renderData={vertexAll:[0,0,this.height,0,0,T.dataIndex,0,this.height,oN-oI,0,T.dataIndex,256,this.height,oN-oI,1,0,0,this.height,0,0,T.dataIndex,256,this.height,oN-oI,1,0,256,this.height,0,1]}}else{var e=-T.dataIndex;var oN=e/256;i.renderData={vertexAll:[e,0,this.height,oN+oI,0,256,0,this.height,1,0,256,256,this.height,1,1,e,0,this.height,oN+oI,0,256,256,this.height,1,1,e,256,this.height,oN+oI,1]}}}else{i.renderData={vertexAll:[0,0,this.height,0,0,256,0,this.height,1,0,256,256,this.height,1,1,0,0,this.height,0,0,256,256,this.height,1,1,0,256,this.height,0,1]}}this.setRasterTileData(oJ,i,oM)}},setRasterTileData:function(oH,e,T){e.status="ready";if(this.thumbUpsample){e.key=oH}this.tileCache.setData(oH,e);if(this.tileType.getName()==="xyz"&&this.useThumbData&&this.thumbUpsample&&this._lastScreenTiles&&e.tileInfo){this._lastScreenTiles[oH]={key:oH,col:e.tileInfo.col,row:e.tileInfo.row,zoom:e.tileInfo.zoom,tile:e}}var C=false;if(this.curViewTilesInfo[T]){e.dataType=jI;e.png8=this.png8||false;this.map._featureMgr.setData(e,this.drawIndex,2);C=true;if(!this.thumbUpsample&&this.tileType.getName()==="xyz"&&this.useThumbData){this._clearThumbDataIfReady()}}if(C){var i=new iv("onrefresh");i.source="webgllayer";this.map.dispatchEvent(i)}},_clearThumbDataIfReady:function(){var e=this.map._featureMgr.result.bkData[this.drawIndex];if(!e){return}if(e[2].length>=this.curViewTilesInfo.length){e[0]=[];e[1]=[]}},_checkLayerTilesLoaded:function(){this.numTileLoading--;if(this.firstTileLoad===false){this.dispatchEvent(new iv("ontilesloadstart"));this.firstTileLoad=true}var e=this;if(this.numTileLoading===0){if(this._checkTileLoadedTimer){clearTimeout(this._checkTileLoadedTimer);this._checkTileLoadedTimer=null}this._checkTileLoadedTimer=setTimeout(function(){if(e.numTileLoading===0){e.dispatchEvent(new iv("ontilesloadend"));e.firstTileLoad=false;if(e.tileType.getName()==="xyz"&&e.useThumbData&&e.map&&e.map._featureMgr){var i=e.map._featureMgr.result.bkData[e.drawIndex];var C=i&&(i[0].length||i[1].length);var T=e.curViewTilesInfo?e.curViewTilesInfo.length:0;if(C&&i[2].length>=T){i[0]=[];i[1]=[]}e.map.dispatchEvent(new iv("onrefresh"))}}e._checkTileLoadedTimer=null},60)}},_checkTilesLoaded:function(){this._checkLayerTilesLoaded();this.numLoading--;if(this.map.firstTileLoad===false){if(K.apiVersionIsGL()){this.map.dispatchEvent(new iv("onfirsttilesloaded"));this.map.dispatchEvent(new iv("onfirsttileloaded"))}else{if(!this.map._firstTileLoadedFired){this.map._firstTileLoadedFired=true;this.map.dispatchEvent(new iv("onfirsttilesloaded"));this.map.dispatchEvent(new iv("onfirsttileloaded"))}}this.map.firstTileLoad=true}var e=this;if(this.numLoading===0){if(this._checkLoadedTimer){clearTimeout(this._checkLoadedTimer);this._checkLoadedTimer=null}this._checkLoadedTimer=setTimeout(function(){if(e.numLoading===0){e.map.dispatchEvent(new iv("ontilesloaded"));e.map.firstTileLoad=false}e._checkLoadedTimer=null},60);if(cY.business===0&&cY.unauth===1){e.shuffleTiles()}}},shuffleTiles:function(){var oJ=this.watermarkTileKeys;for(var oI=oJ.length-1;oI>0;oI--){var oH=Math.floor(Math.random()*(oI+1));var T=oJ[oI];oJ[oI]=oJ[oH];oJ[oH]=T}var C=Math.floor(oJ.length*cY.watermark_ratio);var oK=[];for(var e=0;e9&&!e.guid){return false}if(e.zoom<=9&&!e.name&&!e.guid){return false}return true}};var bx=5;var m1=4;var jB=3;var Z=2;var gK=1;var kP=0;function aX(i){this._ratio=i8();this._iconCache={};this._map=i;this._drawingCanvasPool=[];this._drawingCanvasHeight=4096;this._drawingCanvasWidth=512;this._bufferSpan=[5,5];this._debugContainer=null;var e=this;i.addEventListener("onlanguage_change",function(){e._clearLabelTextCanvas()})}ht.extend(aX.prototype,{_loadIcons:function(C,oM,oI){var T=0;var oJ=this;var oH=this._map.config.style;for(var oK in C){T++;var oL=new Image();oL.id=oK;oL.crossOrigin="anonymous";oL.onload=function(){oJ._iconCache[this.id].loaded=true;T--;if(T===0){oM()}this.onload=null};oL.onerror=function(){oJ._iconCache[this.id]=null;T--;if(T===0){oM()}this.onerror=null};if(!oI){var e=K.getIconSetPath(oH)+oK+".png";var i=cv();if(i&&i.udt){e+="?udt="+i.udt}}else{var e=oK}oL.src=e;this._iconCache[oK]={loaded:false,image:oL}}},_getEmptyDrawingCanvas:function(){for(var C=0;C0){while(oI0){oI=0;while(oI0){oI=0;while(oI0){o0=this._drawEachTypeOfLabels(oT,C,o2,oL,oK,oP,oX);o2=o0.curStyleId;oL=o0.curX;oK=o0.curY;oP=o0.curLineHeight;oY=o0.overHeight||oY}if(!oY&&oU.length>0){o0=this._drawEachTypeOfLabels(oT,oU,o2,oL,oK,oP,oX);o2=o0.curStyleId;oL=o0.curX;oK=o0.curY;oP=o0.curLineHeight;oY=o0.overHeight||oY}if(!oY&&o3>0){var o1=this;this._loadIcons(oR,function(){o0=o1._drawEachTypeOfLabels(oT,oS,o2,oL,oK,oP,oX);o2=o0.curStyleId;oL=o0.curX;oK=o0.curY;oK+=o1._bufferSpan[1];oP=o0.curLineHeight;oY=oY||o0.overHeight;var i=o1._generateEachLabelCanvas(e,oK,oO,oU,C,oZ);T(i[0],i[1])});return}oK+=this._bufferSpan[1];var oM=this._generateEachLabelCanvas(e,oK,oO,oU,C,oZ);T(oM[0],oM[1])},drawCustomLabelsOnCanvas:function(oL,oK,C){if(oL.length===0){oK();return}var oI={};var oH=false;for(var T=0;T0){oK[oH].textPos=null;oK[oH].iconPos=null}continue}this._updateFixedLabelCoords(oK[oH],oI);this._addFixedLabelBounds(oK[oH])}for(var oH=0;oH0){oM[oH].textPos=null;oM[oH].iconPos=null}continue}this._updateFixedLabelCoords(oM[oH],oI);this._addFixedLabelBounds(oM[oH])}for(var oH=0;oH4){pr=4}var pb=[];var oX=[];var o7=0;if(oH&&!oH[pt]){oH[pt]={}}var oR=oS+pr*2+pw[0]*2;var pc=oR;if(oK.containDescendings){pc+=4}if(pr===0){pc+=2}if(oK.textOnIcon){pc=Math.max(pc,oK.iconSize[1])}if(pt!==C||pc>pa){C=pt;if(pe>=10&&pe%10===0){oZ.font=pe*10+" "+oS+"px "+this._map.config.fontFamily}else{oZ.font=oS+"px "+this._map.config.fontFamily}if(pc>pa){var o8=pc-pa;pa+=o8;o0+=o8}if(pr>0){oZ.lineWidth=pr*2;oZ.strokeStyle=oJ}oZ.fillStyle=pl}if(oK.type==="line"){var oM=o9.split("");var o3=[];for(var pv=0;pvthis._drawingCanvasHeight){for(var pu=0;puthis._drawingCanvasWidth){o1=0+this._bufferSpan[0];o0+=pc;o0+=this._bufferSpan[1];pa=pc;if(o0+pc+this._bufferSpan[1]>this._drawingCanvasHeight){for(var pu=0;pu0){T+=pr;pn-=Math.round(pr/2);oZ.strokeText(po,o1,o0)}oZ.fillText(po,o1,o0);var pk=[T,pc];o4=[Math.round(pk[0]/2),Math.round(pk[1]/2)];if(oK.containDescendings){pf=[pn,o0-pc+4]}else{pf=[pn,o0-pc]}oH[pt][po]={displaySize:o4,curWordPosition:pf,totalHeight:o7};o3.push(po);o1+=T}pb.push(o4);oX.push(pf)}o7=Math.round(pb[0][1])}else{if(oH[pt][o9]){var oU=oH[pt][o9];pb=oU.textSize;oX=oU.labelImagePosition;o7=oU.totalHeight}else{var oT=o9.split("\\");if(oT.length>1&&oK.textOnIcon){var px=0;var ps=0;var pA=[];var o5=8;for(var pv=0;pvpx){px=oQ}pA.push(Math.round(oQ/2));ps+=pc}var oN=px+2*o5;var pq=ps+2*o5;if(o1+oN>this._drawingCanvasWidth){o1=0+this._bufferSpan[0];o0+=pa;o0+=this._bufferSpan[1]}var o8=pq-pa;if(o8>0){o0+=o8;pa+=o8}if(o0+this._bufferSpan[1]>this._drawingCanvasHeight){return{overHeight:true,curX:o1,curY:o0-(o8>0?o8:0),curLineHeight:pa-(o8>0?o8:0),styleId:pt}}var pj=o1;var o6=o0-pq;var e=Math.round(oN/2);var oW=this._iconCache[oK.icon].image;this.drawStretchedIcon(oZ,oW,[pj,o6],o5,px,ps);for(var pv=0;pvthis._drawingCanvasWidth&&oT.length==1){oT[pv]=o9.substring(0,Math.floor(o9.length/2));oT[pv+1]=o9.substring(Math.floor(o9.length/2));pv--;continue}var oN=oQ;var oI=0;if(oK.textOnIcon){oI=10;oN+=oI*2;if(oK.styleId===519){oN=oK.iconSize[0];oI=Math.round((oN-oQ)/2)}}if(o1+oN>this._drawingCanvasWidth){var o2=o0+pc+this._bufferSpan[1];if(o2+this._bufferSpan[1]>this._drawingCanvasHeight){return{overHeight:true,curX:o1,curY:o0,curLineHeight:pa,styleId:pt}}o0=o2;o1=0+this._bufferSpan[0];pa=pc}else{if(o0+this._bufferSpan[1]>this._drawingCanvasHeight){return{overHeight:true,curX:o1,curY:o0,curLineHeight:pa,styleId:pt}}}var pj=o1;var o6=o0-pc;var pi=o1;var ph=o0;if(oK.containDescendings){ph-=4}if(oK.textOnIcon){var pd=false;var oW=this._iconCache[oK.icon].image;var pg=oK.iconSize.concat([]);if(oR>=pg[1]){pg[1]=oR;pd=true;pc+=oI*2;var o8=pc-pa;if(o8>0){if(o0+o8+this._bufferSpan[1]>this._drawingCanvasHeight){return{overHeight:true,curX:o1,curY:o0,curLineHeight:pa,styleId:pt}}o0+=o8;pa=pc;ph+=(o8-oI);o6+=(o8-oI*2)}else{ph-=oI;o6-=oI*2}}if(oQ>=pg[0]){pg[0]=oQ}if(oK.styleId===519){oZ.drawImage(oW,0,0,pg[0],pg[1],pj,o6,pg[0],pg[1])}else{if(oK.noStretch){ph-=oR/2;var oY=oQ+oI*2;oZ.drawImage(oW,0,0,oW.width,oW.height,pj,o6,oY,oR)}else{if(pd){this.drawStretchedIcon(oZ,oW,[pj,o6],oI,oQ,pg[1])}else{this.draw3StretchedIcon(oZ,oW,[pj,o6],oI,oQ,pg[1])}}}pi+=oI;if(oK.iconSize[1]>oR){ph-=(oK.iconSize[1]-oR)/2-1;if(oK.containDescendings){ph+=4}}}if(pr>0){if(pt===71028){pc-=2}if(pt===32){pc-=2}oZ.strokeText(o9,pi,ph)}oZ.fillText(o9,pi,ph);var oL=[oN,pc];var o4=[Math.round(oL[0]/2),Math.round(oL[1]/2)];pb.push(o4);oX.push([pj,o6]);o7+=Math.round(o4[1]);o1+=oN}}oH[pt][o9]={textSize:pb,labelImagePosition:oX,totalHeight:o7}}}oK.textSize=pb;oK.labelImagePosition=oX;oK.totalHeight=o7;return{curX:o1,curY:o0,curLineHeight:pa,styleId:pt}},drawStretchedIcon:function(e,C,T,oJ,oK,i){var oI=T[0];var oH=T[1];e.drawImage(C,0,0,oJ,oJ,oI,oH,oJ,oJ);e.drawImage(C,oJ,0,1,oJ,oI+oJ,oH,oK,oJ);e.drawImage(C,C.width-oJ,0,oJ,oJ,oI+oK+oJ,oH,oJ,oJ);e.drawImage(C,0,oJ,oJ,1,oI,oH+oJ,oJ,i);e.drawImage(C,oJ,oJ,1,1,oI+oJ,oH+oJ,oK,i);e.drawImage(C,C.width-oJ,oJ,oJ,1,oI+oK+oJ,oH+oJ,oJ,i);e.drawImage(C,0,C.height-oJ,oJ,oJ,oI,oH+i+oJ,oJ,oJ);e.drawImage(C,oJ,C.height-oJ,1,oJ,oI+oJ,oH+i+oJ,oK,oJ);e.drawImage(C,C.width-oJ,C.height-oJ,oJ,oJ,oI+oK+oJ,oH+i+oJ,oJ,oJ)},draw3StretchedIcon:function(e,i,C,oI,oK,oJ){var oH=C[0];var T=C[1];e.drawImage(i,0,0,oI,i.height,oH,T,oI,i.height);e.drawImage(i,oI,0,1,i.height,oH+oI,T,oK,i.height);e.drawImage(i,i.width-oI,0,oI,i.height,oH+oI+oK,T,oI,i.height)},_updateFixedLabelCoords:function(oH,oW){if(oW===0){return}var oR=[];var o3=[];var o4=0;var oU=oH.totalHeight;var pc=oH.textSize.length;var oI=oH.direction;if(typeof oI!=="number"){oI=0}for(var o5=0;o5C){C=oQ}if(oOe){e=oO}}}if(oM.custom&&oM.style.iconSize&&!oM.name){var oN=oM.style.iconSize;var oP=oM.direction;switch(oP){case m1:oI=-Math.round(oN[0]/2);T=-Math.round(oN[1]/2);C=Math.round(oN[0]/2);e=Math.round(oN[1]/2);break;case Z:oI=-Math.round(oN[0]/2);T=0;C=Math.round(oN[0]/2);e=oN[1];break}}if(oM.textPos){var oJ=oM.textPos["vertex"];for(var oL=0,oH=oJ.length;oLC){C=oQ}if(oOe){e=oO}}}oM.bds=[oI,T,C,e]},_updateLineLabelCoords:function(oY,oN){if(oN===0){return}var T=oY.wordsInfo;var oV=oY.wordCount;if(!oY.labelImagePosition){return}var oP=this._map._displayOptions.isEn;var oQ=oY.labelImagePosition.slice(0);var oZ=oY.textSize.slice(0);if(oY.reverse&&!oP){oQ.reverse();oZ.reverse()}var o8=1000;var o5=1000;var o6=-1000;var o4=-1000;for(var o0=0;o0o6){o6=oX}if(oIo4){o4=oK}}if(!oP){oY.bds=[o8,o5,o6,o4]}}});var iT={0:"00000000",16:"00010000",32:"00100000",48:"00110000",64:"01000000",96:"01100000"};function gu(oI,oK,T){var oH=oI.bds;if(!oH){return false}var oJ=oI.tracer;var C;if(oJ){if(!iT[oJ]){C=oJ.toString(2);if(C.length<8){C=new Array(8-C.length+1).join("0")+C}iT[oJ]=C}C=iT[oJ];var e=oD.mapZoomStartZoomMapping[oK];var oL=oK>20?21:oK;return C[oL-e]==="1"}var i=oI.displayRange;if(T>=i[0]&&T<=i[1]){return true}return false}function m7(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=i8();this._useRound=true;this._sharpenRender=false;if(this._ratio>lg.HIGH_RES_MIN_RATIO){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=new a0((c7()||ht.Browser.ie)?64:128,{clearCallback:function(C){if(C&&C.image){var T=C.image;if(T.onload){T.onload=null}if(T.onerror){T.onerror=null}T.src="";T.remove();C.image=null}}});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()}ht.extend(m7.prototype,{bind:function(){var C=this.map;var i=this;C.addEventListener("mapstatusbusy_inner",function(T){i._mapIsMoving=true;if(i._ratio>lg.HIGH_RES_MIN_RATIO){i._sharpenRender=false}else{i._useRound=false}});C.addEventListener("mapstatusidle_inner",function(T){if(i._ratio>lg.HIGH_RES_MIN_RATIO){i._sharpenRender=true}else{i._useRound=true}i._mapIsMoving=false});C.addEventListener("onspotmouseover",function(oI){if(!this.temp.isPermitSpotOver||this.config.enableIconHighlight===false){return}if(oI.spots.length>0){var oH=oI.spots[0].userdata.uid;var oJ=oI.spots[0].userdata.tilePosStr;var T=i.getLabelByUid(oH,oJ);T&&T.formatedData&&i._toHighlightColor(T.formatedData)}});C.addEventListener("onspotmouseout",function(oI){if(!this.temp.isPermitSpotOver){return}if(oI.spots.length>0){var oH=oI.spots[0].userdata.uid;var oJ=oI.spots[0].userdata.tilePosStr;var T=i.getLabelByUid(oH,oJ);T&&T.formatedData&&i._toDefaultColor(T.formatedData)}});C.addEventListener("spotclick",function(oI){if(oI.spots&&oI.spots.length>0){if(oI.spots[0].userdata.zoom<10){return}var oH=oI.spots[0].userdata.uid;var oJ=oI.spots[0].userdata.tilePosStr;if(i.currentSelectedLabel&&(i.currentSelectedLabel.uid!==oH||i.currentSelectedLabel.tilePosStr!==oJ)){i._recoverNormalState()}var T=i.getLabelByUid(oH,oJ);T&&i._changeBaseMapState(T)}else{i._recoverNormalState()}});C.on("spot_status_reset",function(){i._recoverNormalState()});C.on("spot_highlight",function(oH){var T=i.getLabelByUid(oH.uid,oH.tilePosStr);T&&T.formatedData&&i._toHighlightColor(T.formatedData)});C.addEventListener("mousemove",function(T){if(i.curSpotAdded){return}if(this.currentOperation!==gn.idle||i._mapIsMoving===true){return}i._refreshSpotData();this.temp.isPermitSpotOver=true;i.curSpotAdded=true});if(c7()){function e(){i._refreshSpotData()}C.addEventListener("mapstatusidle_inner",e)}C.on("style_loaded",function(){if(i.map.config.textRenderType==="canvas"&&!i._labelTextCanvas){i._labelTextCanvas=i.map.tileMgr.getLabelTextCanvas()}});C.on("destroy",function(){i.iconCache.clear();for(var T=0;T=0&&pM<45)||(pM>=315&&pM<360)){oW=pE;oV=pD;pS=o4;pR=o2}else{if(pM>=45&&pM<135){oW=pD;oV=-o4;pS=o2;pR=-pE}else{if(pM>=135&&pM<225){oW=-o4;oV=-o2;pS=-pE;pR=-pD}else{if(pM>=225&&pM<315){oW=-o2;oV=pE;pS=-pD;pR=o4}}}}pC._tempBds=[pW+oW,pV+oV,pW+pS,pV+pR];var pK=oX.pixelToPointIn(new hT(pC._tempBds[0],pB.y+oV),{zoom:o9});var pz=oX.pixelToPointIn(new hT(pC._tempBds[2],pB.y+pR),{zoom:o9});pC._mcBds=[pK,pz];ph.push(pC)}}else{for(var pg=0,oZ=pT.length;pg0){pQ=6}pN=oX.getZoom();if(pN>=8&&pN<9){pN<8.5?(pQ=6):(pQ=3)}if(oX._displayOptions.labelMargin>0){pQ=oX._displayOptions.labelMargin}var pu=2;if(pN<6&&pN>=5){pu=-1}for(var px=0,oQ=ph.length;pxpY[2]+pQ+pu||pF[3]+pQ+pupY[3]+pQ+pu)){pP._intersectIdx.push(pn)}}}for(var pv=0,oP=ph.length;pv=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 C=this.getZoomStep();var oI=false;for(var T=0;Te){oO.isDel=true}if(oO.isDel){continue}var oW=oO.pt;var C=(oO.hue||0)?jn(oO.hue):0;var T=oO.iconPos;if(T&&T.texcoord){if(!T.rtVertex){T.rtVertex=[];oX=T.vertex;var oL=mw(oW.lng);var oV=mw(oW.lat);T.rtVertex=[oL[0],oV[0],oL[1],oV[1],0,oX[0],oX[1],0,0,T.texcoord[0],T.texcoord[1],C,oL[0],oV[0],oL[1],oV[1],0,oX[2],oX[3],0,0,T.texcoord[2],T.texcoord[3],C,oL[0],oV[0],oL[1],oV[1],0,oX[4],oX[5],0,0,T.texcoord[4],T.texcoord[5],C,oL[0],oV[0],oL[1],oV[1],0,oX[6],oX[7],0,0,T.texcoord[6],T.texcoord[7],C,oL[0],oV[0],oL[1],oV[1],0,oX[8],oX[9],0,0,T.texcoord[8],T.texcoord[9],C,oL[0],oV[0],oL[1],oV[1],0,oX[10],oX[11],0,0,T.texcoord[10],T.texcoord[11],C]}}if(!oO.textOnIcon){C=0}var oU=oO.textPos;if(oU){if(!oU.rtVertex){oU.rtVertex=[];oX=oU.vertex;var oJ=oU.rtVertex;var oR=mw(oW.lng);var o0=mw(oW.lat);var oZ=mw(oH);for(var oQ=0,oY=oX.length;oQ0&&o1[0]){oW=o1[0].angle||0}var pd=this.calcLoopHeading(oW-o7);if(oJ&&pd>90&&pd<270){o9=180;oV=true}if(!oJ&&pd>45&&pd<315){if(pd>45&&pd<=135){o9=270}else{if(pd>135&&pd<=225){o9=180}else{if(pd>225&&pd<315){o9=90}}}if(oZ>225&&oZ<=315&&o9<=180){oV=true}else{if((oZ>=0&&oZ<=45||oZ>=315&&oZ<360)&&o9>=180){oV=true}}}}if(oJ){if(oR===oV){continue}else{oR=oV}if(oV){o1=oM.reverse_wordsInfo}}for(var pf=0,oS=o1.length;pf-1&&C<14)||C<=13){oP=oQ[oI][3];oN=oQ[oI][4]}var oO=this.calcLineLabelOffsetAndAngle(e,oP,oK,oN,C);var oM=oQ[oI][5];for(var oJ=0;oJ=(oW.length/2-1)){return false}if(oN===-1&&o5<=0){return false}oT=[oW[o5*2],oW[o5*2+1]];oR=[oW[(o5+oN)*2],oW[(o5+oN)*2+1]];o4=oT;return true}var o0=1;for(var o3=oL;oN===1?o3<=oJ:o3>=0;oN===1?o3++:o3--){var o6=e[o3];var oY=o6.size[0]*T;var oU=o6.size[1]*T;while(o0===1){var o7=o2[o5+(oN===1?0:oN)];var o8=oT;if(C.length){var oH=C[C.length-1];o8=oH.mc;var oI=this.calculateAngleDifference(o8,o4,oR);if(oI>0&&oI<90){o0=0;break}}var oK=this.linearEquationAndNextPoint(oT,oR,o4,o8,oQ,oY/2,oP);if(!oK){oP+=oY/2}else{if(oK.length===1){oQ=oK[0];if(!o1()){o0=0;break}}else{oP=0;var oM=[(oK[0]-oX)*i,(oK[1]-oV)*i];o4=[oK[2],oK[3]];C.push(Object.assign({offset:oM,angle:o7,z:0,mc:[oK[0],oK[1]],},o6));oQ=0;break}}}if(o0===0){break}oS++}if(oSC){C=oK}if(Te){e=oH}}return[oJ,oI,C,e]},calcWordsInfoMCBds:function(oX,oO,oP,oM){var i=oX.getHeading();i=this.calcLoopHeading(i);var oN=oX.height;var oQ=oM.pt;var oL=oX.pointToPixelIn(oQ,{zoom:oO,useRound:this._useRound});var oS=oL.x+oP;var oR=oN-oL.y;var T=oM.bds;var oJ=T[0];var oH=T[1];var oI=T[2];var C=T[3];var oW=oJ;var oV=oH;var oU=oI;var oT=C;if((i>=0&&i<45)||(i>=315&&i<360)){oW=oJ;oV=oH;oU=oI;oT=C}else{if(i>=45&&i<135){oW=oH;oV=-oI;oU=C;oT=-oJ}else{if(i>=135&&i<225){oW=-oI;oV=-C;oU=-oJ;oT=-oH}else{if(i>=225&&i<315){oW=-C;oV=oJ;oU=-oH;oT=oI}}}}oM._tempBds=[oS+oW,oR+oV,oS+oU,oR+oT];var oK=oX.pixelToPointIn(new hT(oM._tempBds[0],oL.y+oV),{zoom:oO});var e=oX.pixelToPointIn(new hT(oM._tempBds[2],oL.y+oT),{zoom:oO});oM._mcBds=[oK,e]},calcLoopHeading:function(e){while(e>=360){e-=360}while(e<0){e+=360}return e},fixDataFormat:function(oP){var T=this.fixedLabelData;var e=this.lineLabelData;var C=this.highlightLabelData;var oY=0;var oK=0;var oU=0;var oV;if(this.currentSelectedLabel){var oJ=this.getLabelByUid(this.currentSelectedLabel.guid,this.currentSelectedLabel.tilePosStr);if(!oJ||oJ.isDel){T[oY]=this.currentSelectedLabel.formatedData;oY++;if(this.map.config.enableIconHighlight!==false){C[oU]=this.currentSelectedLabel.formatedData;oU++}}}for(var oT=0;oTT)){continue}var i=oH[e].spot||this._getSpotDataFromLabel(oH[e]);if(i){this._spotData.push(i)}}},_getSpotDataFromLabel:function(C){var oI=this.map;if(!C.bds){return null}var e=C.bds.slice(0);var T=null;if(C.iconPos){T=new d7(C.pt.lng,C.pt.lat)}var i=C.name?C.name.replace("\\\\","
    "):"";if(C.iconPos&&C.iconPos.iconType.indexOf("ditie")>-1&&oI.getZoom()>14){i=""}var oH={n:i,pt:new d7(C.pt.lng,C.pt.lat),userdata:{iconPoint:T,uid:C.guid,name:i,mapPoi:true,type:C.iconPos?C.iconPos.iconType:"",rank:C.rank,zoom:C.zoom,tilePosStr:C.tilePosStr},bd:e,tag:"MAP_SPOT_INFO"};C.spot=oH;return oH},drawLabelsOnCanvas:function(i,e){if(this._labelTextCanvas){this._labelTextCanvas.drawLabelsOnCanvas(i,e)}}});function mZ(e){this._map=e;this.virtualTiles={};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._task={};this.init()}mZ.prototype.init=function(){var C=this._map;var i=this;function e(T){i.updateLabels(T)}C.addEventListener("add_tile_labels",e);C.addEventListener("onremove_tile_labels",e);C.addEventListener("onclear_labels",e);C.addEventListener("onlayer_clear",e)};mZ.prototype.updateLabels=function(oJ){var oN=this._map.tileMgr.getLabelTextCanvas();var C=this._map;var oL=this;var oK=eP();if(oJ&&oJ.model==="mvt"){var oP=oJ.data;var oO="mvt_"+oJ.index;if(!this._task[oO]){this._task[oO]=[oK]}else{this._task[oO].push(oK)}}else{var oP=C._customTileLabels;var oO="custom";if(!this._task[oO]){this._task[oO]=[oK]}else{this._task[oO].push(oK)}}var oI=JSON.parse(JSON.stringify(oP));for(var oH=0;oH2){e=2}this._workerNum=e;this.arrWorker=[];this.ratio=i8();this.wordSpaceRatio=this.ratio;this.textSizeRatio=hO.devicePixelRatio>1?2:1;if(typeof this.map.config.style==="string"){this.stringifiedCustomStyleInfo=null;this.stringifiedCustomStyleInfoZoom=[];this.stringifiedAreaStyleInfo=null}h6.canUseWebAssembly(function(T){var oK;if(T){oK=(window.location.protocol === "http:" ? "http:" : "https:") + "//api.map.baidu.com/res/webgl/10/worker_wasm_g0l1oe.js"}else{oK=(window.location.protocol === "http:" ? "http:" : "https:") + "//api.map.baidu.com/res/webgl/10/worker_asm_3u43mq.js"}i._onWorkerMessage=function oI(oO){if(oO.data&&oO.data.action==="wasm_alloc_failed"){i._fallbackToAsm();return}if(oO.data){this._cbk&&this._cbk(oO.data,this._parsingTileKey)}else{this._cbk&&this._cbk(null,this._parsingTileKey)}this._isBusy=false;this._cbk=null;this._parsingTileInfo=null;this._parsingTileKey=null;if(i.arrPendingData.length>0){var oQ=i.arrPendingData.shift();var oN=oQ.cbk;i.loadTileData(oQ.url,oQ.tileInfo,oQ.tileKey,oN)}var oP=new iv("onrefresh");oP.source="workermgr";C.fire(oP)};for(var oJ=0;oJ0){for(var oH=0;oH=0;oH--){T[oH]=null}i.stringifiedIndoorStyle=null;i.stringifiedCustomStyleInfo=null;i.stringifiedCustomStyleInfoZoom=[];i.stringifiedAreaStyleInfo=null;var oI=Object.keys(i);for(var oH=0;oH-1||oI[oH].indexOf("stringifiedIconSetInfo")>-1){delete i[oI[oH]]}}})},_fallbackToAsm:function(){var oL=this;if(oL._isAsm||oL._fallingBack){return}oL._fallingBack=true;oL._isAsm=true;window.disableWebAssembly=true;for(var oJ=0;oJ0){for(var oH=0;oH=0;oI--){var oK=oJ[oI];var e=oK.tileInfo;if(C.tileTypeName!==e.tileTypeName){continue}var oH="id_"+e.col+"_"+e.row+"_"+e.zoom;if(!C[oH]){oJ.splice(oI,1);T.push(e)}}return T},loadTileData:function(i,T,oR,oQ){var oI=this.getIdleWorker();var e=this.map._displayOptions.poi;var oK=e?this.map._displayOptions.poiText:false;var oP=this.map._displayOptions.buildingSideGradation;if(oI){oI._cbk=oQ;oI._parsingTileInfo=T;oI._parsingTileKey=oR;oI._parsingUrl=i;var oO=(this.map.mapType!==le&&this.map.config.showVectorStreetLayer);if(this.map.parking){var oH=this.map.parking._auth}var C={action:"loadTileData",url:i,tileInfo:T,tileKey:oR,isText:oK,isPoi:e,buildingSideGradation:oP,hasPoly:oO?false:true,hasLine:oO?this.map.config.showVectorLine:true,carport:oH,isEn:this.map._displayOptions.isEn,language:this.map._displayOptions.language||"zh",referrer:window.location.href};var oN=this.map.getMapStyleId();var oS=this.map.getAreaStyleId();var oM=!!(oN.indexOf("custom")===0);var oL=oN;if(oM){oL="Custom"}if(oM&&cu["customStyleInfo_"+oN]&&!cu["customStyleInfo_"+oN]["baseFs"]){oQ()}if(!oI.isSendFS){if(!this["stringifiedFeatureStyle"+oN]&&cu["FeatureStyle"+oN]){this["stringifiedFeatureStyle"+oN]=JSON.stringify(cu["FeatureStyle"+oN])}if(!this["stringifiedIconSetInfo"+oL]){this["stringifiedIconSetInfo"+oL]=JSON.stringify(cu["iconSetInfo"+oL])}if(oM&&cu["indoorStyleInfo_"+oN]&&cu["indoorStyleInfo_"+oN]["baseFs"]){this.stringifiedIndoorStyle=JSON.stringify(cu["indoorStyleInfo_"+oN]["baseFs"])}else{if(!this.stringifiedIndoorStyle){this.stringifiedIndoorStyle=JSON.stringify(cu.indoorStyleDefault)}}if(oM&&cu["customStyleInfo_"+oN]&&cu["customStyleInfo_"+oN]["baseFs"]){if(!this.stringifiedCustomStyleInfo){this.stringifiedCustomStyleInfo=JSON.stringify(cu["customStyleInfo_"+oN])}}if(oM&&cu["customStyleInfo_"+oS]){if(!this.stringifiedAreaStyleInfo){this.stringifiedAreaStyleInfo=JSON.stringify(cu["customStyleInfo_"+oS])}}if(this["stringifiedFeatureStyle"+oN]){C.featureStyle=this["stringifiedFeatureStyle"+oN]}C.iconSetInfo=this["stringifiedIconSetInfo"+oL];if(!(oM&&!this.map.config.showCustomIndoor)){C.indoorStyle=this.stringifiedIndoorStyle}if(oM&&this.stringifiedCustomStyleInfo){C.customMapStyle=this.stringifiedCustomStyleInfo}if(oM&&this.stringifiedAreaStyleInfo){C.areaMapStyle=this.stringifiedAreaStyleInfo}C.iconInfo={wordSpaceRatio:this.wordSpaceRatio,textSizeRatio:this.textSizeRatio};C.mapStyleId=oN;C.areaStyleId=oS;oI.isSendFS=true}oI.postMessage(C)}else{var oJ={url:i,tileInfo:T,tileKey:oR,cbk:oQ};this.arrPendingData.push(oJ)}},setWorkerConfig:function(C){var e={action:"setWorkerConfig"};for(var oH in C){if(C.hasOwnProperty(oH)){e[oH]=C[oH]}}for(var T=0;T1){for(var e=1;e0&&this.map.customLoaded&&this.map.areaCustomLoaded){this.loadLayersData()}else{if(C.baseLayer){var T=this;this.map.loadMapStyleFiles(function(){var i=new iv("onlayer_update");i.name="na";T.map.fire(i);T.loadLayersData()})}}},removeWebGLLayer:function(oI){var oJ=false;for(var oH=0,T=this.tileLayers.length;oH0){this.loadLayersData()}if(this.tileLayers.length===1){this.map.setDisplayOptions({isFlat:false})}else{var e=false;for(var oH=1;oH50);if(!e){if(!this.syncLoadTimer){this.syncLoadTimer=setTimeout(function(){oH._loadLayersFromCache(T);oH.syncLoadTimer=null},40)}}else{this._loadLayersFromCache(T)}if(!oH.map.viewAnimationTime){this.timer&&window.clearTimeout(this.timer)}if(!this.requestTime){this.requestTime=new Date().getTime()}else{if(new Date().getTime()-this.requestTime>=1000){C()}}function C(){if(!oH.map){return}if(oH.map.viewAnimationTime){if(new Date().getTime()-oH.map.viewAnimationTime<1000){return}oH.map.viewAnimationTime=new Date().getTime()}var oJ=oH.tileLayers.length;oH.tilesInfoCache={};for(var oL=0;oL0});var C=oL.length;this.tilesInfoCache={};for(var oH=0;oHhx._mc180X){var oR=hx.getSpaceDistanceInPixel(oJ);pa=Math.ceil(oR/oI)}if(o3.sw.lng19505879.362428114||o3.sw.lat<-15949096.637571886){o3.ne.lat=19505879.362428114;o3.sw.lat=-15949096.637571886}var oN=[Math.floor(o3.sw.lng/oX)-C,Math.floor(o3.sw.lat/oX)];var pm=[Math.floor(o3.ne.lng/oX)+pa,Math.floor(o3.ne.lat/oX)];oW=oN[0]-o6.config.extendTiles;pe=pm[0]+1+o6.config.extendTiles;o4=oN[1]-o6.config.extendTiles;ph=pm[1]+1+o6.config.extendTiles;var oS=[];for(var oP=oW;oP=0?oP-oK:oP+oK;var o0="id_"+oY+"_"+oU+"_"+oJ;if(hx.isTileBlank(oY,oJ,oI)===true){continue}if(!oS[o0]){var pj=false;var oO=256;if(po==="web"){var oZ=this._webTileRaste180(oY,oU,oJ);pj=oZ.combine;oO=oZ.dataIndex}var oQ={col:oY,row:oU,zoom:oJ,useZoom:pf,loopOffsetX:0,tileSize:o5,baseTileSize:oI,mercatorSize:oX,combine:pj,dataIndex:oO,tileLoadFunction:pk.tileLoadFunction,};oS.push(oQ);oS[o0]=true}}}if(this.map._tilt>0&&(po!=="web"||o1>=8)){for(var pl=0;pl0&&oV.x0&&oV.yo8.lng&&o9.minYo8.lat){continue}if(!this.ifTileInMapBounds(o9,o3,pg,pn)){oS.splice(pl,1);pl--}}}oS.sort((function(i){return function(T,pp){return((0.4*Math.abs(T.col-i[0])+0.6*Math.abs(T.row-i[1]))-(0.4*Math.abs(pp.col-i[0])+0.6*Math.abs(pp.row-i[1])))}})([o2,oL]));oS.zoom=oJ;oS.tileTypeName=po;return oS},_webTileRaste180:function(C,oL,e){var i=this.map;var oI=false;var oJ=256;var oH=hx.calcLoopParam(C,e);var oK={col:oH.col,row:oL,baseTileSize:256,zoom:e};var T=m5.prototype.tileToBound(oK,i.getCenter());if(Math.ceil(T.LL.sw.lng)*Math.floor(T.LL.ne.lng)<0){oI=true;oJ=hx.pixelWidth(T.MC.sw.lng,e);if(oK.col<0){oJ=-oJ}}return{combine:oI,dataIndex:oJ}},calcXYZTilesInfo:function(oR,oK,oQ,oV,oJ,oY){var oM=oY.width;var oW=oY.height;var oL=Math.floor(oQ);var oN=null;if(oJ.transform.target==="EPSG3857"){var T=fy.transformBDmcPoint(oR,oJ.transform);var oH=fy.getRangeExtent(T,oM,oW,oL,oJ.transform);oN=[oH.minX,oH.minY,oH.maxX,oH.maxY]}else{if(oJ.transform.source==="BD09MC"){var T=[oR.lng,oR.lat];oN=[oK.sw.lng,oK.sw.lat,oK.ne.lng,oK.ne.lat]}else{var T=fy.transformBDmcPoint(oR,oJ.transform);var oI=fy.transformBDmcPoint(oK.ne,oJ.transform);var oP=fy.transformBDmcPoint(oK.sw,oJ.transform);oN=fy.getLoopBox(T,[oP[0],oP[1],oI[0],oI[1]])}}if(!T||!oN){return[]}oL=oL+oJ.spanLevel;var C=fy.getTileRangeForExtentFactory(oN,oL,oJ.transform);var e=[];var oZ=fy.getResolutionScale(oL,oJ.transform);for(var oU=C.minX;oU<=C.maxX;oU++){for(var oS=C.minY;oS<=C.maxY;oS++){var oT={col:oU,row:oS,zoom:oL,useZoom:oL,tileTypeName:oV,loopOffsetX:0,tileSize:256*oZ,transform:oJ.transform,combine:false,dataIndex:0,tileLoadFunction:oJ.tileLoadFunction,preciseVertex:oJ.preciseVertex||false};e.push(oT);var oO="id_"+oU+"_"+oS+"_"+oL;e[oO]=true}}var oX=fy.getTileCoordForCoordAndZ(T,oL);e.sort((function(i){return function(o0,o1){return((0.4*Math.abs(o0.col-i[0])+0.6*Math.abs(o0.row-i[1]))-(0.4*Math.abs(o1.col-i[0])+0.6*Math.abs(o1.row-i[1])))}})([oX[1],oX[2]]));e.zoom=oL;e.tileTypeName=oV;return e},getCurrentViewTilesInfo:function(C,T){var i=this._getTilesInfoKey(C,T);var e=this.tilesInfoCache[i];if(!e){return this.calcTilesInfo(C,T)}return e},ifTileInMapBounds:function(e,oI,C,oH){var i=oI.normalizedBottomLeft;var oT=oI.normalizedTopRight;var oL=oI.normalizedTopLeft;var oJ=oI.normalizedBottomRight;var T=false;var oS=new d7(e.minX,e.minY);var oP=new d7(e.maxX,e.maxY);var oK=new d7(oP.lng,oS.lat);var oQ=new d7(oS.lng,oP.lat);var oN=[oQ,oP,oK,oS];for(var oR=0,oM=oN.length;oR0){this.zoomState=1}else{if(e<0){this.zoomState=-1}}this.lastZoom=i;return this.zoomState}});function mj(e){this.map=e;this.gl=null;this.layers=[];this.mouseEventThrottle=this.throttle(this.pick,100).bind(this);this.mousePointerThrottle=this.throttle(this.mouseStatus,300).bind(this);this.base=new d7(12069475.280738307,3929271.1724863998);this.iconCache=new a0((c7()||ht.Browser.ie)?64:128,{clearCallback:function(i){}});this._boundMouseEvent=this._layerMouseEvent.bind(this);this._boundClickEvent=this._layerClickEvent.bind(this);this._boundDBLClickEvent=this._layerDBLClickEvent.bind(this);this._boundRightClickEvent=this._layerRightClickEvent.bind(this)}cu.register(function(i){if(i._renderType!=="webgl"){return}var e=i._normalLayerMgr=new mj(i);i.toFormatCoords=function(oI,oL){var oK=[];var oJ=e.base;if(oL&&oL.center){oJ=m5.convertLL2MC(oL.center)}for(var oH=0;oH0})},_layerMouseEvent:function(i){this.mouseEventThrottle(i,"onmousemove")},_layerClickEvent:function(i){this.pick(i,"onclick")},_layerDBLClickEvent:function(i){this.pick(i,"ondblclick")},_layerRightClickEvent:function(i){this.pick(i,"onrightclick")},throttle:function(C,e){var T=null;var i=Date.now();return function(){var oK=Date.now();var oJ=e-(oK-i);var oI=this;var oH=arguments;if(T){clearTimeout(T)}if(oJ<=0){C.apply(oI,oH);i=Date.now()}else{T=setTimeout(function(){C.apply(oI,oH)},oJ)}}},pick:function(oL,oJ){if(!this.layers.length){return false}var T=false;var C=false;for(var oI=this.layers.length-1;oI>=0;oI--){var oH=this.layers[oI];if(oH.doRender()&&oH.testEvent(oJ)){C=true;if(oH.pick){if(oJ==="onmousemove"||oH.hasEvent(oJ)){var oK=oH.pick(oL.x,oL.y,oJ)}else{continue}if(oK&&oK.dataIndex!==-1){if(oJ==="onmousemove"){T=true}if(oH.hasEvent(oJ)){oH.dispatcher(oL,oK,oJ)}if(!oH.popEvent){break}}else{if(oH.hasEvent(oJ)){oH.dispatcher(oL,oK,oJ)}}}}}if(oJ==="onmousemove"&&C){this.mousePointerThrottle(T)}this.map.dispatchEvent(new iv("onupdate"))},mouseStatus:function(e){if(e){this.map.platform.style.cursor=this.map.config.overlayMoveCursor}else{this.map.platform.style.cursor=this.map.config.defaultCursor}},saveFramebuffer:function(){var e=this.gl;this.preFramebuffer=e.getParameter(e.FRAMEBUFFER_BINDING)},bindFramebuffer:function(e){var i=this.gl;if(e){i.bindFramebuffer(i.FRAMEBUFFER,e)}else{i.bindFramebuffer(i.FRAMEBUFFER,null)}},clear:function(e){var i=this.gl;i.clearColor(0,0,0,0);if(e instanceof Array){i.clearColor(e[0],e[1],e[2],e[3])}i.clear(i.COLOR_BUFFER_BIT|i.DEPTH_BUFFER_BIT)},restoreFramebuffer:function(){var i=this.gl;if(this.map&&this.map._webglPainter){var e=this.map._webglPainter.background||[1,1,1,1];i.clearColor(e[0]/255,e[1]/255,e[2]/255,e[3]/255)}i.bindFramebuffer(i.FRAMEBUFFER,this.preFramebuffer)},clearFramebuffer:function(){if(this.pickFBO){var e=this.gl;e.deleteTexture(this.pickFBO.texture);e.deleteFramebuffer(this.pickFBO)}},createFramebuffer:function(T,i){var oK=this.gl;T=T||oK.canvas.width;i=i||oK.canvas.height;var oI=oK.createFramebuffer();var oH=oK.createTexture();oK.bindTexture(oK.TEXTURE_2D,oH);oK.texImage2D(oK.TEXTURE_2D,0,oK.RGBA,T,i,0,oK.RGBA,oK.UNSIGNED_BYTE,null);oK.texParameteri(oK.TEXTURE_2D,oK.TEXTURE_MAG_FILTER,oK.LINEAR);oK.texParameteri(oK.TEXTURE_2D,oK.TEXTURE_MIN_FILTER,oK.LINEAR);oK.texParameteri(oK.TEXTURE_2D,oK.TEXTURE_WRAP_S,oK.CLAMP_TO_EDGE);oK.texParameteri(oK.TEXTURE_2D,oK.TEXTURE_WRAP_T,oK.CLAMP_TO_EDGE);oI.texture=oH;var C=oK.createRenderbuffer();oK.bindRenderbuffer(oK.RENDERBUFFER,C);oK.renderbufferStorage(oK.RENDERBUFFER,oK.DEPTH_STENCIL,T,i);oI.depthBuffer=C;oK.bindFramebuffer(oK.FRAMEBUFFER,oI);oK.framebufferTexture2D(oK.FRAMEBUFFER,oK.COLOR_ATTACHMENT0,oK.TEXTURE_2D,oH,0);oK.framebufferRenderbuffer(oK.FRAMEBUFFER,oK.DEPTH_STENCIL_ATTACHMENT,oK.RENDERBUFFER,C);var oJ=oK.checkFramebufferStatus(oK.FRAMEBUFFER);if(oK.FRAMEBUFFER_COMPLETE!==oJ){console.log("Frame buffer object is incomplete: "+oJ.toString());this._clearBuffer(oK);return}this._clearBuffer(oK);return oI},_clearBuffer:function(e){e.bindFramebuffer(e.FRAMEBUFFER,null);e.bindTexture(e.TEXTURE_2D,null);e.bindRenderbuffer(e.RENDERBUFFER,null)},loadIconImages:function(T,oN){var oO=T;var oP=oO.length;var oJ=this;var C=0;var oM=200;for(var oH=0;oH80*pe){o9=o7=pd[0];o8=o6=pd[1];for(var pc=pe;pco7){o7=pl}if(pj>o6){o6=pj}}pm=Math.max(o7-o9,o6-o8)}C(ph,pa,pe,o9,o8,pm,null,pf);return pa}function o1(pa,pc,o6,pb,o7){var o8;var o9;if(o7===(o5(pa,pc,o6,pb)>0)){for(o8=pc;o8=pc;o8-=pb){o9=oJ(o8,pa[o8],pa[o8+1],o9)}}if(o9&&oP(o9,o9.next)){oX(o9);o9=o9.next}return o9}function oT(o9,o6){if(!o9){return o9}if(!o6){o6=o9}var o8=o9;var o7;do{o7=false;if(!o8.steiner&&(oP(o8,o8.next)||oZ(o8.prev,o8,o8.next)===0)){oX(o8);o8=o6=o8.prev;if(o8===o8.next){return null}o7=true}else{o8=o8.next}}while(o7||o8!==o6);return o6}function C(o7,o9,pc,pa,o6,pg,pf,pd){if(!o7){return}if(!pf&&pg){oO(o7,pa,o6,pg)}var pe=o7;var o8;var pb;while(o7.prev!==o7.next){o8=o7.prev;pb=o7.next;if(pg?o4(o7,pa,o6,pg):oW(o7)){o9.push(o8.i/pc+pd);o9.push(o7.i/pc+pd);o9.push(pb.i/pc+pd);oX(o7);o7=pb.next;pe=pb.next;continue}o7=pb;if(o7===pe){if(!pf){C(oT(o7),o9,pc,pa,o6,pg,1,pd)}else{if(pf===1){o7=oS(o7,o9,pc,pd);C(o7,o9,pc,pa,o6,pg,2,pd)}else{if(pf===2){oR(o7,o9,pc,pa,o6,pg,pd)}}}break}}}function oW(o8){var o7=o8.prev;var o6=o8;var pa=o8.next;if(oZ(o7,o6,pa)>=0){return false}var o9=o8.next.next;while(o9!==o8.prev){if(oQ(o7.x,o7.y,o6.x,o6.y,pa.x,pa.y,o9.x,o9.y)&&oZ(o9.prev,o9,o9.next)>=0){return false}o9=o9.next}return true}function o4(pb,pc,pa,pi){var pf=pb.prev;var pe=pb;var pd=pb.next;if(oZ(pf,pe,pd)>=0){return false}var pj=pf.xpe.x?(pf.x>pd.x?pf.x:pd.x):(pe.x>pd.x?pe.x:pd.x);var o8=pf.y>pe.y?(pf.y>pd.y?pf.y:pd.y):(pe.y>pd.y?pe.y:pd.y);var o7=e(pj,pg,pc,pa,pi);var ph=e(o9,o8,pc,pa,pi);var o6=pb.nextZ;while(o6&&o6.z<=ph){if(o6!==pb.prev&&o6!==pb.next&&oQ(pf.x,pf.y,pe.x,pe.y,pd.x,pd.y,o6.x,o6.y)&&oZ(o6.prev,o6,o6.next)>=0){return false}o6=o6.nextZ}o6=pb.prevZ;while(o6&&o6.z>=o7){if(o6!==pb.prev&&o6!==pb.next&&oQ(pf.x,pf.y,pe.x,pe.y,pd.x,pd.y,o6.x,o6.y)&&oZ(o6.prev,o6,o6.next)>=0){return false}o6=o6.prevZ}return true}function oS(pc,o8,pb,pa){var o9=pc;do{var o7=o9.prev;var o6=o9.next.next;if(!oP(o7,o6)&&i(o7,o9,o9.next,o6)&&o0(o7,o6)&&o0(o6,o7)){o8.push(o7.i/pb+pa);o8.push(o9.i/pb+pa);o8.push(o6.i/pb+pa);oX(o9);oX(o9.next);o9=pc=o6}o9=o9.next}while(o9!==pc);return o9}function oR(o6,o8,pa,o9,o7,pf,pb){var pe=o6;do{var pd=pe.next.next;while(pd!==pe.prev){if(pe.i!==pd.i&&oY(pe,pd)){var pc=oN(pe,pd);pe=oT(pe,pe.next);pc=oT(pc,pc.next);C(pe,o8,pa,o9,o7,pf,null,pb);C(pc,o8,pa,o9,o7,pf,null,pb);return}pd=pd.next}pe=pe.next}while(pe!==o6)}function oV(o8,pf,pb,pa){var pc=[];var o9;var pd;var o6;var o7;var pe;for(o9=0,pd=pf.length;o9=o7.next.y){var pf=o7.x+(pb-o7.y)*(o7.next.x-o7.x)/(o7.next.y-o7.y);if(pf<=pc&&pf>o9){o9=pf;if(pf===pc){if(pb===o7.y){return o7}if(pb===o7.next.y){return o7.next}}o8=o7.x=o7.x&&o7.x>=pi&&oQ(pbo8.x))&&o0(o7,o6)){o8=o7;ph=pd}}o7=o7.next}return o8}function oO(pa,o6,o9,o7){var o8=pa;do{if(o8.z===null){o8.z=e(o8.x,o8.y,o6,o9,o7)}o8.prevZ=o8.prev;o8.nextZ=o8.next;o8=o8.next}while(o8!==pa);o8.prevZ.nextZ=null;o8.prevZ=null;oH(o8)}function oH(pc){var o9;var o8;var o7;var pb;var pd;var o6;var pe;var pa;var pf=1;do{o8=pc;pc=null;pd=null;o6=0;while(o8){o6++;o7=o8;pe=0;for(o9=0;o90||(pa>0&&o7)){if(pe===0){pb=o7;o7=o7.nextZ;pa--}else{if(pa===0||!o7){pb=o8;o8=o8.nextZ;pe--}else{if(o8.z<=o7.z){pb=o8;o8=o8.nextZ;pe--}else{pb=o7;o7=o7.nextZ;pa--}}}if(pd){pd.nextZ=pb}else{pc=pb}pb.prevZ=pd;pd=pb}o8=o7}pd.nextZ=null;pf*=2}while(o6>1);return pc}function e(o7,pa,o6,o9,o8){o7=32767*(o7-o6)/o8;pa=32767*(pa-o9)/o8;o7=(o7|(o7<<8))&16711935;o7=(o7|(o7<<4))&252645135;o7=(o7|(o7<<2))&858993459;o7=(o7|(o7<<1))&1431655765;pa=(pa|(pa<<8))&16711935;pa=(pa|(pa<<4))&252645135;pa=(pa|(pa<<2))&858993459;pa=(pa|(pa<<1))&1431655765;return o7|(pa<<1)}function oK(o8){var o7=o8;var o6=o8;do{if(o7.x=0&&(pa-o8)*(pb-o7)-(pc-o8)*(o9-o7)>=0&&(pc-o8)*(pd-o7)-(o6-o8)*(pb-o7)>=0}function oY(o7,o6){return o7.next.i!==o6.i&&o7.prev.i!==o6.i&&!oU(o7,o6)&&o0(o7,o6)&&o0(o6,o7)&&T(o7,o6)}function oZ(o8,o7,o6){return(o7.y-o8.y)*(o6.x-o7.x)-(o7.x-o8.x)*(o6.y-o7.y)}function oP(o7,o6){return o7.x===o6.x&&o7.y===o6.y}function i(o8,o6,o7,o9){if((oP(o8,o6)&&oP(o7,o9))||(oP(o8,o9)&&oP(o7,o6))){return true}return oZ(o8,o6,o7)>0!==oZ(o8,o6,o9)>0&&oZ(o7,o9,o8)>0!==oZ(o7,o9,o6)>0}function oU(o7,o6){var o8=o7;do{if(o8.i!==o7.i&&o8.next.i!==o7.i&&o8.i!==o6.i&&o8.next.i!==o6.i&&i(o8,o8.next,o7,o6)){return true}o8=o8.next}while(o8!==o7);return false}function o0(o7,o6){return oZ(o7.prev,o7,o7.next)<0?oZ(o7,o6,o7.next)>=0&&oZ(o7,o7.prev,o6)>=0:oZ(o7,o6,o7.prev)<0||oZ(o7,o7.next,o6)<0}function T(o8,o7){var pb=o8;var o6=false;var pa=(o8.x+o7.x)/2;var o9=(o8.y+o7.y)/2;do{if(((pb.y>o9)!==(pb.next.y>o9))&&(pa<(pb.next.x-pb.x)*(o9-pb.y)/(pb.next.y-pb.y)+pb.x)){o6=!o6}pb=pb.next}while(pb!==o8);return o6}function oN(o8,o7){var o6=new o3(o8.i,o8.x,o8.y);var o9=new o3(o7.i,o7.x,o7.y);var pb=o8.next;var pa=o7.prev;o8.next=o7;o7.prev=o8;o6.next=pb;pb.prev=o6;o9.next=o6;o6.prev=o9;pa.next=o9;o9.prev=pa;return o9}function oJ(o7,o6,pa,o8){var o9=new o3(o7,o6,pa);if(!o8){o9.prev=o9;o9.next=o9}else{o9.next=o8.next;o9.prev=o8;o8.next.prev=o9;o8.next=o9}return o9}function oX(o6){o6.next.prev=o6.prev;o6.prev.next=o6.next;if(o6.prevZ){o6.prevZ.nextZ=o6.nextZ}if(o6.nextZ){o6.nextZ.prevZ=o6.prevZ}}function o3(o7,o6,o8){this.i=o7;this.x=o6;this.y=o8;this.prev=null;this.next=null;this.z=null;this.prevZ=null;this.nextZ=null;this.steiner=false}oM.deviation=function(pb,pg,pd,o8){var pe=pg&&pg.length;var pa=pe?pg[0]*pd:pb.length;var o7=Math.abs(o5(pb,0,pa,pd));if(pe){for(var pc=0,pf=pg.length;pc0){o8+=pa[o9-1].length;o6.holes.push(o8)}}return o6};return oM})();function ef(i,e){this.id=iU();this.workerPool=i;this.actors=[];this.currentActorIndex=0;this.ready=false;this.init(e)}ef.prototype.init=function(oI){const e=this.workerPool.acquire(this.id);for(var T=0;T"){this.setBusy(false);const oJ=this.callbacks[oK];delete this.callbacks[oK];if(oJ){if(oH.error){oJ(lN(oH.error))}else{oJ(null,lN(oH.data))}}}else{var C=this;const i=[];const e=oH.hasCallback?function(oL,oM){C.target.postMessage({id:oK,action:"",sourceMapId:C.mapId,error:oL?nB(oL):null,data:nB(oM,i)},i)}:function(oL){};const oI=lN(oH.data);if(this.parent[oH.action]){this.parent[oH.action](oH.sourceMapId,oI,e)}}};nz.prototype.send=function(i,C,oJ,T,oH,oK){if(i==="release"){this.releasePendingData(C,oJ);return}if(this.busy){this.taskQueue.push({action:i,data:C,callback:oJ,targetMapId:T,mustQueue:oH,callbackMetadata:oK});return}this.setBusy(true);var oI=Math.round((Math.random()*1000000000000000000)).toString(36).substring(0,10);const e=this.mapId+"_"+i+"_"+oI;if(oJ){oJ.metadata=oK;this.callbacks[e]=oJ}const oL=[];this.target.postMessage({id:e,action:i,hasCallback:!!oJ,targetMapId:T,mustQueue:oH,sourceMapId:this.mapId,data:nB(C,oL)},oL);return{cancel:function(){if(oJ){delete this.callbacks[e]}this.target.postMessage({id:e,action:"",targetMapId:T,sourceMapId:this.mapId})}}};nz.prototype.stop=function(){this.taskQueue.length=0;this.busy=false;this.callbacks={}};nz.prototype.remove=function(){this.taskQueue.length=0;this.busy=false;this.target.removeEventListener("message",this.receive,false)};nz.prototype.releasePendingData=function(e,oJ){var C=[];var oH=this.taskQueue;for(var T=oH.length-1;T>=0;T--){var oI=oH[T]["data"];if(!oI||!oI.layerId){break}if(oI.layerId!==e.layerId){continue}if(!e["id_"+oI.x+"_"+oI.y+"_"+oI.z]){oH.splice(T,1);C.push(oI)}}oJ(null,C)};var ow;function kE(){if(!ow){ow=new kM()}return ow}function kM(){this.active={}}kM.prototype.acquire=function(i){if(!this.workers){this.workers=[];var C=(window.location.protocol === "http:" ? "http:" : "https:") + "//api.map.baidu.com/res/webgl/10/worker_mvt_0u0jye.js";while(this.workers.length=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)}}})};eU.prototype._checkIndoorByMove=function(){var C=this._map;var oM=C.getSize();var oR={x:oM.width/2,y:oM.height/2};var oQ=Math.max(oM.width,oM.height);var oS=[];for(var oN in this._indoorData){var e=this._indoorData[oN].center;var T=C.pointToPixelIn(new cu.Point(e[0],e[1]));var oJ=dJ(oR,T);oS.push({uid:oN,distance:oJ})}if(oS.length===0){return}oS.sort(function(oT,i){return oT.distance-i.distance});var oI=oS[0];var oO=C.getCenterIn();var oH=false;for(var oL=0;oLoK[0]&&oO.lat>oK[1]&&oO.lng=this._autoEnterZoom){this._checkIndoorByMove()}};eU.prototype.removeData=function(C,oH){if(!this._indoorData[C]){return}var T=this._indoorData[C];for(var e=0;e21){o1=21}if(oU){oS=oO(oX,oY,o1,oU)}else{oS=C(oX,oY,o1,o0)}var oW=oS.drawId;var oR=oS.style;var oZ=oS.styleUpdate;var o2=[];if(!oW){return o2}for(var oT=0;oT>>0}}function oK(oS,oQ){var oR=null;var oT=null;if(oS[oS.length-1]&&oS[oS.length-1] instanceof Array&&oS[oS.length-1][0]==="openmap"){oR=oS[oS.length-1][1]?oS[oS.length-1][1]:null;oT=oS[oS.length-1][2]?oS[oS.length-1][2]:null}return{sid:oQ,borderRgba:i(oS[0]),fillRgba:i(oS[1]),borderWidth:oS[2],fillWidth:oS[3],borderCap:oS[4],fillCap:oS[5],haveBorderLine:oS[6],haveBorderTexture:oS[7],haveFillTexture:oS[8],isUseBorderRgba:oS[9],isUseFillRgba:oS[10],borderTexture:oS[11],fillTexture:oS[12],borderTextureType:oS[13],fillTextureType:oS[14],isRealWidth:oS[15],haveArrow:oS[16],needRound:oS[17],realBorderWidth:oS[18],customTextureUrl:oT,hue:i(oR)}}function oH(oS,oQ){var oR=null;var oT=null;if(oS[oS.length-1]&&oS[oS.length-1] instanceof Array&&oS[oS.length-1][0]==="openmap"){oR=oS[oS.length-1][1]?oS[oS.length-1][1]:null;oT=oS[oS.length-1][2]?oS[oS.length-1][2]:null}return{sid:oQ,fillRgba:i(oS[0]),borderRgba:i(oS[1]),borderWidth:oS[2],borderTexture:oS[3],borderTextureType:oS[4],waterStyle:oS[5],haloStyle:oS[6],textureStyle:oS[7],thickRgba:i(oS[8]),fillTexture:oT,hue:i(oR)}}function oJ(oR,oQ){return{sid:oQ,filter:oR[0],ratio:oR[1],haveBorder:oR[2],borderWidth:oR[3],borderRgba:i(oR[4]),fillTop:i(oR[5]),fillSide:i(oR[6]),polyTexture:oR[7]}}function i(oV){var oU=oV;if(oL[oU]){return oL[oU]}oV=oV>>>0;var oT=(oV)&255;var oS=(oV>>8)&255;var oQ=(oV>>16)&255;var oR=(oV>>24)&255;oL[oU]=[oT,oS,oQ,oR];return oL[oU]}return{getStyleFromCache:function(oX,oS,oV,oW,oR,oU,oQ){oX=oX||"default";var oT=oX+"-"+oS+"-"+oV+"-"+oW;if(oU){oT+="-indoor"}if(oR){if(!oP[oT]){oP[oT]=oM(oS,oV,oW,oR)}return oP[oT]}if(!T[oT]){T[oT]=oM(oS,oV,oW,oR,oQ)}return T[oT]},clearStyleFromCache:function(){T={};oP={}}}})();cu.register(function(i){var e=new lM(i)});function lM(e){e.container.appendChild(this.render());this.bind(e)}lM.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};lM.prototype.bind=function(i){var e=this;i.addEventListener("spotclick",function(C){if(!C.spots||C.spots.length===0){return}e._div.style.left=C.pixel.x+"px";e._div.style.top=C.pixel.y+"px";ht.ac(e._ripple,"ripple-playing")});i.addEventListener("hotclick",function(C){if(!C||!C.pixel||!(C.pixel instanceof hT)){return}e._div.style.left=C.pixel.x+"px";e._div.style.top=C.pixel.y+"px";ht.ac(e._ripple,"ripple-playing")});ht.on(e._ripple,"transitionend",function(){ht.rc(e._ripple,"ripple-playing")})};function c5(e){eV.call(this);if(!e){return}this._opts={};this._map=e;this._maxLat=84.6;this._minLat=-80.6;this._maxLatMC=m5.convertLL2MC(new dZ(this._maxLat,0)).lat;this._minLatMC=m5.convertLL2MC(new dZ(this._minLat,0)).lat}c5.inherits(eV,"ToolbarItem");ht.extend(c5.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 dF(C,i){c5.call(this,C);i=i||{};this._opts=ht.extend(ht.extend(this._opts||{},{autoClear:false,tips:"测距",followText:"单击确定起点,双击结束绘制",unit:"metric",showResult:true,lineColor:"blue",lineStroke:2,opacity:1,lineStyle:"solid",cursor:K.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=K.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;kg.load("tools",function(){e._draw()})}dF.inherits(c5,"PolylineTItem");ht.extend(dF.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 C=0,e=this._overlays.length;CoM){C-=oI;oK-=this._loopOffset}while(Cthis._mc180X){e-=this._mcTSpan}while(ethis._mc180X){i.lng-=this._mcTSpan;e-=this._mcTSpan;oH-=this._mcTSpan}while(i.lng=oN){var oM=T+oP;if(this.isTileBlank(oM,e,oS)===true){continue}var C="id_"+oM+"_"+oT+"_"+e;if(!oO[C]){oO[C]=true;oQ.push([oM,oT,e,0])}}else{if(T<=oJ){var oM=T-oP;if(this.isTileBlank(oM,e,oS)===true){continue}var C="id_"+oM+"_"+oT+"_"+e;if(!oO[C]){oO[C]=true;oQ.push([oM,oT,e,0])}}}}for(var oK=0,oI=oQ.length;oK=0;oK--){var T=oO[oK][0];if(this.isTileBlank(T,e,oS)){oO.splice(oK,1)}}return oO},isTileBlank:function(C,oH,e){var oI=Math.pow(2,oH-3);var i=Math.round(this._validPixels*oI);var T=6*oI*256/e;while(C>T/2-1){C-=T}while(C<-(T/2)){C+=T}if(C>0&&C*e>i){return true}if(C<0&&Math.abs((C+1)*e)>i){return true}return false},isAddWidth:function(e,i){return ethis._mc180X},pixelWidth:function(e,i){if(e<0){e=-e}return Math.abs(e-this._mc180X)/(Math.pow(2,18-i))},getSpaceDistanceInPixel:function(i){var e=Math.round((this._spaceDistance+this._mSpaceDistance)/Math.pow(2,18-i));return e}};var hx=new cC();function gH(){this._id=undefined;this._type=undefined;this.grid=undefined;this.layerName=undefined;this.geojson=undefined;this._geometry=null;this._properties={};this._box=null;this._state={};this._style=null;this._visible=true;this.renderData={};return this}gH.prototype.serialize=function(){return{id:this.getId(),type:this.getType(),grid:this.grid,layerName:this.layerName,geojson:this.geojson,renderData:this.renderData,geometry:this.getGeometry(),box:this.getBox(),properties:this.getProperties(),state:this.getState(),visible:this._visible}};gH.prototype.deserialize=function(oH){this.setId(oH.id);this.setType(oH.type);this.grid=oH.grid;this.layerName=oH.layerName;this.geojson=oH.geojson;this.setProperties(oH.properties);this.setState(oH.state);this._visible=oH.visible||true;this.renderData=oH.renderData;this.setGeometry(oH.geometry);this.setBox(oH.box);if(this.geojson.geometry&&this.geojson.geometry["type"]==="MultiPolygon"){for(var C=0;C0){return this._state}else{return null}};gH.prototype.getStyle=function(){return this._style};gH.prototype.getStyleFunction=function(){return this._styleFunction};gH.prototype.setType=function(e){return this._type=e};gH.prototype.setGeometry=function(e){this._geometry=e};gH.prototype.setStyle=function(e){if(!e||Object.keys(e).length===0){return}for(var i in e){this.set(i,e[i],this._style)}};gH.prototype.setState=function(e){for(var i in e){this.set(i,e[i],this._state)}};gH.prototype.setId=function(e){this._id=e};gH.prototype.setProperties=function(e){for(var i in e){this.set(i,e[i],this._properties)}};gH.prototype.setBox=function(e){return this._box=e};gH.prototype.isPointInBox=function(e){return this._pointInBox(e,this._box)};gH.prototype.getPointGeoJSON=function(T){var oP=this.renderData;if(oP){var oJ=oP.active;if(!oP[oJ]||!oP[oJ]["poi"]){return null}var oO=[];var oL=oP[oJ]["poi"];for(var oM=0;oM0){oN="MultiPolygon"}return{type:"Feature",properties:{},geometry:{type:oN,coordinates:[oO]}}}}};gH.prototype._pointInBox=function(e,i){if(i[0]>e[0]||i[1]>e[1]||i[2]oI[oJ].bds[0])&&(C.y-oH.yoI[oJ].bds[1])){if(e.getTilt()>55){var oK=e.pointToOverlayPixelIn(oI[oJ].pt);if(oK.outOfFrustum){continue}}oM=true;break}}}}return oM};gH.prototype._pixelPnpoly=function(oH,oJ){var e=oJ.length;var C=0;var oI=false;for(var T=0;T=oJ[T].lat)&&(oH.lat=oJ[C].lat)&&(oH.lat1){for(var oR=1;oRoS){oN=Math.sqrt(Math.min(oH,oV))}if((C==null)||(C>oN)){T=Math.sqrt(oV-oI)/Math.sqrt(oS);oP=Math.sqrt(oH-oI)/Math.sqrt(oS);C=oN;oO=oR}C=Math.min(C,oN)}}return{dist:C}};gH.prototype.isPointInGeometry=function(oL,e){var oM=false;switch(this._type){case iC.POINT:oM=this._pixelPnpoint(oL,this.renderData,e);break;case iC.LINE_STRING:var oK=this._getProximity({lng:oL[0],lat:oL[1]},this._geometry);var T=this.renderData[this.renderData.active];if(!T||!T.line||!T.line[0]||!T.line[0].width){var C=2}else{var C=this.renderData[this.renderData.active]["line"][0].width;if(this.grid===ge.GridModel.GOOGLEWEB){C=Math.max(C/2*fy.gridScaleFromBDMCTo3857,2)}else{C=Math.max(C/2,2)}}if(oK.dist1?[oY]:(oY[0]||[])}var oW=oX;if(oX.polygonStyle){oW=oX.polygonStyle;if(oX.polygonStyle instanceof Function){oW=oX.polygonStyle(oV)||{}}}var oT=new mu(oY,oW);return oT}function oM(oU,o0,oX){var oY=oU.coordinates;var oS=[];for(var oW=0;oWoU[0]){oT[0]=oU[0]}if(oT[1]>oU[1]){oT[1]=oU[1]}if(oT[2]=0){continue}const oM=oL[oN];oI[oN]=nB(oM,oJ)}if(oL instanceof Error){oI.message=oL.message}}if(e!=="Object"){oI["_$name"]=e}return oI}else{if(oL instanceof Function){return null}}throw new Error("不能被序列化")}function lN(oI){if(oI===null||oI===undefined||typeof oI==="boolean"||typeof oI==="number"||typeof oI==="string"||oI instanceof Boolean||oI instanceof Number||oI instanceof String||oI instanceof Date||oI instanceof RegExp||ir(oI)||je(oI)||ArrayBuffer.isView(oI)||oI instanceof ImageData){return oI}if(Array.isArray(oI)){var e=oI["_$name"];if(e){var T=mV[e]["_class"];if(!T){throw new Error("不能被反序列化")}if(T.deserialize){return T.deserialize(oI)}}const oH=[];for(var C=0;C=oH.minZoom&&oH.map.getZoom()<=oH.maxZoom){if(!oH._onMap){oH.addDataToMap();oH._onMap=true}}else{if(oH._onMap){oH.removeDataFromMap();oH._onMap=false}}};this.map.on("zoomend",this._onZoomEvent);var oH=this;var e=false;var T={x:0,y:0};this._layerMouseEvent=function(oM){if(!oH.map||!oH._listeners||!oH.visible||!oH._onMap){return}if(!oH._listeners.onmousemove||Object.keys(oH._listeners.onmousemove).length===0){return}var oL=oH.pickOverlays(oM);var i;if(oL&&oL.length>0){i=new iv("onmousemove");i.features=oL;oH.map.platform.style.cursor=oH.map.config.overlayMoveCursor;e=true}else{if(!e||!oH._listeners.onmouseout||Object.keys(oH._listeners.onmouseout).length===0){return}oH.map.platform.style.cursor=oH.map.config.defaultCursor;i=new iv("onmouseout");i.features=null;e=false}if(i){i.pointMC=oM.pointMC;i.pixel=oM.pixel;i.latLng=oM.latlng;oH.dispatchEvent(i)}};this._layerClickEvent=function(oN){if(!oH.map||!oH._listeners||!oH.visible){return}if((!oH._listeners.onclick&&!oH._listeners.dblclick)||(Object.keys(oH._listeners.onclick||{}).length===0&&Object.keys(oH._listeners.dblclick||{}).length===0)){return}var oL={x:oN.clientX,y:oN.clientY};if(Math.abs(oL.x-T.x)>oH.clickDistrict||Math.abs(oL.y-T.y)>oH.clickDistrict){return}var oM=oH.pickOverlays(oN);var i=new iv(oN.type);i.pointMC=oN.pointMC;i.pixel=oN.pixel;i.latLng=oN.latlng;i.features=oM;oH.dispatchEvent(i)};this._layerMouseDownEvent=function(i){T={x:i.clientX,y:i.clientY}};oJ.addEventListener("onmousemove",this._layerMouseEvent);oJ.addEventListener("onmouseout",this._layerMouseEvent);oJ.addEventListener("onmousedown",this._layerMouseDownEvent);var oI=["onclick"];for(var C=0;C=this.minZoom&&this.map.getZoom()<=this.maxZoom){for(var e=0;e0){for(var e=0;e0){this.removeDataFromMap()}this.overlayData=[]};bj.prototype.setLevel=function(e){if(e>-999&&e<9999){this.level=e;for(var C=0;C(oQ+oI)){oP.tileCache.clear();return null}if(oL.source!=="BD09MC"){o3.x=fy.getTilesLoop(oX,o3.x)}if(oM.length===4){var o2=fy.getTileRangeExtent([oX,o3.x,o3.y]);var o4=oO([o2.minX,o2.minY,o2.maxX,o2.maxY]);if(!o4){return null}}var oY="";if(oS){oY=oS;var o0=/[^\{}]*\{(.*)\}[^\}]*/;oY.match(o0);var oZ=[];if(RegExp.$1){oZ=RegExp.$1.split(",")}var oW=C(o3.x,o3.y,oX);if(!oW){return null}oY=oY.replace(/\{(.*)\}/,oZ[(o3.x+o3.y)%oZ.length]);oY=oY.replace(/\[x\]/gi,T(o3.x,o3.y,oX));oY=oY.replace(/\[y\]/gi,oT(o3.x,o3.y,oX));oY=oY.replace(/\[z\]/gi,oW);oY=oY.replace(/\[b\]/gi,oR(o3.x,o3.y,oX));oY=oY.replace(/\[w\]/gi,oU(o3.x,o3.y,oX));oY=oY.replace(/\[h\]/gi,e(o3.x,o3.y,oX))}else{return null}return oY};function oO(oW){if(oM&&oM instanceof Array&&oM.length===4){if((oM[0]<=oW[2]&&oM[1]<=oW[3])&&(oM[2]>=oW[0]&&oM[3]>=oW[1])){return true}else{return false}}return true}return oP}function cq(e){e=e||{};var i=e.url||"";var oO=e.params||{};var oJ=oO.VERSION||"1.3.0";var oI=e.projection||"EPSG:3857";if(oI!=="EPSG:3857"){console.warn("[WMSLayer] 仅支持 EPSG:3857。传入值:"+oI);oI="EPSG:3857"}if(!oO.LAYERS){console.warn("[WMSLayer] params.LAYERS 缺失,WMS 服务通常必填。")}var oK=oJ==="1.1.1"?"SRS":"CRS";var oL={SERVICE:"WMS",REQUEST:"GetMap",VERSION:oJ,FORMAT:"image/png",TRANSPARENT:"true",STYLES:""};oL[oK]=oI;for(var T in oO){if(oO.hasOwnProperty(T)){oL[T]=oO[T]}}delete oL.BBOX;delete oL.WIDTH;delete oL.HEIGHT;var C=[];for(var oM in oL){if(oL.hasOwnProperty(oM)){var oH=encodeURIComponent(oL[oM]).replace(/%2C/gi,",");C.push(encodeURIComponent(oM)+"="+oH)}}C.push("BBOX=[b]","WIDTH=[w]","HEIGHT=[h]");var oN=i.indexOf("?")===-1?"?":"&";return{tileUrlTemplate:i+oN+C.join("&"),transform:{source:"EPSG3857",target:"BD09MC"},projection:oI,version:oJ}}function et(i){if(typeof kS!=="undefined"&&kS.sendMessage){kS.sendMessage("WMSLayer")}i=i||{};var C=i.tileSize||256;var e=cq({url:i.url,params:i.params,projection:i.projection});return new ot({tileUrlTemplate:e.tileUrlTemplate,transform:e.transform,wTemplate:function(){return C},hTemplate:function(){return C},minZoom:i.minZoom,maxZoom:i.maxZoom,extent:i.extent||[],extentCRSIsWGS84:i.extentCRSIsWGS84||false,opacity:i.opacity,zIndex:i.zIndex,spanLevel:i.spanLevel,useThumbData:i.useThumbData,reproject:i.reproject,reprojectSourceCRS:i.reprojectSourceCRS,png8:i.png8,height:i.height,retry:i.retry,retryTime:i.retryTime,dataType:i.dataType,cacheSize:i.cacheSize,isTop:i.isTop,boundary:i.boundary,showRegion:i.showRegion,thumbParentDepth:i.thumbParentDepth,thumbChildDepth:i.thumbChildDepth,tileLoadFunction:i.tileLoadFunction})}function f4(e){var e=e||{};var C=e.url||"";var oH=e.params||{};var oL={Service:"WMTS",Request:"GetTile",Version:"1.0.0",Format:"image/png",TileMatrixSet:"GoogleMapsCompatible"};for(var oN in oL){if(!oH[oN]&&!oH[oN.toLowerCase()]){oH[oN]=oL[oN]}}var oI=oH.TileMatrix||oH.tilematrix||"[z]";var oM=oH.TileCol||oH.tilecol||"[x]";var oK=oH.TileRow||oH.tilerow||"[y]";delete oH.TileMatrix;delete oH.tilematrix;delete oH.TileCol;delete oH.tilecol;delete oH.TileRow;delete oH.tilerow;var oO=[];for(var oN in oH){oO.push(oN+"="+encodeURIComponent(oH[oN]))}var oJ=C.indexOf("?")===-1?"?":"&";var T=C+oJ+oO.join("&")+"&TileMatrix="+oI+"&TileCol="+oM+"&TileRow="+oK;var i={tileUrlTemplate:T,opacity:e.opacity,minZoom:e.minZoom,maxZoom:e.maxZoom,zIndex:e.zIndex,extent:e.extent,extentCRSIsWGS84:e.extentCRSIsWGS84,transform:e.transform,xTemplate:e.xTemplate,yTemplate:e.yTemplate,zTemplate:e.zTemplate,useThumbData:e.useThumbData,spanLevel:e.spanLevel,reproject:e.reproject,reprojectSourceCRS:e.reprojectSourceCRS,png8:e.png8,height:e.height,retry:e.retry,retryTime:e.retryTime,dataType:e.dataType,cacheSize:e.cacheSize,isTop:e.isTop,boundary:e.boundary,showRegion:e.showRegion,thumbParentDepth:e.thumbParentDepth,thumbChildDepth:e.thumbChildDepth,tileLoadFunction:e.tileLoadFunction};return new ot(i)}function lc(e){var C={"EPSG:3857":"EPSG3857",EPSG3857:"EPSG3857",BD09MC:"BD09MC"};var i=C[e];if(!i){if(e&&typeof console!=="undefined"&&console.warn){console.warn("[RasterTileLayer] 仅支持 EPSG:3857 / BD09MC, 传入:"+e)}i="EPSG3857"}return i}function cU(T,i,oK,oJ,e){var oI=Math.pow(2,oJ)-oK-1;var C=T.replace(/\{z\}/gi,oJ).replace(/\{x\}/gi,i).replace(/\{-y\}/gi,oI).replace(/\{reverseY\}/gi,oI).replace(/\{y\}/gi,oK);if(C.indexOf("{s}")!==-1||C.indexOf("{S}")!==-1){var oH=(e&&e.length)?e[Math.abs(i+oK)%e.length]:"";C=C.replace(/\{s\}/gi,oH)}return C}function eK(C){if(typeof kS!=="undefined"&&kS.sendMessage){kS.sendMessage("RasterTileLayer")}C=C||{};var oQ=C.url||"";var oK=C.subdomains||[];var oI=typeof console!=="undefined"&&console.warn;if(!oQ&&oI){console.warn("[RasterTileLayer] url 必填(字符串模板或 function(x, y, z))。")}if(typeof oQ==="string"&&/\{s\}/i.test(oQ)&&!oK.length&&oI){console.warn("[RasterTileLayer] url 含 {s} 但未提供 subdomains。")}var i=lc(C.projection||"EPSG:3857");var oJ={source:i,target:"BD09MC"};var T=C.bounds||[];var oL=C.boundsInWGS84||false;var oH=C.minZoom||0;var oM=C.maxZoom||23;var oO=C.spanLevel||0;var oN=C.showRegion;if(oN!=="inside"&&oN!=="outside"){oN="inside"}var e=new kR({transform:oJ,height:C.height||0,retry:C.retry||false,retryTime:C.retryTime||600,transparentPng:true,dataType:1,spanLevel:oO,tileTypeName:"xyz",cacheSize:C.cacheSize||256,customLayer:true,clipTile:false,opacity:C.opacity||1,boundary:C.boundary||false,showRegion:oN,useThumbData:C.useThumbData!==false,tileLoadFunction:C.tileLoadFunction});if(C.zIndex){e.zIndex=C.zIndex}if(T.length===4&&oL){T=fy.fromEPSG4326(T)}e.getTilesUrl=function(oR,oT){if(!oR||oT<0||oT<(oH+oO)||oT>(oM+oO)){e.tileCache.clear();return null}if(oJ.source!=="BD09MC"){oR.x=fy.getTilesLoop(oT,oR.x)}if(T.length===4){var oS=fy.getTileRangeExtent([oT,oR.x,oR.y]);if(!oP([oS.minX,oS.minY,oS.maxX,oS.maxY])){return null}}if(typeof oQ==="function"){return oQ(oR.x,oR.y,oT)||null}if(oQ){return cU(oQ,oR.x,oR.y,oT,oK)}return null};function oP(oR){return(T[0]<=oR[2]&&T[1]<=oR[3]&&T[2]>=oR[0]&&T[3]>=oR[1])}return e}function fk(C){if(typeof kS!=="undefined"&&kS.sendMessage){kS.sendMessage("PixelLayer")}this.src=eP();this._queryList=[];var e=this;kg.load("layer",function(){e._asyncReplay()},true);this.tileMaskUvCache=new a0(64,{clearCallback:function(oJ){}});var oI=6;if(C.pixelMap){this.opacity=typeof C.pixelMap.opacity==="number"?C.pixelMap.opacity:1;dy(this.opacity,0,1);if(this.opacity<1){C.useThumbData=false}var oH=C.pixelMap||{};this.colors=oH.colors||["#F9F871","#FFC75F","#FF9671","#FF6F91","#D65DB1","#845EC2"];this.positions=oH.positions||[0,0.2,0.4,0.6,0.8,1];this.domain=oH.domain||[0,255];this.clamp=oH.clamp||this.domain;this.noData=(oH.noData!==undefined)?oH.noData:-99999;this.fomularC=oH.fomularC||"float generateValue(vec4 pixel){return pixel.r * 255.;}";this.fomularJS=oH.fomularJS||function(oJ){return oJ.r};this.maskPng=oH.maskPng||null;if(this.maskPng){this.loadMaskPng(this.maskPng)}this.maskData=oH.maskData||-1;this.maskCoord=oH.maskCoord||null;this.fHashcode=u({str:this.fomularC});var i=this.canPixelMap();if(i){this.isPixelMap=true;this.setPixelMap()}oI=C.pixelMap.cacheSize||oI}var T=new ot(C);T.ontology=this;this.layer=T;this.cacheSize=oI;this.tileCache=new a0(this.cacheSize,{clearCallback:function(oJ){}});this.tileImageDataCache=new a0(this.cacheSize,{clearCallback:function(oJ){}})}fk.inherits(ht.BaseClass,"PixelLayer");fk.prototype.isTileLayer=true;ht.extend(fk.prototype,{canPixelMap:function(){if(this.colors&&this.positions){return true}return false},setPixelMap:function(){if(!this.isPixelMap||!this.canPixelMap()){return}var i=this.colors;var e=this.positions;this.pHashcode=u({colors:i,positions:e});this.pixelColorMap=kY.generateColorRamp(i,e)},setDomain:function(e){if(e instanceof Array&&e.length===2){this.domain=e;this.doOnceDraw()}},setClamp:function(e){if(e instanceof Array&&e.length===2){this.clamp=e;this.doOnceDraw()}},setNoData:function(e){this.noData=e;this.doOnceDraw()},setPositions:function(e){this.positions=e;this.setPixelMap();this.doOnceDraw()},setColors:function(e){this.colors=e;this.setPixelMap();this.doOnceDraw()},setFomular:function(e,i){if(e&&i){this.fomularJS=e;this.fomularC=i;this.fHashcode=u({str:this.fomularC});this.doOnceDraw()}},setOpacity:function(e){this.opacity=e;this.doOnceDraw()},setIsPixelMap:function(e){this.isPixelMap=e;this.doOnceDraw()},setMaskPng:function(e){this.maskPng=e;this.loadMaskPng(this.maskPng);this.doOnceDraw()},setMaskData:function(e){this.maskData=e;this.doOnceDraw()},setMaskCoord:function(e){this.maskCoord=e||null;this.calMaskBox();this.doOnceDraw()},setZIndex:function(e){if(this.layer&&parseInt(e)>0){this.layer.setZIndex(e)}},getZIndex:function(){if(this.layer){return this.layer.zIndex}},setUpLevel:function(){if(this.layer){var e=this.layer._getAdjoinZIndex("up");if(this.layer.zIndex!==e){this.layer.setZIndex(e)}}},setDownLevel:function(){if(this.layer){var e=this.layer._getAdjoinZIndex("down");if(this.layer.zIndex!==e){this.layer.setZIndex(e)}}},setZIndexTop:function(){if(this.layer){this.layer.setZIndexTop()}},doOnceDraw:function(){if(this.layer.map){var e=new iv("onupdate");this.layer.map.dispatchEvent(e)}},_getInLayer:function(oO){if(!this.map){return null}var oN=Math.floor(this.map.getZoom());var T=fy.transformBDmcPoint(oO,this.layer.transform);var oK=fy.getTileCoordForXYAndZ_(T[0],T[1],oN,false);var C=oK.join("-");var e=this.tileCache.getData(C);if(e){return e}var oH=this.layer.zIndex;var oJ=this.map._featureMgr.result.bkData;var oL=oJ[oH][2];var oP=null;for(var oI=0;oI0){i.zIndex=C.index}var e=this;i.loadTileData=function(){return e._loadTile.apply(e,arguments)};i.ontology=this;this.layer=i;var oH=this;i.addEventListener("ontilesloadstart",function(){oH.dispatchEvent(new iv("ontilesloadstart"))});i.addEventListener("ontilesloadend",function(){oH.dispatchEvent(new iv("ontilesloadend"))})},createTileLayer:function(i){const T=i.tileUrlTemplate||"";const oL=i.xTemplate||function(oS,oU,oT){return oS};const oQ=i.yTemplate||function(oS,oU,oT){return oU};const oJ=i.zTemplate||function(oS,oU,oT){return oT};const oP=i.bTemplate||function(oS,oV,oU){const oT=m5.tileToBoundRange({col:oS,row:oV,zoom:oU,baseTileSize:256});return oT.MC.sw.lng+","+oT.MC.sw.lat+","+oT.MC.ne.lng+","+oT.MC.ne.lat};var oR=i.extent||[];const oK=i.extentCRSIsWGS84||false;var C=i.minZoom||0;var oN=i.maxZoom||23;var oO=i.spanLevel||0;var oM=new kR({transparentPng:true,dataType:2,spanLevel:oO,tileTypeName:"web",cacheSize:i.cacheSize||256,customLayer:true,clipTile:false,boundary:false,useThumbData:i.useThumbData||false});if(oR.length===4){if(oK){oR=fy.fromEPSG4326(oR)}var oH=fy.transformPointArr([oR[0],oR[1]],"EPSG3857","BD09MC");var oI=fy.transformPointArr([oR[2],oR[3]],"EPSG3857","BD09MC");oR=[oH[0],oH[1],oI[0],oI[1]]}oM.getTilesUrl=function(oZ,oT,oY){if(!oZ||oT<0||oT<(C+oO)||oT>(oN+oO)){oM.tileCache.clear();return null}if(oR.length===4){const oX=m5.tileToBoundRange({col:x,row:y,zoom:z,baseTileSize:256});var o0=e([oX.MC.getMin().lng,oX.MC.getMin().lat,oX.MC.getMax().lng,oX.MC.getMax().lat]);if(!o0){return null}}var oU="";if(T){oU=T;var oW=/[^\{}]*\{(.*)\}[^\}]*/;oU.match(oW);var oV=[];if(RegExp.$1){oV=RegExp.$1.split(",")}var oS=oJ(oZ.x,oZ.y,oT);if(!oS){return null}oU=oU.replace(/\{(.*)\}/,oV[(oZ.x+oZ.y)%oV.length]);oU=oU.replace(/\[x\]/gi,oL(oZ.x,oZ.y,oT));oU=oU.replace(/\[y\]/gi,oQ(oZ.x,oZ.y,oT));oU=oU.replace(/\[z\]/gi,oJ(oZ.x,oZ.y,oT));oU=oU.replace(/\[b\]/gi,oP(oZ.x,oZ.y,oT))}else{return null}return oU};function e(oS){if(oR&&oR instanceof Array&&oR.length===4){if((oR[0]<=oS[2]&&oR[1]<=oS[3])&&(oR[2]>=oS[0]&&oR[3]>=oS[1])){return true}else{return false}}return true}return oM},compileExpress:function(i,e){var i=ge.ExpressParse.normalizePropertyExpression(i,e);return i},resolveStyle:function(oI){var T=oI||{};if(T.style){var oH={};if(!T.layers||T.layers.length===0){var oK=ge.LayerTypes.POINT;var i=ge.LayerTypes.LINE;var oJ=ge.LayerTypes.FILL;if(T.style[oK]){T.style[oK].type="point"}if(T.style[i]){T.style[i].type="polyline"}if(T.style[oJ]){T.style[oJ].type="polygon"}}for(var C in T.style){if(T.style.hasOwnProperty(C)){var e=T.style[C];this._styleFormat(e.type,e.painter,C,oH)}}this.styleExpress=oH}},_styleFormat:function(oH,e,i,T){var oJ={};var oK=eJ[oH];if(!oK){return}for(var C in e){if(e.hasOwnProperty(C)){var oI=this.compileExpress(e[C],oK[C]);oJ[C]=oI}}T[i]={type:oH,painter:oJ}},evaluateContext:function(e,C,T){var i=e+"_"+C.getId();var oH=this._stateCube[i];if(oH){C.setState(oH)}else{C._state={}}return{properties:function(){return C&&C.getProperties()},featureState:T===true?{}:(C&&C.getState())}},evaluates:function(i,T,oH){if(!this.styleExpress||!this.styleExpress.hasOwnProperty(i)){return null}var oJ=this.styleExpress[i].painter;var e={};for(var C in oJ){if(oJ.hasOwnProperty(C)){var oI=oJ[C].evaluate(this.evaluateContext(i,T,oH));e[C]=oI}}return e},_updateState:function(C,T,e){if(C instanceof m6&&C.layerName&&C.id){var i=C.layerName+"_"+C.id;if(e){this._set(T,this._stateCube,i)}else{this._stateCube[i]=T}this._stateCube[i].rank=(this._stateCube[i].rank||0)+1}else{if(typeof C==="string"){if(e){this._set(T,this._stateCube,C)}else{this._stateCube[C]=T}this._stateCube[C].rank=(this._stateCube[C].rank||0)+1}}},updateState:function(oH,oI,e){var C=JSON.stringify(this._stateCube);if(!(oI&&typeof oI==="object"&&Object.keys(oI).length>0)){return}if(!e){this._stateCube={}}if(oH instanceof Array){for(var T=0;Te){return false}return true}}},_initEvent:function(oJ){this.map=oJ;if(!this.map.dispatcher){this.map.dispatcher=new ef(kE(),ge)}var oH=this;this.map.dispatcher.broadcast("setLayerStyle",oH.layerOption,function(oL,i){oH.upStyle=true;if(oH.loadModule){oH.doOnceDraw()}});var T=this;var e=false;this._layerMouseEvent=function(oN){if(!T.map||!T._listeners){return}if(!T._listeners.onmousemove||Object.keys(T._listeners.onmousemove).length===0){return}var i;var oM=oN.pointMC;var oL=T.pickFeatures(oM,oN.pixel);if(oL&&oL.length>0){i=new iv("onmousemove");i.value=oL;T.map.platform.style.cursor=T.map.config.overlayMoveCursor;e=true}else{T.map.platform.style.cursor=T.map.config.defaultCursor;if(!e||!T._listeners.onmouseout||Object.keys(T._listeners.onmouseout).length===0){return}i=new iv("onmouseout");e=false}if(i){i.pointMC=oN.pointMC;i.pixel=oN.pixel;i.latLng=oN.latlng;T.dispatchEvent(i)}};this._layerClickEvent=function(oN){if(!T.map||!T._listeners){return}if((!T._listeners.onclick&&!T._listeners.dblclick)||(Object.keys(T._listeners.onclick).length===0&&Object.keys(T._listeners.dblclick).length===0)){return}var i;var oM=oN.pointMC;var oL=T.pickFeatures(oM,oN.pixel);i=new iv(oN.type);i.pointMC=oM;i.pixel=oN.pixel;i.latLng=oN.latlng;i.value=oL;T.dispatchEvent(i)};oJ.addEventListener("onmousemove",this._layerMouseEvent);var oI=["onclick","dblclick"];for(var C=0;C0){this.layer.setZIndex(e)}},getZIndex:function(){if(this.layer){return this.layer.zIndex}},setZIndexTop:function(){if(this.layer){this.layer.setZIndexTop()}},setUpLevel:function(){if(this.layer){var e=this.layer._getAdjoinZIndex("up");if(this.layer.zIndex!==e){this.layer.setZIndex(e)}}},setDownLevel:function(){if(this.layer){var e=this.layer._getAdjoinZIndex("down");if(this.layer.zIndex!==e){this.layer.setZIndex(e)}}},toString:function(){return"MVTLayer"},_loadTile:function(e){this.curViewTilesInfo=e;this._pendingTile=arguments},_onImplReady:function(){this._implReady=true;var e=this._pendingTile;this._pendingTile=null;if(e){this._loadTile.apply(this,e)}},intersectFeatures:function(){return null},pickFeatures:function(){return null}});ge._generateTexture=function(oJ,oI,C){var oH=document.createElement("canvas");var e;var T;if(oI.strokeStyle==="dashed"){e=16;T=e*8}else{if(oI.strokeStyle==="dotted"){e=32;T=e*2}}oH.width=e;oH.height=T;var i=oH.getContext("2d");i.fillStyle=oI.strokeColor;i.globalAlpha=oI.strokeOpacity;var oK=oI.strokeWeight*2;if(oI.strokeStyle==="dashed"){oK=ge._drawDashArrayTexture(i,e,T,oI)}else{if(oI.strokeStyle==="dotted"){oK=ge._drawDottedTexture(i,e,T,oI.strokeWeight)}}if(window.createImageBitmap&&!oI.sync){createImageBitmap(oH,{imageOrientation:"flipY"}).then(function(oL){C(null,{totalDashLen:oK,texture:oL,textureSize:[e,T]})})}else{C(null,{totalDashLen:oK,texture:oH.toDataURL(),textureSize:[e,T]})}};ge._drawDashArrayTexture=function(oM,T,oI,C){var oK=C.dashArray;if(!oK){oM.fillRect(0,0,T,oI/2);return C.strokeWeight*4}else{var oL=0;if(oK.length%2!==0){oK=oK.concat(oK)}for(var oH=0;oH3?oL[3]:255]}}if(typeof oM==="number"){oN[3]=Math.round(Math.max(0,Math.min(1,oM))*255)}return oN}var e={};var T=false;for(var i in oJ){if(!oJ.hasOwnProperty(i)){continue}var C=oJ[i]||{};var oH=typeof C.strokeWeight==="number"?C.strokeWeight:2;var oK=typeof C.borderWeight==="number"?C.borderWeight:0;e[i]={borderCap:1,borderRgba:oI(C.borderColor||[0,0,0,255]),borderTexture:"",borderTextureType:null,borderWidth:oK*2,fillCap:0,fillRgba:oI(C.strokeColor,C.strokeOpacity),fillTexture:"",fillTextureType:null,fillWidth:oH*2,haveArrow:null,haveBorderLine:oK>0?1:0,haveBorderTexture:0,haveFillTexture:0,isRealWidth:null,isUseBorderRgba:1,isUseFillRgba:1};T=true}return T?e:null},show:function(){this._visible=true;if(this.layer){this.layer.show&&this.layer.show()}},hide:function(){this._visible=false;if(this.layer){this.layer.hide&&this.layer.hide()}},setOpacity:function(e){if(this.layer){this.layer.setOpacity&&this.layer.setOpacity(e)}},getOpacity:function(){if(this.layer){return this.layer.getOpacity?this.layer.getOpacity():1}return 1},destroy:function(){if(this.layer){if(this.layer.processDataTimer){clearTimeout(this.layer.processDataTimer);this.layer.processDataTimer=null}this.layer.callbackDataQueue=[];var e=this.layer.map;if(e){e.removeTileLayer(this)}this.layer.ontology=null;this.layer.loadTileData=null;this.layer=null}},_loadTile:function(){this._pendingTile=arguments},_asyncReplay:function(){var e=this._pendingTile;this._pendingTile=null;if(e){this._loadTile.apply(this,e)}}});var ah=function(i){if(typeof kS!=="undefined"&&kS.sendMessage){kS.sendMessage("BaiduLayer")}var i=i||{};this.inputCRS=i.inputCRS||"EPSG3857";this.outCRS=i.outCRS||"EPSG3857";this.minZoom=i.minZoom||3;this.maxZoom=i.maxZoom||19;this.retry=i.retry||false;this.retryTime=i.retryTime||600;this.useThumbData=i.useThumbData||true;this.lastZoom=3;this.cacheSize=i.cacheSize||128;this.tileType=ly.getInstance("web");this._mapCenter={};this._featureMgr=[[],[],[]];this._gridRefs={row:{},col:{}};this.tileCache=new a0(this.cacheSize,{clearCallback:function(C){}});this._queryList=[];var e=this;kg.load("layer",function(){e._asyncReplay()},true)};ah.inherits(eV,"BaiduLayer");ht.extend(ah.prototype,{clearData:function(){this._featureMgr=[[],[],[]]},clearRefs:function(){this._gridRefs={row:{},col:{}}},destroy:function(){this.tileCache.clear();this.clearData();this.clearRefs();this._mapCenter={}},fetch:function(){this._queryList.push({method:"fetch",arguments:arguments})},_asyncReplay:function(){var C=this._queryList||[];this._queryList=[];for(var e=0;e0){this.overlaysList=this.overlaysList.concat(this.retainOverlays);this.retainOverlays=[]}},show:function(){this.config.visible=true;this.updateData(this.data)},hide:function(){this.config.visible=false;this.updateData(this.data)},addToMap:function(){if(!this.overlaysList||!this.map){return}var e=this.overlaysList.length;var T=this.overlaysList;if(e>0){for(var C=0;C0){this.adjustZIndex(T);T._normalLayerMgr.sortLayer()}else{var e=T._featureMgr.result.bkData;this.zIndex=e.length||1}var C={tileTypeName:this.getType?this.getType():"custom",dataType:this.toString(),ontology:this};T._featureMgr.createLayer(this.zIndex,C);this.map=T;this.gl=oH;this.onAdd(T,oH);var i=this;T.on("destroy",function(){i.onDestroy()})},adjustZIndex:function(i){if(i&&i._featureMgr){var e=i._featureMgr.result.bkData;while(e[this.zIndex]){this.zIndex+=1}}},_getAdjoinZIndex:function(oH){var C=this.zIndex;if(this.map&&this.map._featureMgr){var e=this.map._featureMgr.result.bkData;if(oH==="up"){for(var T=this.zIndex+1;T0;T--){if(e[T]){C=T;break}}}}return C},setTargetZIndex:function(e){this.zIndex=e;if(this.map){this.map._normalLayerMgr.sortLayer()}},setZIndex:function(oK){oK=Math.abs(Math.floor(oK))||1;if(!oK||oK===this.zIndex){return}var oH=this.map._featureMgr.result.bkData;var T=this.map.tileMgr.tileLayers;var oM=this.map._normalLayerMgr.layers;function oN(oS){var oQ=null;var oR=[T,oM];for(var oO=0;oO-1){return e}continue}if(oI-1){return e}}if(oL>=0){var e=C(oL*4);if(e>-1){return e}}if(oI>=oK&&oL<0){break}}return -1},testEvent:function(e){if(this.autoSelect){return true}if(this.enablePicked&&(this.supportMouseStyleChange||(e!=="onmousemove"&&!this.supportMouseStyleChange))){return true}return false},pick:function(oK,oJ,T){var C=this.gl;var oL=this.map.config.ratio;this.map._normalLayerMgr.saveFramebuffer();this.map._normalLayerMgr.bindFramebuffer(this.map._normalLayerMgr.pickFBO);this.map._normalLayerMgr.clear();this.map._webglPainter._camera._updatePolyLayerMatrix(this.center);var i=this.map._webglPainter._camera._modelViewMatrixLayer;var oI=ga.create(Float64Array);ga.multiply(oI,this.map._webglPainter.projMatrix,i);this.render(C,oI,{isPickRender:true});var e=new Uint8Array(4*this.pickWidth*this.pickHeight);C.readPixels(oK*oL-Math.floor(this.pickWidth/2),C.canvas.height-oJ*oL-Math.floor(this.pickHeight/2),this.pickWidth,this.pickHeight,C.RGBA,C.UNSIGNED_BYTE,e);var oH=this.rgbToIndex(e);if(this.getPickedItem){var oM=this.getPickedItem(oH,T)}this.map._normalLayerMgr.restoreFramebuffer();return oM},render:function(C,e,i){throw new Error("用户未实现render方法")},afterRender:function(i,e){},onDestroy:function(e,i){},onHide:function(e,i){},onShow:function(e,i){},doOnceDraw:function(){if(this.map){var e=new iv("onupdate");this.map.dispatchEvent(e)}},doRender:function(){if(!this.map){return false}var e=this.map.getZoom();if(this.visible){if(e>=this.minZoom&&e<=this.maxZoom){if(!this._status){this.onShow(this.map,this.gl);this._status=1}return true}}if(this._status){this.onHide(this.map,this.gl);this._status=0}return false},getZIndex:function(){if(this.zIndex===undefined){throw new Error("图层未添加到地图")}return this.zIndex},getVisible:function(){return this.visible},setVisible:function(e){this.visible=e;this.doOnceDraw()},getMinZoom:function(){return this.minZoom},setMinZoom:function(e){if(e<=this.maxZoom){this.minZoom=e}},getMaxZoom:function(){return this.maxZoom},setMaxZoom:function(e){if(e>=this.minZoom){this.maxZoom=e}},dispatcher:function(oH,T,C){var i=new iv(C);i.pixel=oH.pixel;i.latLng=oH.latlng;i.value=T;this.dispatchEvent(i)},hasEvent:function(e){if(this.enablePicked){if(e.substr(0,2)!=="on"){e+="on"}if(this._listeners&&this._listeners[e]&&Object.keys(this._listeners[e]).length>0){return true}return false}return false},toString:function(){return"normal"}});function jX(i){if(typeof kS!=="undefined"&&kS.sendMessage){kS.sendMessage("ThreeLayer")}i=i||{};const e={alpha:false,antialias:false};this.options=Object.assign({},e,i);if(!window.THREE){throw new Error("ThreeLayer requires THREE")}this._unsetlist=[];this._added=false;this._implReady=false;this._inited=false;dO.call(this,this.options);var C=this;kg.load("visualold",function(){C._onImplReady()},true)}jX.inherits(dO,"ThreeLayer");ht.extend(jX.prototype,{triggerRepaint:function(){this.needsUpdate=true;this.animate()},triggerStop:function(){this.needsUpdate=false},animate:function(){if(this.needsUpdate){this.doOnceDraw()}else{return}var e=this;this.frameTimer=requestAnimationFrame(function(){e.animate()})},refreshMap:function(){if(this.map){this.doOnceDraw()}},convertLngLat:function(e){this.customCoords.setCenter(this.center);const i=this.customCoords.lngLatsToCoords([e]);return i[0]},add:function(e){if(!this.scene){this._unsetlist.push(e);return}this.scene.add(e);this.refreshMap()},remove:function(e){if(!this.scene){var C=this._unsetlist.indexOf(e);if(C>=0){this._unsetlist.splice(C,1)}return}this.scene.remove(e);this.refreshMap()},getScene:function(){return this.scene},getCamera:function(){return this.camera},getRender:function(){return this.renderer},getMap:function(){if(this.map){return this.map}return null},onAdd:function(i,e){this.map=i;this.gl=e;this.customCoords=i.toFormatCoords;this._added=true;this._tryInit()},_onImplReady:function(){this._implReady=true;this._tryInit()},_tryInit:function(){if(this._implReady&&this._added&&!this._inited&&this._initImpl){this._inited=true;this._initImpl(this.gl)}},preRender:function(){},afterRender:function(){},render:function(){},onDestroy:function(){},onHide:function(){},onShow:function(){},pick:function(){return null}});function f6(e){e=e||{};dO.call(this,e);this.base_opt={idKey:"id",crs:"BD09LL",isFlat:true,drawPart:1,selectedIndex:-1,selectedColor:"rgba(20, 20, 200, 1.0)",enableChangeSelectIndexByPick:true,};this.setBaseOptions(e);this.loadModule=false;this._stateCube={};this.def=[];this.DEL_COUNT=20;this.delIndexs=[];var i=this;kg.load("visualold",function(){i._async()},true);this.select_color=this.getColorStyleForGL(this.base_opt.selectedColor);var C=new Int8Array(4);this.int32View=new Int32Array(C.buffer,0,1);this.float32View=new Float32Array(C.buffer,0,1)}f6.inherits(dO,"FeatureLayer");ht.extend(f6.prototype,{_async:function(){this.loadModule=true;this.resolveStyle();this.parseData()},compileExpress:function(i,e){var i=ge.ExpressParse.normalizePropertyExpression(i,e);return i},resolveStyle:function(){if(!ge.ExpressParse){return}var e=this.style_opt||{};var T=eJ[this.type];if(this._appendStyle){T=JSON.parse(JSON.stringify(T));Object.assign(T,this._appendStyle)}if(e&&this.type&&T){var C={};for(var i in e){var oI=T[i];if(e.hasOwnProperty(i)&&oI!==undefined){var oH=this.compileExpress(e[i],oI);C[i]=oH}}this.styleExpress=C}},_updateState:function(C,i,e){if(e){this._set(i,this._stateCube,C)}else{this._stateCube[C]=i}},_set:function(i,oH,C){var T=oH[C]||(oH[C]={});for(var e in i){T[e]=i[e]}},updateState:function(oH,oI,e){var C=JSON.stringify(this._stateCube);if(!(oI&&typeof oI==="object"&&Object.keys(oI).length>0)){return}if(!e){this._stateCube={}}if(oH instanceof Array){for(var T=0;T=this.DEL_COUNT){new Error("超出"+this.DEL_COUNT+"个限制")}var e=false;for(var T=0;T25)?6:i.nodeMinZoom;this.arrow_color=this.getColorStyleForGL(this.style_opt.arrowColor,null,false);f6.call(this,i);if(i.nodeShow){var oH=JSON.parse(JSON.stringify(i));oH=Object.assign(oH,{enablePicked:false,autoSelect:false,coorSysMc:true});this.attachNode=new bC(oH)}if(i.nodeStrict){var T=this;kg.load("mvtParse",function(){T.parseData()},true)}}c1.Segment={START_POINT:1,END_POINT:2,BREAK_POINT:3,MIDDLE_POINT:4,1:1,2:2,3:3,4:4};c1.inherits(f6,"LineLayer");ht.extend(c1.prototype,{onAdd:function(C,T){if(this.attachNode){this.attachNode.onAdd(C,T)}if(!this.map){this.map=C;this.gl=T}if(this.base_opt.isLinear&&this.base_opt.linearTexture){var i=this.drawLinearTexture(this.base_opt.linearTexture);if(i instanceof HTMLCanvasElement||(window.ImageBitmap&&textureName instanceof window.ImageBitmap)){if(!this.linearTexture){var e=fT.utils.createTexture(T,i,{flipY:false,wrap:T.CLAMP_TO_EDGE,mipmap:true,unpackAlpha:true});this.linearTexture=e}}}if(!this.buffer){this.parseData()}},preRender:function(C,i,e){},onDestroy:function(e,i){this.lines=null;this.buffer=null;this._bufferArray=[];this._texture={};f6.prototype.onDestroy.call(this);if(this.attachNode){this.attachNode.onDestroy()}},toString:function(){return"LineLayer"},render:function(){}});function f5(i){if(typeof kS!=="undefined"&&kS.sendMessage){kS.sendMessage("FillLayer")}i=i||{};this.type="polygon";var e=K.uiVersionIsGL()?"#142655":fo().fillColor;this.style_opt={fillColor:e,fillOpacity:1,pattern:false,patternMask:true,patternUrl:"",patternMapping:"0, 0, 32, 32",patternScale:1,patternOffset:"0, 0",height:0};this._appendStyle={height:{format:"number",defaultValue:0},};this.setStyleOptions(i.style||{});this._bufferArray=[];this._texture=null;f6.call(this,i);i.border=i.border===undefined?true:i.border;if(i.border){var C=JSON.parse(JSON.stringify(i));C=Object.assign(C,{enablePicked:false,autoSelect:false});this.attach=new c1(C)}}f5.inherits(f6,"FillLayer");ht.extend(f5.prototype,{onAdd:function(e,i){if(this.attach){this.attach.onAdd(e,i)}if(!this.map){this.map=e;this.gl=i}if(!this.buffer){this.parseData()}},preRender:function(C,i,e){},onDestroy:function(e,i){this.fills=null;this.buffer=null;this._bufferArray=[];this._texture=null;f6.prototype.onDestroy.call(this);if(this.attach){this.attach.onDestroy()}},toString:function(){return"FillLayer"},render:function(){}});function bC(i){i=i||{};this.type="point";var e=K.uiVersionIsGL()?{color:"green",strokeColor:"red"}:{color:fo().fillColor,strokeColor:fo().strokeColor};this.style_opt={visibility:true,nodeType:bC.NodeType.SHAPE,shapeType:bC.ShapeType.TRIANGLE,anchor:bC.Anchor.CENTER,size:32,scale:1,rotation:0,offset:[0,0],color:e.color,opacity:1,strokeColor:e.strokeColor,strokeWeight:0};this.setStyleOptions(i.style||{});this._bufferArray=[];i.isFlat=i.isFlat===undefined?true:i.isFlat;f6.call(this,i);kS.sendMessage("PointShapeLayer")}bC.Anchor={CENTER:0,TOP_LEFT:1,TOP_CENTER:2,TOP_RIGHT:3,RIGHT_CENTER:4,BOTTOM_RIGHT:5,BOTTOM_CENTER:6,BOTTOM_LEFT:7,LEFT_CENTER:8,0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8};bC.NodeType={ICON:1,SHAPE:2};bC.ShapeType={CIRCLE:0,SQUARE:1,TRIANGLE:2,DIAMOND:3,CROSS:4,ARROW:5,ARROW_TAIL:6,STAR:7,WATERDROP:9,0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,9:9};bC.inherits(f6,"PointShapeLayer");bC.hasMask=function(e){if(e===bC.ShapeType.TRIANGLE||e===bC.ShapeType.ARROW){return true}else{return false}};ht.extend(bC.prototype,{onAdd:function(e,i){if(!this.map){this.map=e;this.gl=i}if(!this.buffer){this.parseData()}},preRender:function(C,i,e){},onDestroy:function(e,i){this.buffer=null;this._bufferArray=[];f6.prototype.onDestroy.call(this)},toString:function(){return"PointShapeLayer"},render:function(){}});function i1(e){e=e||{};this.type="point";this.style_opt={visibility:true,nodeType:i1.NodeType.ICON,icon:"",iconObj:null,userSizes:true,anchors:[0,0],sizes:[32,32],scale:1,rotation:0,offset:[0,0],opacity:1,width:0,height:0,};this._appendStyle={anchors:{format:"object",defaultValue:[0,0]},sizes:{format:"object",defaultValue:[32,32]},width:{format:"number",defaultValue:32},height:{format:"number",defaultValue:32},};this.setStyleOptions(e.style||{});this._bufferArray=[];e.isFlat=e.isFlat===undefined?true:e.isFlat;e.isFixed=e.isFixed===undefined?true:e.isFixed;e.refLevel=e.refLevel===undefined?18:e.refLevel;f6.call(this,e);kS.sendMessage("PointIconLayer")}i1.NodeType={ICON:1,SHAPE:2};i1.inherits(f6,"PointIconLayer");ht.extend(i1.prototype,{onAdd:function(i,C){if(!this.map){this.map=i;this.gl=C}if(!this.buffer){this.parseData()}var e=this;i.addEventListener("oniconupdate",function(T){e.updateVertex()})},preRender:function(C,i,e){},onDestroy:function(e,i){this.buffer=null;this._bufferArray=[];f6.prototype.onDestroy.call(this)},toString:function(){return"PointIconLayer"},updateVertex:function(){},render:function(){}});function ks(e){this.gl=e;this.cache={};this.currentProgram=null}ks.get=function(e,i){if(!e._visualProgramCache||e._visualProgramCache.gl!==i){e._visualProgramCache=new ks(i)}return e._visualProgramCache};ks._hash=function(T){var C=5381;for(var e=0;e>>0};ks._withLineNumbers=function(oH){var e=String(oH).split("\n");var T=String(e.length).length;for(var C=0;C0){return}if(e.program){this.gl.deleteProgram(e.program);e.program=null}if(e.key!==null&&this.cache[e.key]===e){delete this.cache[e.key]}if(this.currentProgram===e){this.currentProgram=null}},use:function(e){if(!e||!e.program){return false}this.gl.useProgram(e.program);this.currentProgram=e;return true},_compileShader:function(i,T){var oH=this.gl;var C=oH.createShader(i);oH.shaderSource(C,T);oH.compileShader(C);if(!oH.getShaderParameter(C,oH.COMPILE_STATUS)){var e=oH.getShaderInfoLog(C);oH.deleteShader(C);return{error:e}}return{shader:C}},_create:function(oH,e,oL){var oI=this.gl;var oK={key:oL,vsSource:oH,fsSource:e,program:null,attributes:{},attributeInfo:{},uniforms:{},uniformInfo:{},numAttributes:0,refCount:1,error:null};var oM=this._compileShader(oI.VERTEX_SHADER,oH);var oJ=this._compileShader(oI.FRAGMENT_SHADER,e);if(oM.error||oJ.error){var i=oM.error?"vertexShader":"fragmentShader";var C=oM.error||oJ.error;oM.shader&&oI.deleteShader(oM.shader);oJ.shader&&oI.deleteShader(oJ.shader);oK.error={type:"compile",message:i+" 编译失败: "+C,source:oM.error?oH:e};console.error("[BMap] VisualProgram "+oK.error.message+"\n"+ks._withLineNumbers(oK.error.source));return oK}var T=oI.createProgram();oI.attachShader(T,oM.shader);oI.attachShader(T,oJ.shader);oI.linkProgram(T);oI.deleteShader(oM.shader);oI.deleteShader(oJ.shader);if(!oI.getProgramParameter(T,oI.LINK_STATUS)){oK.error={type:"link",message:"链接失败: "+oI.getProgramInfoLog(T),source:oH+"\n// ---- fragment ----\n"+e};oI.deleteProgram(T);console.error("[BMap] VisualProgram "+oK.error.message);return oK}oK.program=T;this._reflect(oK);return oK},_reflect:function(oO){var oI=this.gl;var oH=oO.program;var oL=oI.getProgramParameter(oH,oI.ACTIVE_ATTRIBUTES);oO.numAttributes=oL;for(var T=0;T1}}}});ks.componentsOf=function(i,e){switch(e){case i.FLOAT_VEC2:case i.INT_VEC2:case i.BOOL_VEC2:return 2;case i.FLOAT_VEC3:case i.INT_VEC3:case i.BOOL_VEC3:return 3;case i.FLOAT_VEC4:case i.INT_VEC4:case i.BOOL_VEC4:return 4;case i.FLOAT_MAT2:return 4;case i.FLOAT_MAT3:return 9;case i.FLOAT_MAT4:return 16;default:return 1}};function h5(){}ht.extend(h5,{normalize:function(oM,oK){oK=oK||"id";var oH=this._toFeatureArray(oM);var C=[];for(var T=0;T-1){return}e.map=this.map;this.layers.push(e);this.sortLayer();if(e.enablePicked){aC.ensure(this.map)}if(this.gl){this._initLayer(e)}this.map.dispatchEvent(new iv("onupdate"))},removeLayer:function(i){var e=this.layers.indexOf(i);if(e===-1){return}this.layers.splice(e,1);i.onDestroy&&i.onDestroy(this.map,this.gl);this.map.dispatchEvent(new iv("onupdate"))},removeAllLayers:function(){for(var e=0;e=0;oH--){var oK=C[oH];var oJ=this._pickTarget(oK,e,oL);if(!oJ){continue}T.push({target:oK,item:oJ});if(oI||!oK.pickThrough){break}}return T},_pickTarget:function(oI,oL,oJ){var e=this.map;var oN=e&&e._visualMgr;var oK=e&&e._webglPainter;if(!oN||!oN.gl||!oN.pickFBO||!oK||!oK.drawVisualPickPass){return null}var T=oN.gl;var oH=null;oN.saveFramebuffer();oN.bindFramebuffer(oN.pickFBO);oN.clear();try{if(oK.drawVisualPickPass([oI])){var oM=oI.pickTolerance==null?4:oI.pickTolerance;oH=this._readCandidates(T,oL,oJ,oM)}}finally{oN.restoreFramebuffer()}if(!oH||!oH.length){return null}for(var C=0;CaC.MAX_CANDIDATES?oQ.slice(0,aC.MAX_CANDIDATES):oQ},_ensureBuffer:function(e){if(!this._pixelBuffer||this._pixelBuffer.length=this.minZoom&&e<=this.maxZoom;if(this.visible&&i){if(!this._status){this.onShow(this.map,this.gl);this._status=1}return true}if(this._status){this.onHide(this.map,this.gl);this._status=0}return false},toString:function(){return"WebGLLayer"}});function nG(e){e=e||{};bR.call(this,e);this._style={blend:e.blend||"default"};this._data=e.data||null;this._features=null;this._buffers=[];this._idKey=e.idKey||"id";this.enablePicked=e.enablePicked===undefined?false:!!e.enablePicked;this.supportMouseStyleChange=e.mouseStyleChange===undefined?true:!!e.mouseStyleChange;this.pickTolerance=e.pickTolerance==null?4:e.pickTolerance;this.pickThrough=e.pickThrough===undefined?false:!!e.pickThrough}nG.inherits(bR,"FeatureVisualLayer");nG.INSTANCE_SETTERS={opacity:"setOpacity",visible:"setVisible",zIndex:"setZIndex",referCenter:"setRefCenter",renderStage:"setRenderStage",enablePicked:"setEnablePicked"};ht.extend(nG.prototype,{setData:function(e){this._data=e;if(this._inited){this._rebuild();this.triggerRepaint()}return this},getData:function(){return this._data},clearData:function(){this._data=null;this._features=null;if(this._inited){this._destroyBuffers(this._buffers);this._buffers=[];this.triggerRepaint()}return this},_warnOnce:function(e,i){this._optWarned=this._optWarned||{};if(!this._optWarned[e]){this._optWarned[e]=true;console.warn(i)}},setOptions:function(i){i=i||{};for(var e in i){if(!i.hasOwnProperty(e)){continue}if(this._style.hasOwnProperty(e)){this._style[e]=i[e]}else{if(nG.INSTANCE_SETTERS[e]){this[nG.INSTANCE_SETTERS[e]](i[e])}else{if(e==="minZoom"||e==="maxZoom"){this[e]=Number(i[e])}else{this._warnOnce("unknown_"+e,"[BMap] "+this.toString()+": 未知选项 "+e+",已忽略")}}}}this._onOptionsChanged&&this._onOptionsChanged(i);this.triggerRepaint();return this},getOptions:function(){return this._style},_buildGeometry:function(e){},_draw:function(i,e){},setEnablePicked:function(e){this.enablePicked=!!e;if(!this.enablePicked&&this.map&&this.map._visualPicker){this.map._visualPicker.dropTarget(this)}if(this.enablePicked&&this.map){aC.ensure(this.map)}return this},getEnablePicked:function(){return this.enablePicked},pickable:function(){if(!this.enablePicked||!this.visible||!this.map||!this._inited){return false}var e=this.map.getZoom();return e>=this.minZoom&&e<=this.maxZoom&&this._hasPickData()},getPickTargets:function(){return[this]},_hasPickData:function(){return !!(this._buffers&&this._buffers.length)},resolvePickIndex:null,toString:function(){return"FeatureVisualLayer"}});function bo(e){this.layer=e;this.map=null;this.gl=null;this._gl=null;this._state=null;this._program=null;this._uniforms={};this._attributes={};this._vertices=null;this._indices=null;this._textures={};this._textureUnits=0;this._drawSpec=null;this._bound=false;this._enabledLocations=[];this._warned={}}ht.extend(bo.prototype,{toString:function(){return"CustomRenderContext"}});function L(e){e=e||{};if(!e.vertexShader||!e.fragmentShader){throw new Error("WebGLCustomLayer 需要 vertexShader 与 fragmentShader")}bR.call(this,e);L._checkOptions(e);this._vs=e.vertexShader;this._fs=e.fragmentShader;this._unsafeGL=!!e.unsafeGL;this._onReadyCb=e.onReady;this._onRenderCb=e.onRender;this._onDestroyCb=e.onDestroy;this._onErrorCb=e.onError;this._readyStatus="pending";this._animating=!!e.animation;this._addTime=Date.now();this._spec={uniforms:ht.extend({},e.uniforms||{}),attributes:ht.extend({},e.attributes||{}),textures:ht.extend({},e.textures||{}),vertices:e.vertices||null,indices:e.indices||null,draw:e.draw||null};this._renderState=L._normalizeRenderState(e.renderState);this._ctx=new bo(this)}L.inherits(bR,"WebGLCustomLayer");L.OPTION_KEYS=["vertexShader","fragmentShader","attributes","vertices","indices","uniforms","textures","draw","renderState","animation","unsafeGL","onReady","onRender","onDestroy","onError","visible","opacity","zIndex","minZoom","maxZoom","referCenter","renderStage"];L._checkOptions=function(i){for(var e in i){if(i.hasOwnProperty(e)&&L.OPTION_KEYS.indexOf(e)===-1){console.warn('[BMap] WebGLCustomLayer: 未知选项 "'+e+'",已忽略。可用选项见 '+L.OPTION_KEYS.join(" / "))}}};L._normalizeRenderState=function(e){e=e||{};return{depthTest:!!e.depthTest,depthWrite:!!e.depthWrite,depthFunc:e.depthFunc||null,blend:e.blend===undefined?"normal":e.blend,cullFace:e.cullFace||"none",frontFace:e.frontFace||null}};L.DEFAULT_BASE_MC=[12069475.280738307,3929271.1724863998];ht.extend(L.prototype,{_getBaseMC:function(){if(this.center){var i=m5.convertLL2MC(this.center);return[i.lng,i.lat]}var e=this.map&&this.map._normalLayerMgr;if(e&&e.base){return[e.base.lng,e.base.lat]}return L.DEFAULT_BASE_MC},projectToLayer:function(oI){if(!oI||!oI.length){return oI}var oH=this._getBaseMC();if(typeof oI[0]==="number"){var oJ=m5.convertLL2MC(new d7(oI[0],oI[1]));return[oJ.lng-oH[0],oJ.lat-oH[1]]}var e=[];for(var C=0;C-1){this._unsetList.splice(C,1)}}}return this},getScene:function(){return this.scene},getCamera:function(){return this.camera},getRenderer:function(){return this.renderer},getStatus:function(){return this._readyStatus},getTime:function(){return(Date.now()-this._addTime)/1000},projectToLayer:function(oI){if(!oI||!oI.length){return oI}var oH=this._getBaseMC();if(typeof oI[0]==="number"){var oJ=m5.convertLL2MC(new d7(oI[0],oI[1]));return[oJ.lng-oH[0],oJ.lat-oH[1]]}var e=[];for(var C=0;C3&&parseFloat(C[3])===0}return false},_normalizeTrace:function(){var T=this._style;var C=this._traceStyle;var i=this._isHiddenColor(T.passedColor);var oI=this._isHiddenColor(T.upcomingColor);var e=!i&&T.passedColor!=null;var oJ=!oI&&T.upcomingColor!=null;C.hideAll=!T.lineVisible||(i&&oI);C.none=!(i||oI||e||oJ);C.color=T.strokeColor;C.start=true;C.disappear=false;if(i){C.disappear=true}else{if(oI){C.start=false;C.disappear=true}else{if(e){C.color=T.passedColor}else{if(oJ){C.start=false;C.color=T.upcomingColor}}}}if(C.hideAll){C.none=false;C.start=true;C.disappear=true}var oH=!(i&&oI)&&(i||e)&&(oI||oJ);if(oH&&!this._traceWarned){this._traceWarned=true;console.warn("[BMap] TrackLine: passedColor 与 upcomingColor 只能有一个偏离主线色 strokeColor,已按「隐藏优先于染色,同级时 passedColor 优先」取其一,另一个被忽略")}return C},_normalizeFollowOptions:function(i){var e=this._followOpt;if(!i){return e}if(i.position instanceof Array){e.position=[Number(i.position[0])||0,Number(i.position[1])||0]}if(i.lookAt!=null){e.lookAt=Number(i.lookAt)||0}if(i.fixedLookAt!==undefined){e.fixedLookAt=!!i.fixedLookAt}if(i.rotationDuration!=null&&Number(i.rotationDuration)>=0){e.rotationDuration=Number(i.rotationDuration)}if(i.minRotation!=null&&Number(i.minRotation)>=0){e.minRotation=Number(i.minRotation)}if(i.idleTimeout!=null&&Number(i.idleTimeout)>=0){e.idleTimeout=Number(i.idleTimeout)}return e},clearData:function(){this.stop();this._steps=null;this._mcPoints=null;this._distance=0;return nG.prototype.clearData.call(this)},start:function(){this._start&&this._start();return this},pause:function(){this._pause&&this._pause();return this},resume:function(){this._resume&&this._resume();return this},stop:function(){this._stop&&this._stop();return this},setSpeed:function(e){this._setSpeed&&this._setSpeed(e);return this},getSpeed:function(){return this._speed},setProcess:function(e){this._setProcess&&this._setProcess(e);return this},getProcess:function(){return this._process},setElapsed:function(e){this._setElapsed&&this._setElapsed(e);return this},getElapsed:function(){return this._elapsed},getStatus:function(){return this._playStatus},getDistance:function(){return this._distance},getInfoByProcess:function(e){return this._getInfoByProcess?this._getInfoByProcess(e):null},getMovePoint:function(){return this._movePointObj},setMovePoint:function(e){this._style.movePoint=e;this._applyMovePoint&&this._applyMovePoint();return this},getSpeedMode:function(){return this._effectSpeedMode},setAutoFollow:function(e){this._style.autoFollow=!!e;this._applyAutoFollow&&this._applyAutoFollow();return this},getAutoFollow:function(){return !!this._style.autoFollow},setFollowOptions:function(e){this._normalizeFollowOptions(e);this._style.followOptions=e||this._style.followOptions;this._applyAutoFollow&&this._applyAutoFollow();return this},getFollowOptions:function(){var e=this._followOpt;return{position:[e.position[0],e.position[1]],lookAt:e.lookAt,fixedLookAt:e.fixedLookAt,rotationDuration:e.rotationDuration,minRotation:e.minRotation,idleTimeout:e.idleTimeout}},setVisible:function(e){bR.prototype.setVisible.call(this,e);this._syncMovePointVisible&&this._syncMovePointVisible()},toString:function(){return"TrackLine"}});function i6(i){i=i||{};nG.call(this,i);var e=K.uiVersionIsGL()?"rgba(25, 25, 250, 0.6)":fo().fillColor;var C=K.uiVersionIsGL()?"rgba(250, 250, 25, 1)":fo().strokeColor;this._style.fillColor=i.fillColor||e;this._style.fillOpacity=i.fillOpacity==null?1:i.fillOpacity;this._style.strokeColor=i.strokeColor||C;this._style.strokeWeight=i.strokeWeight==null?0:i.strokeWeight;this._style.strokeOpacity=i.strokeOpacity==null?1:i.strokeOpacity;this._style.fillTextureUrl=i.fillTextureUrl||"";this._style.fillTextureSize=i.fillTextureSize==null?null:i.fillTextureSize;this._style.fillTextureAlphaOnly=!!i.fillTextureAlphaOnly;this._border=null;this._fillTex=null;this._items=null;this._texWarned={};this._syncBorder()}i6.inherits(nG,"PolygonLayer");ht.extend(i6.prototype,{_onOptionsChanged:function(e){e=e||{};var i=this._syncBorder(e);if(!this._inited){return}if(i){this._rebuild()}else{if(e.fillColor!==undefined||e.fillOpacity!==undefined){this._restyleFill()}}},_syncBorder:function(oJ){var oH=this._style;var e=typeof oH.strokeWeight==="function"||oH.strokeWeight>0;if(!e){if(this._border){this._border.onDestroy();this._border=null}return false}var oK=!this._border;if(oK){this._border=new gX({strokeLineJoin:"miter",strokeLineCap:"butt",referCenter:this.center||null})}var oI=["strokeColor","strokeWeight","strokeOpacity"];var T=null;for(var C=0;C=0&&C0){this._layer.setData(e)}else{this._layer.clearData()}},_toGeoJSON:function(T){var C=[];for(var e=0;e=9000&&oM.current_city["code"]<=9378){oM.current_city["name"]="台湾省"}if(oM.current_city["code"]>=20000&&oM.current_city["code"]<=20499){oM.current_city["name"]="新加坡"}if(oM.current_city["code"]>=20500&&oM.current_city["code"]<=25999){oM.current_city["name"]="泰国"}if(oM.current_city["code"]>=26000&&oM.current_city["code"]<=29999){oM.current_city["name"]="日本"}if(oM.current_city["code"]>=30000&&oM.current_city["code"]<=30999){oM.current_city["name"]="韩国"}if(oM.current_city["code"]>=31000&&oM.current_city["code"]<=37000){oM.current_city["name"]="亚太"}if(oM.current_city["code"]>=46609&&oM.current_city["code"]<=52505){oM.current_city["name"]="欧洲"}if(oM.current_city["code"]>=39509&&oM.current_city["code"]<=53500){oM.current_city["name"]="南美洲"}if(oM.current_city["code"]>=54000&&oM.current_city["code"]<=70000){oM.current_city["name"]="北美洲"}if(oM.current_city["code"]===54003&&oM.current_city["code"]>=60731&&oM.current_city["code"]<=61123){oM.current_city["name"]="美国"}if(oM.current_city["code"]===54015||oM.current_city["code"]>=57970&&oM.current_city["code"]<=60223){oM.current_city["name"]="加拿大"}if(oM.current_city["code"]===54025||oM.current_city["code"]>=54338&&oM.current_city["code"]<=57374){oM.current_city["name"]="墨西哥"}e.enableRequest=true;if(oM&&oM.current_city){var oL=oM.current_city["name"];var oK=oM.current_city["code"];if(oK!==i.cCode){var oJ=new iv("oncitychange");oJ.name=oL;oJ.code=oK;i.dispatchEvent(oJ)}i.cityName=oL;i.cCode=oK;if(!c7()){eM(i)}}},{qt:"cen",b:C.lng+","+C.lat+";"+oH.lng+","+oH.lat,l:oI},"","",true)};i.addEventListener("load",function(C){e.request()});i.addEventListener("moveend",function(C){e.request()});i.addEventListener("zoomend",function(C){e.request()});e.request()});function ng(C){var e={};var i=new ol(e);C.addControl(i);return i}function cz(C){var i={};var e=new ni(i);C.stickySpamCtrl=e;C.addControl(e);return e}function W(i){if(i.temp.copyadded){return}i.temp.copyadded=true;if(!i.cpyCtrl){var T=new mS(2,2);i.config.cpyCtrlOffset=T;if(c7()){T.width=72;T.height=0}var C=new iY({offset:T,printable:true});i.cpyCtrl=C}if(!c7()||i.config.showCopyrightOnMobile){eM(i);i.addEventListener("maptypechange",function(){eM(i)});i.addEventListener("onlanguage_change",function(){eM(i)})}i.addControl(C);var e=new cA();e._opts={printable:true};i.logoCtrl=e;i.addControl(e);i.addEventListener("resize",function(){if(this.getSize().width>=300&&i.getSize().height>=100){e.show();C&&C.setOffset(i.config.cpyCtrlOffset)}else{e.hide();C&&C.setOffset(new mS(4,2))}});if(i.getSize().width>=300&&i.getSize().height>=100){e.show()}else{e.hide();C.setOffset(new mS(4,2))}i.addEventListener("oncopyrightoffsetchange",function(oH){i.logoCtrl.setOffset(oH.target.logo);i.cpyCtrl.setOffset(oH.target.cpy);if(oH.target.cpy){i.config.cpyCtrlOffset=oH.target.cpy}});i.dispatchEvent(new iv("oncopyrightaddend"))}function eM(oW){if(!oW.cpyCtrl){var o4=new mS(2,2);if(c7()){o4.width=72;o4.height=0}var oZ=new iY({offset:o4,printable:true});oW.cpyCtrl=oZ}var pd=oW.cityName||"中国";var oX=oW.getMapTypeId();var oY=["常州市","南昌市","乌鲁木齐市","无锡市","福州市","泉州市","珠海市","贵阳市"];var oQ=["北京市","上海市","广州市","深圳市","宁波市","石家庄市","沈阳市","长春市","青岛市","温州市","台州市","金华市","佛山市","中山市","昆明市","南宁市","苏州市","西安市","济南市","郑州市","合肥市","呼和浩特市","杭州市","成都市","武汉市","长沙市","天津市","南京市","重庆市","大连市","东莞市","厦门市"];var oS=["香港特别行政区"];var oL=["台湾省"];var o5=["日本"];var pb=["韩国"];var o0=["泰国"];var o3=["亚太"];var oM=["新加坡"];var pc=["欧洲"];var T=["南美洲"];var o8=["北美洲"];var C=["美国"];var o2=["墨西哥"];var oJ=["加拿大"];for(var o9 in oY){if(oY[o9]===pd){var oT=true;break}}for(var o9 in oQ){if(oQ[o9]===pd){var oH=true;break}}for(var o9 in oS){if(oS[o9]===pd){var pf=true;break}}if(oL[0]===pd){var o7=true}if(oM[0]===pd){var i=true}if(o5[0]===pd){var oP=true}if(pb[0]===pd){var oV=true}if(o0[0]===pd){var oU=true}if(o3[0]===pd){var oK=true}if(pc[0]===pd){var oR=true}if(T[0]===pd){var oO=true}if(o8[0]===pd){var e=true}if(C[0]===pd){var pa=true}if(oJ[0]===pd){var o6=true}if(o2[0]===pd){var oI=true}var oN=K.getGS(oW.getLanguage());var pe=["© 2026 Baidu - "+oN+"号 - 甲测资字11111342 - 京ICP证030173号 - Data © "];var o1="rgba(255, 255, 255, 0.701961)";if(oW.getZoom()<=9){pe.push("百度智图");pe.push(' & OpenStreetMap');pe.push(' & HERE');if(oX===j7||oX===fn){pe.push(' & ESO');o1="rgba(0,0,0,.7)"}}else{if(oP||oV){pe.push('OpenStreetMap')}else{if(i||oU){pe.push('HERE')}else{if(oK){pe.push('HERE');pe.push(' & Mapbox')}else{if(oR){pe.push('OpenStreetMap');pe.push(' & Mapbox')}else{if(oO){pe.push('OpenStreetMap');pe.push(' & Mapbox')}else{if(pa||oI||o6){pe.push('HERE');pe.push(' & Mapbox')}else{if(e){pe.push('OpenStreetMap');pe.push(' & Mapbox')}else{pe.push("百度智图");if(oT){pe.push(' & PalmCity')}if(pf){pe.push(' & MapKing')}if(o7){pe.push(' & HERE');pe.push(' & 樂客LocalKing')}if(oX===j7||oX===fn){o1="rgba(0,0,0,.6)"}}}}}}}}}pe.unshift('');pe.push("");pe=pe.join("");oW.cpyCtrl.addCopyright({id:1,content:pe})}function ol(e){this["defaultAnchor"]=BMAP_ANCHOR_TOP_RIGHT;this["defaultOffset"]=e.defaultOffset||new mS(90,6);this._cZIndex=9999;this._visible=false}ol.prototype=new jK();ol.prototype.initialize=function(oH){this._map=oH;var T=this;var e=c8("div");var i=e.style;i.left=i.top="50%";i.display="none";i.padding="24px";i.overflow="visible";i.position="absolute";i.width="50%";i.maxWidth="360px";i.transform="translate(-50% , -50%)";i.zIndex="9999";i.background="#fff";i.userSelect="none";var oI=c8("span",{style:"margin-top: 12px;\n margin-bottom: -12px;\n margin-left: calc(100% - 48px);\n width: 56px;\n height: 32px;\n font-size: 14px;\n text-align: center;\n line-height: 32px;\n display: block;\n cursor: pointer;\n background: #3894FF;\n border: solid 1px #3f51b53b;\n color: #fff;\n border-radius: 3px;"});oI.innerText="确定";oI.addEventListener("click",function(){T.hide()});var C=c8("div");var oJ=C.style;oJ.position="relative";oJ.width="100%";oJ.height="100%";oJ.color="#000";oJ.fontSize="14px";oJ.wordBreak="break-all";e.appendChild(C);e.appendChild(oI);oH.getContainer().appendChild(e);return e};ol.prototype._setPosition=function(){};ol.prototype.update=function(e){if(!this.isVisible()){this._container.firstChild.innerText=e;this.show()}};function ni(C){jK.call(this);C=C||{};this._opts={};this._opts=ht.extend(this._opts,C);var i=lI();var oH=cY.popup_code;var e="系统于"+i.year+"年"+i.month+"月"+i.day+"日";this._prefixMsg="【"+oH+"】"+e;this["defaultAnchor"]=gt.TOP_RIGHT;var T=c7()?new mS(40,40):new mS(200,40);this["defaultOffset"]=C.defaultOffset||T;this._cZIndex=9999;this._visible=false}ni.inherits(jK,"StickySpam");ni.prototype.initialize=function(oH){this._map=oH;var T=this;var e=this._container=c8("div");var i=e.style;i.display="none";i.padding="10px 15px";i.overflow="visible";i.maxWidth=c7()?"250px":"360px";i.background="#fff8ee";i.borderWidth="3px";i.borderStyle="solid";i.borderColor="#e29e32";i.position="relative";var C=c8("div");var oI=C.style;oI.position="relative";oI.width="100%";oI.height="100%";oI.color="#e29e32";oI.fontSize="14px";oI.fontWeight="500";oI.wordBreak="break-all";oI.lineHeight="1.5";C.style.cssText+="; a { color: #1565c0; text-decoration: none; border-bottom: 1px solid rgba(21, 101, 192, 0.3); }";C.style.cssText+='; a[href^="tel:"] { color: #2e7d32; border-bottom-color: rgba(46, 125, 50, 0.3); }';e.appendChild(C);oH.getContainer().appendChild(e);return e};ni.prototype.update=function(i){if(!this.isVisible()){var e=this._convertUrlsToLinks(this._prefixMsg+i);this._container.firstChild.innerHTML=e;this.show()}};ni.prototype._convertUrlsToLinks=function(C){C=C.replace(/\n/g,"
    ");var i=/(https?:\/\/[^\s]+)/g;C=C.replace(i,function(T){if(T.length>200){return T}if(!T.match(/^https?:\/\//)){return T}return''+T+""});var e=/(\d{3,4}[-\s]?\d{3,4}[-\s]?\d{4}|\d{11})/g;C=C.replace(e,function(T){var oH=T.replace(/[-\s]/g,"");return''+T+""});return C};window.BMAP_STATUS_SUCCESS=0;window.BMAP_STATUS_CITY_LIST=1;window.BMAP_STATUS_UNKNOWN_LOCATION=2;window.BMAP_STATUS_UNKNOWN_ROUTE=3;window.BMAP_STATUS_INVALID_KEY=4;window.BMAP_STATUS_INVALID_REQUEST=5;window.BMAP_STATUS_PERMISSION_DENIED=6;window.BMAP_STATUS_SERVICE_UNAVAILABLE=7;window.BMAP_STATUS_TIMEOUT=8;window.BMAP_ROUTE_TYPE_WALKING=2;window.BMAP_ROUTE_TYPE_DRIVING=3;window.BMAP_ROUTE_TYPE_RIDING=6;window.BMAP_ROUTE_STATUS_NORMAL=0;window.BMAP_ROUTE_STATUS_EMPTY=1;window.BMAP_ROUTE_STATUS_ADDRESS=2;var J="carport_list";var fR="carport_auth";var e4="cur";var am="cen";var V="s";var ft="con";var ff="bd";var ey="nb";var ka="bt";var bn="nav";var lJ="walk";var iE="gc";var fV="rgc";var X="dec";var l6="iploc";var jP="bse";var i9="nse";var e0="s";var gF="bsl";var iB="bda";var gz="sa";var bV="nba";var lT="drag";var mT="ext";var nW="exts";var n3="hip";var kW="ride";var ok="drct";var de="ldt";var aT="place";var h0=2;var b3=4;var iN=7;var lU=11;var dt=12;var hn=14;var eu=15;var gj=18;var a1=20;var bU=21;var S=19;var a=23;var mn=26;var a3=28;var ja=31;var hC=35;var l7=44;var b1=45;var aY=46;var nT=47;var jg=-1;var bY=0;var ct=1;var m2=2;var fK=3;window.BMAP_POI_TYPE_NORMAL=0;var ed=1;var lY=2;BMapGL.I=ht.I;var cI={};cI.removeHtml=function(e){e=e.replace(/<\/?[^>]*>/g,"");e=e.replace(/[ | ]* /g," ");return e};cI.parseGeoExtReg1=function(e){return e.replace(/([1-9]\d*\.\d*|0\.\d*[1-9]\d*|0?\.0+|0|[1-9]\d*),([1-9]\d*\.\d*|0\.\d*[1-9]\d*|0?\.0+|0|[1-9]\d*)(,)/g,"$1,$2;")};cI.parseGeoExtReg2=function(i,e){var C=new RegExp("(((-?\\d+)(\\.\\d+)?),((-?\\d+)(\\.\\d+)?);)(((-?\\d+)(\\.\\d+)?),((-?\\d+)(\\.\\d+)?);){"+e+"}","ig");return i.replace(C,"$1")};var fB=0;var e2=1;var ag=2;cI.unique=function(C){var oI=false;var oH=[];var oJ={};for(var T=0,e=C.length;T21){C=21}return C};cI.parseGeo=function(oJ,oM){if(typeof oJ!="string"||!oJ){return}var oO=oJ.split("|");var e;var oH;var C;if(oO.length==1){e=dg(oJ)}else{e=dg(oO[2]);oH=dg(oO[0]);C=dg(oO[1]);if(!oM){return e}}var oK={type:e.geoType};if(oM){switch(oK.type){case ag:var oL=new d7(e.geo[0][0],e.geo[0][1]);var oN=m5.convertMC2LL(oL);oK.point=oN;oK.points=[oN];break;case e2:oK.points=[];var oP=e.geo[0];for(var oI=0,T=oP.length-1;oI0.25&&oQ<1){oQ=1}else{if(oQ>32){oQ=32}}}}var oL=oZ.split("|");if(oL.length==1){var T=dg(oL[0]);return{type:T.type,bound:"",points:T.geo.join(",")}}else{if(oL.length>1){var oR=oZ.split(";.=");var oN=[];var oH=[];var oS=0;var oW=oR.length;for(var oT=0;oT1){if(oT==0){oY=oY+";"}if(oT>0&&oT0){oX=cI.parseGeoExtReg2(oX,oQ)}oH.push(oX)}if(oW<=1){oH=oH.join(";")}if(oW==2){var C=oH[0]+";"+oH[1];var oJ=C.split(";");var e=[];for(var oT=0;oTeY){e=eY-e}if(oK>eY){oK=eY-oK}T.push(T[C-2]+e);T.push(T[C-1]+oK);return 0}function fs(i){var e=i.charCodeAt(0);if(i>="A"&&i<="Z"){return e-"A".charCodeAt(0)}else{if(i>="a"&&i<="z"){return(26+e-"a".charCodeAt(0))}else{if(i>="0"&&i<="9"){return(52+e-"0".charCodeAt(0))}else{if(i=="+"){return 62}else{if(i=="/"){return 63}}}}}return -1}cI.pathToPoints=function(oI){var T=[];if(typeof oI!=="string"){return T}else{var oH=oI.split(";");for(var C=0;Cec.MAX_PAGE_CAPACITY?ec.DEFAULT_PAGE_CAPACITY:e)}else{this._opts.pageCapacity=ec.DEFAULT_PAGE_CAPACITY}},getPageCapacity:function(){return this._opts.pageCapacity},setPageNum:function(e){if(typeof e=="number"&&!isNaN(e)&&e>=0){this._opts.pageNum=e}else{this._opts.pageNum=ec.DEFAULT_PAGE_NUM}},getPageNum:function(){return this._opts.pageNum},toString:function(){return"LocalSearch"}});function b4(i){if(typeof kS!=="undefined"&&kS.sendMessage){kS.sendMessage("Geocoder")}this._opts={};this.setOptions(i||{});this._queryList=[];var e=this;kg.load("otherSearch",function(){e._asyncSearch()})}b4.inherits(eV,"Geocoder");ht.extend(b4.prototype,{getPoint:function(e,C,i){kS.sendMessage("Geocoder","getPoint");this._queryList.push({method:"getPoint",arguments:[e,C,i]})},getLocation:function(e,C,i){kS.sendMessage("Geocoder","getLocation");this._queryList.push({method:"getLocation",arguments:[e,C,i]})},setOptions:function(e){ht.extend(this._opts,e||{});if(this._opts.language&&(this._opts.language===BMAP_LANGUAGE_ZH||this._opts.language===BMAP_LANGUAGE_EN)){this._language=this._opts.language}else{this._language=BMAP_LANGUAGE_ZH}},toString:function(){return"Geocoder"}});function eE(e){if(typeof kS!=="undefined"&&kS.sendMessage){kS.sendMessage("Geolocation")}e=e||{};this.config={timeout:e.timeout||1000*10,maximumAge:e.maximumAge||0,enableHighAccuracy:e.enableHighAccuracy===undefined?true:e.enableHighAccuracy,SDKLocation:e.SDKLocation||false};this._pendingCalls=[];var i=this;kg.load("otherSearch",function(){var C=i._pendingCalls.length;for(var T=0;T=BMAP_TRANSIT_POLICY_RECOMMEND&&e<=BMAP_TRANSIT_POLICY_FIRST_SUBWAYS){this._opts.policy=e}else{this._opts.policy=BMAP_TRANSIT_POLICY_RECOMMEND}},setIntercityPolicy:function(e){if(e>=BMAP_INTERCITY_POLICY_LEAST_TIME&&e<=BMAP_INTERCITY_POLICY_CHEAP_PRICE){this._opts.intercityPolicy=e}else{this._opts.intercityPolicy=BMAP_INTERCITY_POLICY_LEAST_TIME}},setTransitTypePolicy:function(e){if(e>=BMAP_TRANSIT_TYPE_POLICY_TRAIN&&e<=BMAP_TRANSIT_TYPE_POLICY_COACH){this._opts.transitTypePolicy=e}else{this._opts.transitTypePolicy=BMAP_TRANSIT_TYPE_POLICY_TRAIN}},_internalSearch:function(i,e){this._queryList.push({method:"_internalSearch",arguments:[i,e]})},search:function(i,e){kS.sendMessage("TransitRoute","search");this._queryList.push({method:"search",arguments:[i,e]})},setPageCapacity:function(e){if(typeof e==="string"){e=parseInt(e,10);if(isNaN(e)){this._opts.pageCapacity=hf.MAX_PAGE_CAPACITY;return}}if(typeof e!=="number"){this._opts.pageCapacity=hf.MAX_PAGE_CAPACITY;return}if(e>=1&&e<=hf.MAX_PAGE_CAPACITY){this._opts.pageCapacity=Math.round(e)}else{this._opts.pageCapacity=hf.MAX_PAGE_CAPACITY}},toString:function(){return"TransitRoute"},_shortTitle:function(e){return e.replace(/\(.*\)/,"")}});window.BMAP_HIGHLIGHT_STEP=1;window.BMAP_HIGHLIGHT_ROUTE=2;var ei=function(e,T){n7.call(this,e,T);this._overlays=[];this._curIndex=-1;this._queryList=[];var C=this;var i=this._opts.renderOptions;if(i.highlightMode!==BMAP_HIGHLIGHT_STEP&&i.highlightMode!==BMAP_HIGHLIGHT_ROUTE){i.highlightMode=BMAP_HIGHLIGHT_STEP}this._enableDragging=this._opts.renderOptions.enableDragging?true:false;kg.load("route",function(){C._asyncSearch()},true);if(this.init_d){this.init_d()}};ei.ROAD_TYPE=["","roundabout","unknownRoad","mainRoad","highwayConnector","roadSegWithinInter","connectingRoad","parkInnerRoad","serviceInnerRoad","bridge","pedeStreet","serviceRoad","ramp","fullyEnclosedRoad","undefinedTrafficArea","poiConnectorRoad","tunnel","footpath","busOnlyLane","advancedLeftLane",];ht.inherit(ei,n7,"DWRoute");ht.extend(ei.prototype,{search:function(C,e,i){kS.sendMessage(this._className,"search");this._queryList.push({method:"search",arguments:[C,e,i]})}});var mz=function(e,oH){n7.call(this,e,oH);this._overlays=[];this._queryList=[];var T=this;this.map=oH.renderOptions.map;this._enableDragging=this._opts.renderOptions.enableDragging?true:false;this._lineLayerStyle={lineLayerColor:this._opts.renderOptions.lineLayerStyle.lineLayerColor||{color:"#0089ff",opacity:1},isTop:this._opts.renderOptions.isTop||false,showTraffic:this._opts.renderOptions.lineLayerStyle.showTraffic||false,sequence:this._opts.renderOptions.sequence||true,marginLength:this._opts.renderOptions.marginLength||32,borderColor:this._opts.renderOptions.lineLayerStyle.borderColor||"#0089ff",borderMask:this._opts.renderOptions.lineLayerStyle.borderMask||false,borderWeight:this._opts.renderOptions.lineLayerStyle.borderWeight||2,strokeWeight:this._opts.renderOptions.lineLayerStyle.strokeWeight||6,strokeLineJoin:this._opts.renderOptions.lineLayerStyle.strokeLineJoin||"round",strokeLineCap:this._opts.renderOptions.lineLayerStyle.strokeLineCap||"round",strokeTextureUrl:K.apiIMG+"/up-to.png",strokeTextureWidth:this._opts.renderOptions.lineLayerStyle.strokeTextureWidth||32,strokeTextureHeight:this._opts.renderOptions.lineLayerStyle.strokeTextureHeight||64,};if(this._opts.renderOptions.lineLayerStyle.strokeTextureUrl){this._lineLayerStyle.strokeTextureUrl=this._opts.renderOptions.lineLayerStyle.strokeTextureUrl}else{if(this._opts.renderOptions.lineLayerStyle.strokeTextureUrl===null){delete this._lineLayerStyle.strokeTextureUrl}}if(this.map){this._menu=new BMapGL.ContextMenu();var i=e9.translate("delPoint",this._language);var C=new lv(i,function(oK,oJ,oI){T._deleteVia(oI.curNo-1)},60);this._menu.addItem(C);this.map.addContextMenu(this._menu,true);this.map.addEventListener("onlanguage_change",function(oI){C.setText(e9.translate("delPoint",T.map.getLanguage()))})}kg.load("route",function(){T._asyncSearch()},true);if(this.init_d){this.init_d()}};ht.inherit(mz,n7,"LineLayerRoute");ht.extend(mz.prototype,{search:function(C,e,i){kS.sendMessage(this._className,"search");this._queryList.push({method:"search",arguments:[C,e,i]})}});window.BMAP_DRIVING_POLICY_DEFAULT=0;window.BMAP_DRIVING_POLICY_DESTANCE=2;window.BMAP_DRIVING_POLICY_AVOID_HIGHWAYS=3;window.BMAP_DRIVING_POLICY_FIRST_HIGHWAYS=4;window.BMAP_DRIVING_POLICY_AVOID_CONGESTION=5;window.BMAP_DRIVING_POLICY_AVOID_PAY=6;window.BMAP_DRIVING_POLICY_HIGHWAYS_AVOID_CONGESTION=7;window.BMAP_DRIVING_POLICY_AVOID_HIGHWAYS_CONGESTION=8;window.BMAP_DRIVING_POLICY_AVOID_CONGESTION_PAY=9;window.BMAP_DRIVING_POLICY_AVOID_HIGHWAYS_CONGESTION_PAY=10;window.BMAP_DRIVING_POLICY_AVOID_HIGHWAYS_PAY=11;window.BMAP_DRIVING_POLICY_DISTANCE_PRIORITY=12;window.BMAP_DRIVING_POLICY_TIME_PRIORITY=13;window.BMAP_TRAFFICE_STATUS_NONE=0;window.BMAP_TRAFFICE_STATUS_NORMAL=1;window.BMAP_TRAFFICE_STATUS_SLOW=2;window.BMAP_TRAFFICE_STATUS_JAM=3;function dW(i,C){ei.call(this,i,C);C=C||{};var e=!K.apiVersionIsGL();this._opts._enableTraffic=(typeof C.enableTraffic==="boolean")?C.enableTraffic:e;this.setPolicy(C.policy);this.alternatives=C.alternatives?1:0;this.QUERY_TYPE=bn;this.RETURN_TYPE=a1;this.ROUTE_TYPE=BMAP_ROUTE_TYPE_DRIVING;kS.sendMessage("DrivingRoute","search")}function iQ(e,i){mz.call(this,e,i);i=i||{};this.setPolicy(i.policy);this.alternatives=i.alternatives?1:0;this.QUERY_TYPE=bn;kS.sendMessage("DrivingRoute","searchLine")}ht.inherit(iQ,mz,"DrivingRouteLine");ht.inherit(dW,ei,"DrivingRoute");dW.prototype.setPolicy=function(e){if(e>=BMAP_DRIVING_POLICY_DEFAULT&&e<=BMAP_DRIVING_POLICY_TIME_PRIORITY){this._opts.policy=e}else{this._opts.policy=BMAP_DRIVING_POLICY_DEFAULT}};iQ.prototype.setPolicy=function(e){if(e>=BMAP_DRIVING_POLICY_DEFAULT&&e<=BMAP_DRIVING_POLICY_TIME_PRIORITY){this._opts.policy=e}else{this._opts.policy=BMAP_DRIVING_POLICY_DEFAULT}};function h1(e,i){ei.call(this,e,i);this.QUERY_TYPE=lJ;this.RETURN_TYPE=ja;this.ROUTE_TYPE=BMAP_ROUTE_TYPE_WALKING;this._enableDragging=false}ht.inherit(h1,ei,"WalkingRoute");function eR(e,i){ei.call(this,e,i);this.QUERY_TYPE=kW;this.ROUTE_TYPE=BMAP_ROUTE_TYPE_RIDING;this._enableDragging=false}ht.inherit(eR,ei,"RidingRoute");function aj(e,i){mz.call(this,e,i);i=i||{};if(i.renderOptions&&i.renderOptions["lineType"]!==undefined){this._lineType=i.renderOptions["lineType"]}else{this._lineType=0}this.QUERY_TYPE=de;this.setPolicy(i.policy)}ht.inherit(aj,mz,"TruckRoute");aj.prototype.setPolicy=function(e){if(e>=BMAP_DRIVING_POLICY_DEFAULT&&e<=BMAP_DRIVING_POLICY_AVOID_CONGESTION){this._opts.policy=e}else{this._opts.policy=BMAP_DRIVING_POLICY_DEFAULT}};window.BMAP_MODE_DRIVING="driving";window.BMAP_MODE_TRANSIT="transit";window.BMAP_MODE_WALKING="walking";window.BMAP_MODE_NAVIGATION="navigation";var bN={web:K.urlProtocol+"//api.map.baidu.com/direction?",android:"bdapp://map/direction?",ios:"baidumap://map/direction?"};function mv(e){this.opts=e||{}}ht.extend(mv.prototype,{routeCall:function(T,e,C){var i=this;kg.load("route",function(){i._asyncSearch(T,e,C)})}});function dz(e,oL){var C=180/Math.pow(2,oL);var T=c7()?2:1;var i=e.width;var oJ=e.height;var oM=i/oJ>1?oJ:i;var oI=C/oM;var oH=Math.floor(oL)+T;var oK=360/(Math.pow(2,oH-2)*2*oI);while(oK>512){oH++;oK=360/(Math.pow(2,oH-2)*2*oI)}if(oH>f.TILE_MAX_ZOOM){oK=oK*Math.pow(2,oH-f.TILE_MAX_ZOOM);oH=f.TILE_MAX_ZOOM}else{if(oH0&&e<0){i+=90}else{if(C<0&&e<0){i+=180}else{if(C<0&&e>0){i+=270}}}}else{if(C===0){i=e<0?180:0}else{if(e===0){i=C>0?90:270}}}return Math.round(i)}function k0(){var i=navigator.userAgent.match(/android [\d._]+/gi);if(!i||!i.length){return 0}var e=i[0].match(/[\d]+/);return e?parseInt(e[0],10):0}function df(C){if(C===false){return false}if(typeof df._supportWebGL==="boolean"){return df._supportWebGL}var T=false;if(!window.WebGLRenderingContext){T=false}else{if(lr()&&k0()<5){T=false}else{try{var i=document.createElement("canvas");T=!!(i.getContext("webgl")||i.getContext("experimental-webgl"))}catch(oH){T=false}}}df._supportWebGL=T;return T}function dD(){if(typeof dD._useThumb==="boolean"){return dD._useThumb}var e=navigator.userAgent;dD._useThumb=!!(d1()||e.indexOf("Chrome")>-1||e.indexOf("SAMSUNG-GT-I9508")>-1);return dD._useThumb}function hZ(oL,oJ){if(!oL||!oJ){return 0}var C=oL.lat;var i=oJ.lat;var oP=oL.lng;var oK=oJ.lng;var T=6371000;var oM=ml(C);var oI=ml(i);var e=ml(i-C);var oO=ml(oK-oP);var oN=Math.sin(e/2)*Math.sin(e/2)+Math.cos(oM)*Math.cos(oI)*Math.sin(oO/2)*Math.sin(oO/2);var oH=2*Math.atan2(Math.sqrt(oN),Math.sqrt(1-oN));return T*oH}function dv(e){return e-Math.floor(e/360)*360}var hS=[K.urlProtocol+"//apisv0.bdimg.com/",K.urlProtocol+"//apisv1.bdimg.com/"];function nK(e){if(typeof e!=="number"){return K.panoTilePath}return hS[Math.abs(e)%hS.length]}function oi(e){var oI=e.split("//");if(oI.length>=2){var oH=oI[1].split("?");if(oH.length>=1){var oK=oH[0].split("/");var C=1;if(window.urlSplitBeginIndex){C=window.urlSplitBeginIndex}var oJ="";for(var T=C;T<=oK.length-1;T++){if(T===oK.length-1){oJ+=oK[T]}else{oJ+=oK[T]+"/"}}return{host:oH[0],origin:oI[0]+"//"+oK[0],path:"/"+oJ}}}return null}function eD(oH,oI){var T=(Math.random()*100000).toFixed(0);var C="_panoCbk"+T;var i=false;cu._rd=cu._rd||{};cu._rd[C]=function(oJ){i=true;delete cu._rd[C];oI&&oI(oJ)};var e=oH+"&callback="+h4+"._rd."+C;e+=nm()(e);jU.load(e,null,function(){if(i){return}i=true;delete cu._rd[C];oI&&oI(undefined)})}function jz(T,e){var C=!!(window._BMapSecurityConfig&&window._BMapSecurityConfig["serviceHost"]);var i=K.apiHost+"/?qt="+T+"&v="+en();if(!C){i+="&ak="+((typeof hh!=="undefined")?hh:"")}return i+(e||"")}function k1(e){return !!(e&&e.error!==undefined&&e.error===0)}function gR(e){eD(jz("pano_entry"),e)}function iy(e){if(e===undefined){return true}return k1(e)}function nZ(){alert("您需要申请全景地图服务使用权限")}var cf=(function(){var i=null;var e=0;return function(C){e+=C;if(i){return}i=setTimeout(function(){var T=e;e=0;i=null;eD(jz("pano_count","&consume="+T),function(oH){if(k1(oH)){return}gR(function(oI){if(!k1(oI)){nZ()}})})},5000)}})();function b8(oL,i){var oK="SJvEY5h37ZDh5pHS";var C=1800;var oJ=Date.parse(new Date());var T=oJ/1000;var oI=(typeof hh!=="undefined")?hh:"";var e=oL+"-"+(T+C)+"-"+oJ+"-"+oI+"-"+oK;var oH=md5(e);i=i||{};if(i.isCounter!==false){cf(i.counter||1)}return"auth_key="+(T+C)+"-"+oJ+"-"+oI+"-"+oH}function ds(i,C){var e=oi(i);if(e){return i+"&"+b8(e.path,C)}return i}function ea(){eV.call(this);this._overlayId="PanoramaOverlay_"+this.hashCode;this._pano=null;this._visible=true}ea.inherits(eV,"PanoramaOverlayBase");ht.extend(ea.prototype,{getOverlayId:function(){return this._overlayId},initialize:function(){},remove:function(){},_setOverlayProperty:function(){}});var mW=0;function f(i,e){if(!(this instanceof f)){return new f(i,e)}if(typeof kS!=="undefined"&&kS.sendMessage){kS.sendMessage("Panorama")}eV.call(this);this._guid=f.getGUID();this._container=f._getContainer(i);var T=null;var oH=null;if(e){if(e instanceof lg){oH=e}else{T=e;oH=e.map||null}}this._opts={enableScrollWheelZoom:true,visible:true,indoorExitControl:true,indoorFloorControl:false,linksControl:true,clickOnRoad:!K.apiVersionIsGL(),navigationControl:true,closeControl:true,indoorSceneSwitchControl:true,albumsControl:false,albumsControlOptions:{},copyrightControlOptions:{},forceCloseControl:false,haveBreakId:false,hideOverlays:false};this.setOptions(T);this._type="panorama";this._map=oH;this._data=null;this._tmpDataId=null;this._id=null;this._iid=null;this._lastId=null;this._position=null;this._lastPosition=null;this._distanceToLast=0;this._pov={heading:0,pitch:0};this._zoom=1;this._maxZoom=f.MAX_ZOOM;this._minZoom=f.MIN_ZOOM;this._tileMaxZoom=f.TILE_MAX_ZOOM;this._pitchLimit=null;this._links=[];this._topos=[];this._description="";this._relevants=[];this._mode=null;this._sceneType="street";this._visiblePOIType="none";this._nextPanoOptions=null;this._panoOverlays=[];this._isDraw=false;var C=this;if(oH&&oH.on){oH.on("destroy",function(){C.destroy()})}if(this._opts._lazyLoad!==true){this._load()}}f.inherits(eV,"Panorama");f.MIN_ZINDEX=1200;f.MAX_ZOOM=4;f.MIN_ZOOM=1;f.TILE_MAX_ZOOM=5;f.TILE_MIN_ZOOM=4;f.getGUID=function(){return"pano_"+(mW++)+"_"+(+new Date())};f._getContainer=function(e){if(!e){return null}if(typeof e!=="string"){return e}if(e.charAt(0)==="#"){return document.getElementById(e.slice(1))}return document.getElementById(e)};cu._panoRegister=cu._panoRegister||[];cu.panoRegister=function(e){if(typeof e==="function"){cu._panoRegister.push(e)}};f.GL_EVENT_PAYLOADS={ondataload:function(i){return{data:i.data&&i.data.glData?i.data.glData:i.data}},onposition_changed:function(C,i){return i.getPosition()},onpov_changed:function(T,i){var C=i.getPov();return{heading:C.heading,pitch:C.pitch}},onid_changed:function(C,i){return C.id||i.getId()},onscene_type_changed:function(C,i){return{type:i.getSceneType()}},onzoom_changed:function(i){return{noAnimation:!!i.noAnimation}},onoverlay_add:function(i){return i.overlay},onoverlay_remove:function(i){return i.overlay},onclick:function(i){return i.domEvent||i},ondblclick:function(i){return i.domEvent||i},ontouchstart:function(i){return i.domEvent||i},ontouchend:function(i){return i.domEvent||i}};ht.extend(f.prototype,{_load:function(){if(this._loadStarted){return}this._loadStarted=true;var e=this;gR(function(i){if(!iy(i)){nZ();return}kg.load("panorama",function(){e._draw()},true)})},addEventListener:function(oI,oH,C){var i=oI.indexOf("on")===0?oI:"on"+oI;var T=f.GL_EVENT_PAYLOADS[i];if(!K.apiVersionIsGL()||!T||typeof oH!=="function"||this._bindingInternal){return eV.prototype.addEventListener.call(this,oI,oH,C)}var e=this;var oJ=function(oK){return oH.call(this,T(oK,e))};eV.prototype.addEventListener.call(this,oI,oJ,C);oH.hashCode=oJ.hashCode},on:function(C,i,e){return this.addEventListener(C,i,e)},_draw:function(){},getContainer:function(){return this._container},getContainerSize:function(){if(!this._container){return new mS(0,0)}return new mS(this._container.clientWidth,this._container.clientHeight)},getId:function(){return this._id},getIid:function(){return this._iid},getPosition:function(){return this._position},getPov:function(){return this._pov},getZoom:function(){return this._zoom},getLinks:function(){if(K.apiVersionIsGL()){return this._topos||[]}return this._links},getDescription:function(){return this._description},getRelevants:function(){return this._relevants},getMode:function(){return this._mode},getSceneType:function(){return this._sceneType},getVisible:function(){return this._opts.visible},setId:function(C,i,e){this._load();if(i&&typeof i==="object"){e=i;i=null}e=e||{};this._lastId=this._id;this._lastPosition=this._position;this._id=C;this._position=null;if(i){this._sceneType=i}if(e.pov){this.setPov(e.pov)}this._nextPanoOptions=e},setPosition:function(e){if(!e){return}this._load();this._lastId=this._id;this._lastPosition=this._position;this._id=null;this._position=e},setPov:function(e){if(!e){return}var C=typeof e.heading==="number"?e.heading:this._pov.heading;var i=typeof e.pitch==="number"?e.pitch:this._pov.pitch;this._pov={heading:dv(C),pitch:i}},setZoom:function(e){if(typeof e!=="number"){return}this._zoom=Math.max(this._minZoom,Math.min(this._maxZoom,e))},setPitchLimit:function(i,e){this._pitchLimit={min:i,max:e}},setPanoramaPOIType:function(e){this._visiblePOIType=e},setMap:function(e){this._map=e},getMap:function(){return this._map},setOptions:function(C){if(!C){return}if(C.closeControl===true){this._opts.forceCloseControl=true}if(C.closeControl===false){this._opts.forceCloseControl=false}for(var i in C){if(!C.hasOwnProperty(i)){continue}var T=C[i];var e=this._opts[i];if(T&&typeof T==="object"&&!(T instanceof Array)&&e&&typeof e==="object"&&!(e instanceof Array)){this._opts[i]=ht.extend(e,T)}else{this._opts[i]=T}}},show:function(){this._load();this._opts.visible=true},hide:function(){this._opts.visible=false},enableScrollWheelZoom:function(){this._opts.enableScrollWheelZoom=true},disableScrollWheelZoom:function(){this._opts.enableScrollWheelZoom=false},addOverlay:function(e){if(!e){return}this._panoOverlays.push(e)},removeOverlay:function(e){if(!e){return}for(var C=0;C