window.B_BUSINESS_INFO={"business":0,"unauth":0,"popup_code":"SO31cu9NxQ","popup_block_time":60,"popup_timestamp":1793868982,"watermark_ratio":0,"signature":"7006bb","sign_content":"{\"business\":0,\"unauth\":0,\"popup_code\":\"SO31cu9NxQ\",\"popup_block_time\":60,\"popup_timestamp\":1793868982,\"watermark_ratio\":0}"};window.B_HOST_TILE_ONLINE_URLS=[(window.location.host + "/bmap-tile0"),(window.location.host + "/bmap-tile1"),(window.location.host + "/bmap-tile2"),(window.location.host + "/bmap-tile3")];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":"20261102"},"satellite":{"version":"009","updateDate":"20261102"},"normalTraffic":{"version":"081","updateDate":"20261102"},"satelliteTraffic":{"version":"083","updateDate":"20261102"},"mapJS":{"version":"104","updateDate":"20261102"},"satelliteStreet":{"version":"083","updateDate":"20261102"},"earthVector":{"version":"001","updateDate":"20261102"}},"webapp":{"high_normal":{"version":"001","updateDate":"20261102"},"lower_normal":{"version":"002","updateDate":"20261102"}},"api_for_mobile":{"vector":{"version":"002","updateDate":"20261102"},"vectorIcon":{"version":"002","updateDate":"20261102"}}};window.MSV={"mapstyle":{"version":"001","updateDate":"20261013"}};window.BMAP_AUTHENTIC_KEY="Y2aJXiswwPxy6mwFs1z9c7U5gwX9WfUN";window.BMapGL=window.BMapGL||{};(function(cv,h6){var hv=hv||{version:"20150702",emptyFn:function(){}};(function(){hv._log=[];var i=0;var C={};hv.BaseClass=function(oK){C[(this.hashCode=(oK||hv.BaseClass.guid()))]=this;if(!oK&&typeof kU!=="undefined"&&kU.sendMessage){var T=this.toString();if(!T||T.indexOf("[object")===0){T=this._className}if(T){kU.sendMessage(T)}}};hv.BaseClass.guid=function(){return"mz_"+(i++).toString(36)};hv.BaseClass.create=function(){var T=new hv.BaseClass();T.decontrol();return T};var e=hv.instance=hv.I=function(T){return C[T]};hv.BaseClass.prototype.dispose=function(){if(this.hashCode){delete C[this.hashCode]}for(var T in this){if(typeof this[T]!="function"){delete this[T]}}};hv.BaseClass.prototype.getHashCode=function(){if(!this.hashCode){C[(this.hashCode=hv.BaseClass.guid())]=this}return this.hashCode};hv.BaseClass.prototype.decontrol=function(){delete C[this.hashCode]};hv.BaseClass.prototype.toString=function(){return"[object "+(this._className||"Object")+"]"};hv.BaseClass.prototype._wlog=function(oK,oL){var T=hv._log;if(T.length>100){T.reverse().length=50;T.reverse()}T[T.length]="["+oK+"]["+(this._className||"Object")+" "+this.hashCode+"] "+oL}})();Function.prototype.inherits=function(oK,T){var e,oL,oN=this.prototype,oM=function(){};oM.prototype=oK.prototype;oL=this.prototype=new oM();if(typeof(T)=="string"){oL._className=T}for(e in oN){oL[e]=oN[e]}this.prototype.constructor=oN.constructor;oN=oM=null;return oL};hv.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};hv.BaseClass.prototype.on=hv.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||hv.BaseClass.guid();i.hashCode=T;if(e[C][T]){this._wlog("warning","repeat key:"+T)}e[C][T]=i};hv.BaseClass.prototype.off=hv.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]}};hv.BaseClass.prototype.fire=hv.BaseClass.prototype.dispatchEvent=function(T){if(!this._listeners){this._listeners={}}var C,e=this._listeners,oK=T.type;if(!T.point&&T.pointMC&&typeof K!=="undefined"&&typeof m8!=="undefined"&&m8.convertMC2LL){if(!K.apiVersionIsGL()){T.point=m8.convertMC2LL(T.pointMC)}else{T.point=T.pointMC}}T.target=T.srcElement=T.target||T.srcElement||this;T.currentTarget=this;if(typeof this[oK]=="function"){this[oK](T)}if(typeof e[oK]=="object"){for(C in e[oK]){if(typeof e[oK][C]=="function"){e[oK][C].call(this,T)}}}return T.returnValue};hv.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};hv.Browser=(function(){var C=navigator.userAgent;var oK=0;var e=0;var oL=0;var i=0;var oP=0;var oN=0;var oO=0;var oM=0;var T=0;var oQ=0;if(typeof window.opera==="object"&&/Opera(\s|\/)(\d+(\.\d+)?)/.test(C)){oL=parseFloat(RegExp.$2)}else{if(/OPR(\/(\d+)(\..?)?)/.test(C)){oL=parseInt(RegExp.$2,10)}else{if(/Edge\/((\d+)\.\d+)/.test(C)){oK=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)){oP=parseFloat(RegExp.$2)}else{if(navigator.vendor==="Netscape"&&/Netscape(\s|\/)(\d+(\.\d+)?)/.test(C)){oO=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)){oM=parseInt(RegExp.$1,10)}else{if(!e&&!oK&&C.indexOf("Gecko")>-1&&C.indexOf("KHTML")===-1&&/rv\:(\d+(\.\d+)?)/.test(C)){T=parseFloat(RegExp.$1)}else{if(!oK&&/chrome\/(\d+(\.\d+)?)/i.test(C)){oN=parseFloat(RegExp.$1)}else{if(!oK&&/AppleWebKit\/(\d+(\.\d+)?)/.test(C)){oQ=parseInt(RegExp.$1,10)}}}}var oR={edge:oK,ie:e,firefox:oP,netscape:oO,opera:oL,safari:i,chrome:oN,gecko:T,trident:oM,webkit:oQ};return oR})();window.FeBrowser=hv.Browser;hv.Dom={};hv.Dom.createDom=function(i,e){if(hv.isIE&&e&&e.name){i="<"+i+' name="'+hv.String.escapeHTML(e.name)+'">'}var C=document.createElement(i);if(e){hv.Dom.setProperties(C,e)}return C};hv.Dom.getOffset=function(T){var oM=hv.Dom.getOwnerDocument(T);var oL=hv.isGecko>0&&oM.getBoxObjectFor&&hv.Dom.getStyle(T,"position")=="absolute"&&(T.style.top===""||T.style.left==="");var oN={left:0,top:0};var i=(hv.isIE&&!hv.isStrict)?oM.body:oM.documentElement;if(T==i){return oN}var C=null;var oK;if(T.getBoundingClientRect){oK=T.getBoundingClientRect();oN.left=oK.left+Math.max(oM.documentElement.scrollLeft,oM.body.scrollLeft);oN.top=oK.top+Math.max(oM.documentElement.scrollTop,oM.body.scrollTop);oN.left-=oM.documentElement.clientLeft;oN.top-=oM.documentElement.clientTop;if(hv.isIE&&!hv.isStrict){oN.left-=2;oN.top-=2}}else{if(oM.getBoxObjectFor&&!oL){oK=oM.getBoxObjectFor(T);var e=oM.getBoxObjectFor(i);oN.left=oK.screenX-e.screenX;oN.top=oK.screenY-e.screenY}else{C=T;do{oN.left+=C.offsetLeft;oN.top+=C.offsetTop;if(hv.isWebkit>0&&hv.Dom.getStyle(C,"position")=="fixed"){oN.left+=oM.body.scrollLeft;oN.top+=oM.body.scrollTop;break}C=C.offsetParent}while(C&&C!=T);if(hv.isOpera>0||(hv.isWebkit>0&&hv.Dom.getStyle(T,"position")=="absolute")){oN.top-=oM.body.offsetTop}C=T.offsetParent;while(C&&C!=oM.body){oN.left-=C.scrollLeft;if(!hv.isOpera||C.tagName!="TR"){oN.top-=C.scrollTop}C=C.offsetParent}}}return oN};hv.Dom.getOwnerDocument=function(e){return e.nodeType==9?e:e.ownerDocument||e.document};hv.Dom.setProperties=function(i,e){hv.each(e,function(T,C){hv.Dom._setProperty(i,C,T)})};hv.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 hv.Dom._DIRECT_ATTRIBUTE_MAP){i.setAttribute(hv.Dom._DIRECT_ATTRIBUTE_MAP[e],C)}else{i[e]=C}}}}};hv.Dom._DIRECT_ATTRIBUTE_MAP={cellpadding:"cellPadding",cellspacing:"cellSpacing",colspan:"colSpan",rowspan:"rowSpan",valign:"vAlign",height:"height",width:"width",usemap:"useMap",frameborder:"frameBorder"};hv.G=function(){for(var C=[],T=arguments.length-1;T>-1;T--){var oK=arguments[T];C[T]=null;if(typeof oK=="object"&&oK&&oK.dom){C[T]=oK.dom}else{if((typeof oK=="object"&&oK&&oK.tagName)||oK==window||oK==document){C[T]=oK}else{if(typeof oK=="string"&&(oK=document.getElementById(oK))){C[T]=oK}}}}return C.length<2?C[0]:C};hv.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(" ")}};hv.addClassName=hv.ac;hv.each=function(oL,e){if(typeof e!="function"){return oL}if(oL){if(oL.length===undefined){for(var C in oL){e.call(oL[C],oL[C],C)}}else{for(var T=0,oK=oL.length;T0&&!window.opera){/MSIE (\d+(\.\d+)?)/.test(navigator.userAgent);hv.isIE=parseFloat(RegExp.$1)}})();hv.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}};hv.removeClassName=hv.rc;hv.show=function(){this.each(arguments,function(e){if(e=hv.G(e)){e.style.display=""}})};hv.trim=function(e){return e.replace(/(^[\s\t\xa0\u3000]+)|([\u3000\xa0\s\t]+$)/g,"")};hv.getElementsByClassName=function(e,i){if(e.getElementsByClassName){return e.getElementsByClassName(i)}else{return(function C(oQ,oO){if(oO==null){oO=document}var oN=[],oM=oO.getElementsByTagName("*"),T=oM.length,oP=new RegExp("(^|\\s)"+oQ+"(\\s|$)"),oL,oK;for(oL=0,oK=0;oL-1};hv.insertHTML=function(T,e,C){T=hv.G(T);if(T===null){return T}var i,oK;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{oK=e=="BEFOREBEGIN";i[oK?"setStartBefore":"setEndAfter"](T);i.collapse(oK)}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,oL,oK=0,e=this.childNodes.length;oK-1};hv.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 ep(){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 dt=[];if(window.B_HOST_TILE_ONLINE_URLS&&window.B_HOST_TILE_ONLINE_URLS.length>=4){dt=window.B_HOST_TILE_ONLINE_URLS}var cZ=window.location.protocol==="http:"?"http:":"https:";var gR={apiVersion:undefined,uiVersion:undefined,apiVersionIsGL:function(){return this.apiVersion==="gl"},uiVersionIsGL:function(){return this.uiVersion==="gl"},urlProtocol:cZ,fontFamily:'Arial,Helvetica,"PingFang SC","Hiragino Sans GB",STHeiti,"Microsoft YaHei",Tahoma,sans-serif',mapStyleNameIdPair:{"default":0,"grayed-out":1},gs:{},mapHost:cZ+"//" + window.location.host + "/bmap-map",apiHost:window._BMapSecurityConfig&&window._BMapSecurityConfig["serviceHost"]?window._BMapSecurityConfig["serviceHost"]:cZ+"//" + window.location.host + "/bmap-api",apiIMG:cZ+"//" + window.location.host + "/bmap-api/images",staticHost:cZ+"//" + window.location.host + "/bmap-webmap",imgPath:cZ+"//" + window.location.host + "/bmap-webmap/image/api/",tileDomain:[cZ+"//"+(dt[0]||(window.location.host + "/bmap-tile0")),cZ+"//"+(dt[1]||(window.location.host + "/bmap-tile1")),cZ+"//"+(dt[2]||(window.location.host + "/bmap-tile2")),cZ+"//"+(dt[3]||(window.location.host + "/bmap-tile3"))],enTileDomain:[cZ+"//" + window.location.host + "/bmap-api"],apiTestUrl:cZ+"//" + window.location.host + "/bmap-api",panoTilePath:cZ+"//" + window.location.host + "/bmap-sv1/",rasterTilePath:"/tile/",vectorTilePath:"/pvd/",enVectorTilePath:"/api_enpvd",originTilePath:[cZ+"//pcor.baidu.com"],stylePath:cZ+"//" + window.location.host + "/bmap-webmap/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 oK=true;if(typeof C==="string"&&C!=="default"){oK=false}var oL=oK?"":"_"+(this.mapStyleNameIdPair[C]-1);var i=cw();var T="udt="+i.udt+"&v="+i.ver;var e=this.stylePath;return[e+"icons_2x"+oL+".js?"+T,e+"fs"+oL+".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"}}};gR.gs[BMAP_LANGUAGE_ZH]="GS(2025)4125";gR.gs[BMAP_LANGUAGE_EN]="GS(2025)0741";gR.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"}}};gR.imgResources={blankGIF:gR.staticHost+"/res/litemapapi/v1d1/images/blank.gif?20170501",markerPng:gR.staticHost+"/res/litemapapi/v1d1/images/marker.png?20170501",locPng:gR.staticHost+"/res/litemapapi/v1d1/images/loc.png?20180918",locNewPng:gR.staticHost+"/res/litemapapi/v1d1/images/loc_new.png?20190314",zoomPng:gR.staticHost+"/res/litemapapi/v1d1/images/zoombtn.png?20180918",mapLogoPng:gR.staticHost+"/res/litemapapi/v1d1/images/logo-2x.png?20190226"};var K=gR;var nf="ruler.cur";if(hv.Browser.ie||hv.Browser.edge){hv.extend(K,{distCursor:"url("+K.imgPath+nf+"),crosshair",defaultCursor:"url("+K.imgPath+"openhand.cur),default",draggingCursor:"url("+K.imgPath+"closedhand.cur),move"})}else{if(hv.Browser.firefox){hv.extend(K,{distCursor:"url("+K.imgPath+nf+"),crosshair",defaultCursor:"-moz-grab",draggingCursor:"-moz-grabbing"})}else{if(hv.Browser.chrome||hv.Browser.safari){hv.extend(K,{distCursor:"url("+K.imgPath+nf+") 2 6,crosshair",defaultCursor:"url("+K.imgPath+"openhand.cur) 8 8,default",draggingCursor:"url("+K.imgPath+"closedhand.cur) 8 8,move"});if(hv.Platform.macintosh){K.defaultCursor="-webkit-grab";K.draggingCursor="-webkit-grabbing"}}else{hv.extend(K,{distCursor:"url("+K.imgPath+nf+"),crosshair",defaultCursor:"url("+K.imgPath+"openhand.cur),default",draggingCursor:"url("+K.imgPath+"closedhand.cur),move"})}}}cv=cv||{};cv.version="gl";if(!cv.coordType){cv.coordType="BMAP_COORD_BD09"}if(!cv.apiVersion){cv.apiVersion=(typeof window!=="undefined"&&window.BMAP_DEFAULT_API_VERSION)||"gl"}if(!cv.uiVersion){cv.uiVersion=(typeof window!=="undefined"&&window.BMAP_DEFAULT_UI_VERSION)||"gl"}cv._register=[];cv.register=function(e){this._register[this._register.length]=e};cv.guid=1;cv.getGUID=function(e){return(e||"")+cv.guid++};var hj=window.BMAP_AUTHENTIC_KEY||"";function af(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 bQ(e,i){if(localStorage){return localStorage.setItem(e,i)}if(sessionStorage){return sessionStorage.setItem(e,i)}}cv.getSeckeyCid=function(){var i=+new Date();var e=cZ+"//dlswbr.baidu.com/heicha/mw/abclite-2063-s.js?_t="+i;jW.load(e,mE)};function mE(){if(window.___abvk){bQ("SECKEY_ABVK",window.___abvk)}}window.__abbaidu_2063_cb=function(i){var e=JSON.parse(i);bQ("BMAP_SECKEY",e.data)};cv.bmapVerifyCbk=function(oK){if(oK&&oK.popup===1&&oK.error_msg){dZ(oK.error_msg,{from:"verify"})}else{if(oK&&oK.error!==0){cv=null;BMapGL=null;var oL="百度未授权使用地图API,可能是因为您提供的密钥不是有效的百度地图开放平台密钥,或此密钥未对本应用的百度地图JavaScriptAPI授权。您可以访问如下网址了解如何获取有效的密钥:https://lbs.baidu.com/apiconsole/key#。";switch(oK.error){case 101:oL="您所使用的密钥ak有问题,不支持jsapi服务,可以访问该网址了解如何获取有效密钥:http://lbsyun.baidu.com/apiconsole/key#。";break;case 102:oL="MCODE参数不存在,mobile类型MCODE参数必需,详情查看:http://lbsyun.baidu.com/apiconsole/key#。";break;case 200:oL="APP不存在,AK有误请检查再重试,详情查看:http://lbsyun.baidu.com/apiconsole/key#。";break;case 201:oL="APP被您禁用啦,可以访问 http://lbsyun.baidu.com/apiconsole/key# 查看自己的应用具体详情,或联系我们了解详情。";break;case 202:oL="APP被管理员删除啦,可以访问 http://lbsyun.baidu.com/apiconsole/key# 查看自己的应用具体详情,或联系我们了解详情。";break;case 203:oL="APP类型错误,可以访问 http://lbsyun.baidu.com/apiconsole/key# 查看自己的应用具体详情,或联系我们了解详情。";break;case 210:oL="APP IP校验失败,可以访问 http://lbsyun.baidu.com/apiconsole/key# 查看自己的应用具体详情,或联系我们了解详情。";break;case 220:oL="APP Referer校验失败。请检查该ak设置的白名单与访问所有的域名是否一致。详情查看:http://lbsyun.baidu.com/apiconsole/key#";break;case 230:oL="APP Mcode码校验失败,可以访问 http://lbsyun.baidu.com/apiconsole/key# 查看自己的应用具体详情,或联系我们了解详情。";break;case 240:oL="APP服务被禁用了,可以访问 http://lbsyun.baidu.com/apiconsole/key# 查看自己的应用具体详情,或联系我们了解详情。";break;case 250:oL="该用户不存在... 请登录 https://lbs.baidu.com 的控制台,注册成为开发者申请ak吧。";break;case 251:oL="该用户被自己删除啦,可以访问 http://lbsyun.baidu.com/apiconsole/key# 查看自己的应用具体详情。";break;case 252:oL="该用户被管理员删除啦,可以访问 http://lbsyun.baidu.com/apiconsole/key# 了解如何获取有效密钥,或请联系我们了解详情。";break;case 260:oL="您所使用的密钥AK不包含该服务呢,可以访问 http://lbsyun.baidu.com/apiconsole/key# 查看服务选择情况,或请联系我们了解详情。";break;case 261:oL="您所使用的密钥AK的该服务被禁用啦,可以访问 http://lbsyun.baidu.com/apiconsole/key# 查看服务选择情况,或请联系我们了解详情。";break;case 401:oL="您所使用的AK并发超限了,请登录 http://lbsyun.baidu.com/cashier/quota#/home 了解详情。";break;case 302:oL="您所使用的AK天配额超限了,请登录 http://lbsyun.baidu.com/cashier/quota#/home 了解详情。";break}alert(oL);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};lJ.prototype.getHitRate=function(){return Math.round(this._totalHitTimes/this._totalGetTimes*1000)/1000};lJ.prototype.getData=function(i){var e=this._cache[i];if(e){this._totalHitTimes++}this._totalGetTimes++;return e};lJ.prototype.removeData=function(oK){if(this._options.clearCallback){this._options.clearCallback(this._cache[oK])}var C=this._cache;var oL=C[oK];for(var T=0,e=C.length;T=0;oK--){var T=this._cache[oK]._key_;if(!oL[T]){C.splice(oK,1);if(this._options.clearCallback){this._options.clearCallback(C[T])}delete C[T]}}};lJ.prototype.getDataCount=function(){return this._cache.length};var lg="B_NORMAL_MAP";var c1="B_EARTH_MAP";var j9="B_SATELLITE_MAP";function mJ(){}hv.extend(mJ.prototype,{centerAndZoomIn:function(oO,C,oQ){var oM=this;if(!oO&&!C){return}oO=oO||this.centerPoint;C=C||this.zoomLevel;C=this._getProperZoom(C).zoom;if(this.mapType===c1){if(!this._earth){this.mapType=lg;this.temp.originMapType=c1;function oN(){oM._earth=new cv.Earth(oM,{showRealSunlight:oM.config.showRealSunlight,showMilkyway:oM.config.showMilkyway,earthBackground:oM.config.earthBackground});oM._proxyEarthEvents();oM._changeEarthMapType(c1);hv.extend(oM,cv.EarthView.prototype);if(!oM._navigationCtrl&&oM.config.showControls){oM._navigationCtrl=new cv.NavigationControl3D(oM)}delete oM.temp.originMapType}ki.load("earth",function(){if(cv["FeatureStyle"+oM.config.style]){oN()}else{oM.loadMapStyleFiles(function(){oN()})}})}}this.lastLevel=this.zoomLevel||C;this.zoomLevel=C;var oK=new ix("onload");oK.pointMC=oO;oK.zoom=C;this.centerPoint=this.restrictCenter(new d9(oO.lng,oO.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===c1)){var i=this.config.defaultMaxBounds;var oL=new q(i,"baidu",this.mapType);var T=new kT({mapType:this.mapType,copyright:oL,customLayer:false,baseLayer:true,tileTypeName:"web"});T._isInnerLayer=true;this._addTileLayer(T);if(this.mapType===j9&&this._isHybridShow===true){this._addHybirdMap()}}if(K.apiVersionIsGL()){this.loaded=true;this.dispatchEvent(oK)}else{if(!this.loaded){this.loaded=true;if(this._isDefaultView){var oP=this;setTimeout(function(){oP.dispatchEvent(oK)},0)}else{this.dispatchEvent(oK)}}}oQ=oQ||{};oQ.callback&&oQ.callback()},_setPlatformPosition:function(oP,oO,oS){oS=oS||{};if(oP===0&&oO===0&&!oS.point){return}if(isNaN(oS.initMapOffsetX)){oS.initMapOffsetX=this.offsetX}if(isNaN(oS.initMapOffsetY)){oS.initMapOffsetY=this.offsetY}var oQ=oP+oS.initMapOffsetX;var oN=oO+oS.initMapOffsetY;if(oS.point){var i=this.restrictCenter(oS.point);if(!i.equals(this.centerPoint)){this.centerPoint=i.clone();this.fire(new ix("oncenter_changed"))}}else{var T=this.offsetX-oQ;var e=this.offsetY-oN;var C=this.getZoomUnits();var oM=this.centerPoint.lng;var oL=this.centerPoint.lat;var oK=new d9(oM,oL);this.centerPoint=this.restrictCenter(new d9(oK.lng+T*C,oK.lat-e*C),C);this.fire(new ix("oncenter_changed"));if(this.zoomLevel<10){oQ=this.offsetX-(this.centerPoint.lng-oK.lng)/C;oN=this.offsetY+(this.centerPoint.lat-oK.lat)/C}}this.offsetX=oQ;this.offsetY=oN;var oR=this.platform.style;oR.left=oQ+"px";oR.top=oN+"px";this.maskLayer.style.left=-oQ+"px";this.maskLayer.style.top=-oN+"px";if(oS.dispatchEvent!==false){this.dispatchEvent(new ix("onmoving"))}},zoomTo:function(e,oM,oQ){oQ=oQ||{};oQ.zoomCenter=oM;if(oQ.noAnimation!==true){this.deepZoomTo(e,oQ);return}if(typeof e!=="number"){return}var oK=gA[this.mapType];if(!oK){return}var C=e;e=this._getProperZoom(e).zoom;if(e===this.zoomLevel){var oN=new ix("onzoomexceeded");oN.targetZoom=C;this.dispatchEvent(oN);oQ.callback&&oQ.callback();return}this.lastLevel=this.zoomLevel;if(oM){this.temp._cPoint=oM;this.temp._cPixel=this.pointToPixelIn(oM)}else{if(this.getInfoWindow()){var oP=this.getInfoWindow().getPoint();this.temp._cPixel=this.pointToPixelIn(oP);this.temp._cPoint=oP}}if(this.config.zoomCenter){oM=this.config.zoomCenter;this.temp._cPoint=oM;this.temp._cPixel=this.pointToPixelIn(oM)}if(oM||this.temp.infoWin&&this.temp.infoWin.isOpen()){var i=this.temp._cPoint;var oO=this.temp._cPixel;var T=this.getZoomUnits(e);var oL=new d9(i.lng+T*(this.width/2-oO.x),i.lat-T*(this.height/2-oO.y));this.centerPoint=this.restrictCenter(oL,T,e);if(this.centerPoint.zoom){e=this.centerPoint.zoom}}if(oQ.fireEvent!==false){this.dispatchEvent(new ix("onzoomstart"))}if(e!==this.zoomLevel){this.zoomLevel=e;this.dispatchEvent(new ix("onzooming"));this.dispatchEvent(new ix("onzoomstartcode"))}if(oQ.fireEvent!==false){this.dispatchEvent(new ix("onzoomend"))}if(oQ.callback){oQ.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(oN,T){T=T||{};var oL=oN-this.zoomLevel;var oK=this._getProperZoom(oN);if(oK.exceeded){var e=new ix("onzoomexceeded");e.targetZoom=oN;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 hV(this.width/2,this.height/2)}}this.lastLevel=this.zoomLevel;var oM=this.deepZoom||new a7(this);var C=oL>0?1:-1;oM.zoomMap(i,oL,C,null,T)},flyToIn:function(oO,e){if(e===this.zoomLevel){this.panToIn(oO);return}var oL=this._getProperZoom(e);if(oL.exceeded){var oP=new ix("onzoomexceeded");oP.targetZoom=e;this.dispatchEvent(oP);return}var oN=e-this.zoomLevel;var C=new hV(this.width/2,this.height/2);var i=this.pointToPixelIn(oO);var oM=new mU(i.x-C.x,i.y-C.y);this.lastLevel=this.zoomLevel;if(Math.abs(oN)>=4||Math.abs(oM.width)>this.width||Math.abs(oM.height)>this.height){this.centerAndZoomIn(oO,e);return}var oK=this.deepZoom||new a7(this);var T=oN>0?1:-1;oK.zoomMap(i,oN,T,oM)},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 oK=Math.round(this.height/2);if(Math.abs(e-T.x)>this.width||Math.abs(oK-T.y)>this.height||C.noAnimation===true){this._panToIn(e-T.x,oK-T.y,i);C.callback&&C.callback()}else{this._panBy(e-T.x,oK-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 ix("onmoveend"))}this.dispatchEvent(new ix("onmovestart"));this._setPlatformPosition(i,e,{point:T});this.dispatchEvent(new ix("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,oK){if(this.temp.operating===true){return}oK=oK||{};this.dispatchEvent(new ix("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 ix("onmoveend"))}C.tlPan=new ij({fps:oK.fps||T.config.fps,duration:oK.duration||T.config.actionDuration,transition:oK.transition||jF.easeInOutQuad,render:function(oL){this.terminative=T.temp.operating;if(T.temp.operating){return}T._setPlatformPosition(Math.ceil(i*oL),Math.ceil(e*oL),{initMapOffsetX:C.pl,initMapOffsetY:C.pt})},finish:function(oL){T.dispatchEvent(new ix("onmoveend"));T.temp.tlPan=false;if(T.temp.stopArrow===true){T.temp.stopArrow=false;if(T.temp.arrow!==0){T._arrow()}}oK.callback&&oK.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(oR,i,e){this.isRestrict=false;i=i||this.getZoomUnits();e=e||this.zoomLevel;var oP=this.pixelToPointIn(new hV(this.width,0),{center:oR,zoom:e});var oN=this.pixelToPointIn(new hV(0,this.height),{center:oR,zoom:e});var oS=oR.lng;var oX=oR.lat;if(this.config.restrictBounds!==null&&!this.config.restrictBounds.isEmpty()){var oW=this.config.restrictBounds;var T=oW.getSouthWest();var oU=oW.getNorthEast();var oQ=m8.convertLL2MC(T);var oL=m8.convertLL2MC(oU);oR.lng=this.calcNewLngByBounds(oS,oN,oP,oQ.lng,oL.lng,i);oR.lat=this.calcNewLatByBounds(oX,oN,oP,oQ.lat,oL.lat,i);return oR}var oO=this.pixelToPointIn(new hV(0,0),{center:oR,zoom:e});var oK=this.pixelToPointIn(new hV(0,this.height),{center:oR,zoom:e});if(this.zoomLevel<5){if(oO.lat>li.MAX_LAT&&oK.latli.MAX_LAT){this.isRestrict=true;oR.lat=li.MAX_LAT-this.height/2*i}else{if(oK.lat=li.HIGH_RES_MIN_RATIO?2:1,enableEarth:eV.ifEnableEarth(),defaultMaxBounds:new lz(new d9(-21364736,-10616832),new d9(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 ix("onlanguage_change"));this.fire(new ix("onstyle_willchange"));this.fire(new ix("onstyle_loaded"));var e=new ix("onlayer_update");e.name="na";this.fire(e)}},enablePreferredLanguage:function(oK){if(!oK){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){oK=T}else{if(T.indexOf("-")>-1){var C=T.split("-")[0];if(i.indexOf(C)!==-1){oK=C}}}if(!oK){oK=BMAP_LANGUAGE_ZH}}if(this._displayOptions.language!==oK){this._displayOptions.language=oK;if(oK!==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 ix("onlanguage_change"));this.fire(new ix("onstyle_willchange"));this.fire(new ix("onstyle_loaded"));var e=new ix("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 ix("onlanguage_change"));this.fire(new ix("onstyle_willchange"));this.fire(new ix("onstyle_loaded"));var e=new ix("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(gA[this.mapType][this._renderType]){i=gA[this.mapType][this._renderType].minZoom}else{i=gA[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=oM}}return i},getMaxZoom:function(){var e;if(gA[this.mapType][this._renderType]){e=gA[this.mapType][this._renderType].maxZoom}else{e=gA[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;ki.load("mapgl",function(){e._asyncRegister()})},_setStyle:function(i){var e=i.style;e.overflow="hidden";if(dK(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 oM=(C.width-e.width)/2;var oO=(C.height-e.height)/2;var T=e.getZoomUnits();var oL=e.centerPoint;if(oL&&!e.config.enableResizeOnCenter){e.centerPoint=new d9(oL.lng+oM*T,oL.lat-oO*T)}e.maskLayer.style.width=(e.width=C.width)+"px";e.maskLayer.style.height=(e.height=C.height)+"px";var oK=new ix("onresize");oK.size=C;e.dispatchEvent(oK);e.fire(new ix("onsize_changed"));var i=parseInt(e.platform.style.left,10)||0;var oN=parseInt(e.platform.style.top,10)||0;if(e.currentOperation!=="undefined"&&e.currentOperation!==gp.idle&&(e.offsetX!==i||e.offsetY!==oN)){e._setPlatformPosition(i,oN)}}}}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(ja()!==e.config.ratio){e.config.ratio=ja()}var oK=new ix("onresize");oK.size=i;e.dispatchEvent(oK);var C=new ix("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===c1){return Math.pow(2,18-this._earth.getImageZoom())}var e=gA[this.mapType];if(typeof e!=="object"){return null}var i=C||this.zoomLevel;return Math.pow(2,(e.zoomLevelBase-i))},pointToPixelIn:function(oT,oV){if(!oT){return}oV=oV||{};if(this.mapType===c1){var T;if(!oT._llPt){T=m8.convertMC2LL(oT);oT._llPt=T}T=oT._llPt;var oP=null;var C=null;if(typeof oV.zoom==="number"){var oS=this._earth;var oU=oS._getEarthZoomByImgZoom(oV.zoom);if(oU<=3){oP=oS._generateTmpPMatrix(oU)}C=oS._generateTmpMVMatrix(oS.getCenter(),oU)}var oL=this._earth.fromLatLngToPixel(T,{useRound:false,isCalcOnBack:true,matrixInfo:{modelViewMatrix:C,projectionMatrix:oP}});return oL}var oK=typeof oV.heading==="number"||typeof oV.tilt==="number";if((this._heading%360===0&&this._tilt===0&&!oK)||!this._webglMapCamera){var oR=this.getZoomUnits(oV.zoom);var oN=oV.center||this.centerPoint;var i=this.width/2;var oM=this.height/2;var oQ=(oT.lng-oN.lng)/oR+i;var oO=(oN.lat-oT.lat)/oR+oM;if(oV.useRound!==false){oQ=Math.round(oQ);oO=Math.round(oO)}return new hV(oQ,oO)}var e=this._webglMapCamera.fromMCToScreenPixel(oT.lng,oT.lat,oV);if(oV.useRound===false){return e}e.x=Math.round(e.x);e.y=Math.round(e.y);return e},pixelToPointIn:function(e,oQ){if(!e){return}oQ=oQ||{};if(this.mapType===c1){if(typeof oQ.zoom==="number"){var oO=this._earth;var oL=null;var C=null;var oP=oO._getEarthZoomByImgZoom(oQ.zoom);if(oP<=3){oL=oO._generateTmpPMatrix(oP)}C=oO._generateTmpMVMatrix(oO.getCenter(),oP)}var i=this._earth.fromPixelToLatLng(e,{matrixInfo:{modelViewMatrix:C,projectionMatrix:oL}});if(i===null){return null}return m8.convertLL2MC(i)}if((this._heading%360!==0||this._tilt>0||typeof oQ.heading==="number"||typeof oQ.tilt==="number")&&this._webglMapCamera){return this._webglMapCamera.fromScreenPixelToMC(e.x,e.y,oQ)}var oM=oQ.center||this.centerPoint;var oN=this.getZoomUnits(oQ.zoom);var oK=oM.lng+oN*(e.x-this.width/2);var T=oM.lat-oN*(e.y-this.height/2);return new d9(oK,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 oK=this.getSize();var i=this.worldSize(T.zoom);if(i>0&&isFinite(C.x)){if(C.x>oK.width){C.x-=Math.ceil((C.x-oK.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 m8()},lnglatToMercator:function(e,T){var i=new d9(e,T);var C=m8.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 d9(i,e);var C=m8.convertMC2LL(T);return[C.lng,C.lat]},mercatorToLngLat:function(i,e){return this.mercatorToLnglat(i,e)},getBoundsIn:function(){if(!this._bounds){return}var oW=arguments[0];if(this.mapType===c1&&this._earth){var oQ=this._earth.getCustomBounds();if(!oQ){return this.config.defaultMaxBounds}var oP=oQ.getSouthWest();var e=oQ.getNorthEast();if(oP.lng>e.lng){e.lng=180}var pd=m8.convertLL2MC(oP);var o3=m8.convertLL2MC(e);var oT=this.config.defaultMaxBounds;var o2=Math.max(pd.lng,oT.sw.lng);var o1=Math.max(pd.lat,oT.sw.lat);var oV=Math.min(o3.lng,oT.ne.lng);var oU=Math.min(o3.lat,oT.ne.lat);var oY=new lz(new d9(o2,o1),new d9(oV,oU));oY.pointBottomLeft=new d9(o2,o1);oY.pointBottomRight=new d9(oV,o1);oY.pointTopLeft=new d9(o2,oU);oY.pointTopRight=new d9(oV,oU);oY.setMinMax();oY.makeNormalizedPoint(this._earth.getHeading());return oY}oW=oW||{};var oK=oW.margins||[0,0,0,0];var o8=this.pixelToPointIn({x:oK[3],y:this.height-oK[2]},oW);var pc=this.pixelToPointIn({x:this.width-oK[1],y:oK[0]},oW);var o0=typeof oW.heading==="number"?oW.heading:(this._heading%360);var C=typeof oW.tilt==="number"?oW.tilt:this._tilt;var oS=this._webglMapCamera;if((o0===0&&C===0)||!oS){this._bounds.setSouthWest(o8);this._bounds.setNorthEast(pc);this._bounds.pointBottomLeft=o8;this._bounds.pointBottomRight=new d9(pc.lng,o8.lat);this._bounds.pointTopRight=pc;this._bounds.pointTopLeft=new d9(o8.lng,pc.lat);this._bounds.setMinMax();this._bounds.makeNormalizedPoint(o0);return this._bounds}var oZ=this.pixelToPointIn({x:oK[3],y:oK[0]},oW);var T=oS.getPosition();var pe=Math.sqrt(Math.pow(oZ.lng-T[0],2)+Math.pow(oZ.lat-T[1],2));var o9=this.getZoomUnits();var pg=pe/o9;var o6=oS._frustumSideLen;var oO=oS._fovy;if(this._projectionMatrix3D!=="ortho"&&(pg>o6||(90-C)oM){oM=o5[pa].lng}if(o5[pa].latoR){oR=o5[pa].lat}}this._bounds.setSouthWest(new d9(pb,ph));this._bounds.setNorthEast(new d9(oM,oR));this._bounds.pointTopLeft=oZ;this._bounds.pointTopRight=pc;this._bounds.pointBottomRight=oX;this._bounds.pointBottomLeft=o8;this._bounds.makeNormalizedPoint(o0);this._bounds.setMinMax();return this._bounds},getExtendBounds:function(){var C=lA.getInstance("na");var oT=this.getZoom();var e=Math.floor(oT);var oR=C.getDataZoom(oT);oR=dA(oR,oB.minDataZoom,oB.maxDataZoom);var oL=e;var oP=C.getTileSize(oT);var oZ=C.getBaseTileSize(oT);var oM=this.getBoundsIn();if(!oM){return}var oQ=C.getMercatorSize(oT,oR);var oW;var oS;var o1;var oX;var oV=map.getCenterIn();oV=hz.calcLoopCenterPoint(oV);var T=Math.floor(oV.lng/oQ);var o2=Math.floor(oV.lat/oQ);var o0=0;var oN=0;oM=hz.calcLoopMapBounds(oM,oV);if(oM.ne.lng>hz._mc180X){var oK=hz.getSpaceDistanceInPixel(oR);o0=Math.ceil(oK/oZ)}if(oM.sw.lng19505879.362428114||oM.sw.lat<-15949096.637571886){oM.ne.lat=19505879.362428114;oM.sw.lat=-15949096.637571886}var oY=[Math.floor(oM.sw.lng/oQ)-oN,Math.floor(oM.sw.lat/oQ)];var i=[Math.floor(oM.ne.lng/oQ)+o0,Math.floor(oM.ne.lat/oQ)];oW=oY[0]-this.config.extendTiles;oS=i[0]+1+this.config.extendTiles;o1=oY[1]-this.config.extendTiles;oX=i[1]+1+this.config.extendTiles;var oU=m8.tileToBoundRange({col:oS,row:oX,baseTileSize:oZ,zoom:oR});var oO=m8.tileToBoundRange({col:oW,row:o1,baseTileSize:oZ,zoom:oR});this.mapExtendBounds=new lz(oO.LL.sw,oU.LL.ne);return this.mapExtendBounds},isLoaded:function(){return !!this.loaded},_getBestLevel:function(i,oS){var oL=0;if(this._renderType==="webgl"&&!c9()){oL=100}var oM=oS.margins||[10,10,10,10];var T=oS.zoomFactor||0;var oN=oM[1]+oM[3];var oK=oM[0]+oM[2];var e=this.getMinZoom();var oR=this.getMaxZoom();var oQ=i.toSpan();var oP=oQ.width/(this.width-oN-oL);var oO=oQ.height/(this.height-oK-oL);var C=18-v(Math.max(oP,oO));if(CoR){C=oR}C+=T;if(this._renderType!=="webgl"){C=Math.floor(C)}return C},getViewportIn:function(oS,oK){if(this.mapType===c1){oS=oS||[];var oM=[];for(var oT=0;oT=0;oR--){oN.extend(oL[oR])}if(oN.isEmpty()){return oO}}var oX=oN.getCenter();var e=this._getBestLevel(oN,oK);if(oK.margins){var C=oK.margins;var oW=(C[1]-C[3])/2;var oP=(C[0]-C[2])/2;var oV=this.getZoomUnits(e);oX.lng=oX.lng+oV*oW;oX.lat=oX.lat+oV*oP}return{center:oX,zoom:e}},setViewportIn:function(T,oK){if(this.mapType===c1){var oO;if(T&&T.center){var C=m8.convertMC2LL(T.center);var oM=this._earth._getEarthZoomByImgZoom(T.zoom,C);oO={center:C,zoom:oM}}else{oO=[];for(var oL=0;oLli.MAX_DRAG_TILT_L2){i.setTilt(li.MAX_DRAG_TILT_L2,{callback:function(){i._changeEarthMapType(e)}})}else{i._changeEarthMapType(e)}},_changeEarthMapType:function(C){var T=this;var oM=T.tileMgr.tileLayers;if(this.mapType===j9){this._clearSatelliteOverlayState()}if(this._mapTypeChangAni){this._mapTypeChangAni.stop()}var oL;if(this._earth){oL=this._earth.getEarthCanvas()}if(!this._earth){this.maskLayer.style.opacity=1;this.maskLayer.style.zIndex=999;this.maskLayer.style.background="#000"}this._mapTypeChangAni=new ij({duration:400,render:function(e){if(!T._earth){return}oL.style.opacity=e},finish:function(){for(var e=oM.length-1,oN=e;oN>=0;oN--){var oP=oM[oN].tilesDiv;if(oP){oP.style.visibility="hidden"}if(oM[oN]._isInnerLayer&&T._renderType!=="webgl"){T._removeTileLayer(oM[oN])}}T._mapTypeChangAni=null;T._mapTypeChanging=false;function oO(){var oT=T.getZoom()-2;var oU=T.getCenterIn();var oR=m8.convertMC2LL(oU);T._earth=new cv.Earth(T,{center:oR,zoom:oT,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 oQ=T.mapType;T.mapType=C;var oS=new ix("onmaptypechange");oS.zoomLevel=this.zoomLevel;oS.mapType=C;oS.exMapType=oQ;T.dispatchEvent(oS);T._setMapTypeStatus(C);hv.extend(T,cv.EarthView.prototype);if(!T._navigationCtrl&&T.config.showControls){T._navigationCtrl=new hy(T)}}if(!T._earth){if(cv["FeatureStyle"+T.config.style]){oO()}else{T.loadMapStyleFiles(function(){oO()})}}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 oK=new ix("onmaptypechange");oK.zoomLevel=this.zoomLevel;oK.mapType=C;oK.exMapType=i;this.dispatchEvent(oK);T._setMapTypeStatus(C);hv.extend(T,cv.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){kU.sendMessage("Map","library",e)}},_setMapTypeStatus:function(C){var oN=arguments[1];if(C===c1){var oL=this._earth.getEarthCanvas();if(oL){oL.style.display=""}var oO={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(m8.convertMC2LL(this.centerPoint),oO);this._earth.setImageZoom(this.zoomLevel,oO);this._earth.setTilt(this.getTilt(),oO);this._earth.setHeading(this.getHeading(),oO);if(this.config.showStreetLayer){this._earth.showStreetLayer()}else{this._earth.hideStreetLayer()}}else{if(this.preMapType===c1&&this._earth){var oM=this._earth;var T=oM.getMapZoom();var oK=oM._imageRawZoom||T;var i=oK-T;var e=oM.getCenter();if(this._renderType==="webgl"){this._tilt=oM.getTilt();if(this.zoomLevel>7){this._heading=oM.getHeading();oN&&oN(e,T);return}if(oM.getHeading()!==0){oM.setTilt(this.getTilt());oM.setHeading(this.getHeading(),{callback:function(){oN&&oN(e,T)}})}else{oN&&oN(e,T)}return}if(i<0.1&&oM.getTilt()===0&&oM.getHeading()===0){oN&&oN(e,T);return}oM.setTilt(0);oM.setHeading(0);oM.setZoom(oM.getZoom()-i,{callback:function(){oN&&oN(e,T)}})}}},_proxyEarthEvents:function(){var oK=this;var oL=this._earth;oL.on("tilesload",function(i){oK.fire(i)});oL.on("centerandzoom",function(i){oK.dispatchEvent(new ix("onmoveend"));oK.dispatchEvent(new ix("onzoomend"))});function T(i){oK.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=id(T);var e=m8.convertLL2MC(new d9(C[0],C[1]));var oR=e.latLng;var oM=m8.convertMC2LL(this.centerPoint);var oO=T.getUTCHours();var oQ=oO+24*oM.lng/360;var oP=oQ-12;var oN=oP*60*0.25;var oL=Math.asin(Math.sin(mn(oM.lat))*Math.sin(mn(oR.lat))+Math.cos(mn(oM.lat))*Math.cos(mn(oR.lat))*Math.cos(mn(oN)));var oK=Math.asin(Math.sin(mn(oN))*Math.cos(mn(oR.lat))/Math.cos(oL));var i="north";if(oM.lat=19){return li.MAX_DRAG_TILT}else{if(e<=18){if(e=this._enableTiltZoom-2){return(1-(this._enableTiltZoom-e)/2)*li.MAX_DRAG_TILT_L2}return 0}return li.MAX_DRAG_TILT_L2}else{return(li.MAX_DRAG_TILT-li.MAX_DRAG_TILT_L2)*(e-18)+li.MAX_DRAG_TILT_L2}}},worldSize:function(i){var e=i||this.zoomLevel;return li.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){nX.setZIndex(Number(T))}e=e||{};if(e.reload){var C=e.reloadTime||5*60*1000;nX.reloadTimer=setInterval(function(){nX.clearCache();var oK=new ix("onupdate");i.fire(oK)},C)}kU.sendMessage("Map","traffic");this._addTileLayer(nX)},setTrafficOff:function(){if(nX.reloadTimer){clearInterval(nX.reloadTimer)}this._removeTileLayer(nX)},showOverlayContainer:function(){this.setDisplayOptions({overlay:true})},hideOverlayContainer:function(){this.setDisplayOptions({overlay:false})},addLabelsToMapTile:function(oM,oL){kU.sendMessage("Map","bindtype","custom_label");for(var T=0;T0){this.addLabelsToMapTile(oO,oM)}return oL},removeLabelsFromMapTile:function(oK,T,C){var oM=new ix("onremove_tile_labels");if(T&&C){oM.data=oK;oM.index=T;oM.model=C}else{for(var oL=0;oL-1&&cv[C]){e.push(C)}}return e},setCopyrightOffset:function(T,i){var C=new ix("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(c9()){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 ix("ondestroy"));var e=this.config.mapStyleId||0;delete cv["customStyleInfo_"+e];delete cv["FeatureStyle"+e];if(nX.reloadTimer){clearInterval(nX.reloadTimer)}cv.BMAP_INSTANCES&&(cv.BMAP_INSTANCES-=1);if(!cv.BMAP_INSTANCES){this.destroyStyle();window.FeatureStyle=null;window.iconSetInfo_high=null;window.indoorStyle=null}this.config={};this.clearSpots();this._webGLStateId&&fV.WebGLState.remove(this._webGLStateId);this.container.onselectstart=null;this.container.style.backgroundImage="";this.container.innerHTML="";this.maskLayer=null;this.platform=null;kU.kill();d5.kill();mL.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 oK=Object.keys(cv);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 g2&&typeof C[0].getBounds==="function"){var oO=new lz();for(var T=0;T-1&&e[oM]["featureType"]!=="INTERNATIONALIZEICONICON"){oO.push(e[oM])}else{oN.push(e[oM])}}var oS=K.apiHost+"/";var oR=K.apiHost+"/";if(window._BMapSecurityConfig&&window._BMapSecurityConfig["serviceHost"]){var oS=window._BMapSecurityConfig["serviceHost"]+"custom/"+this.version+"/mapstyle?version="+4+"&qt=custom_v2&is_all=true&is_new=1&";var oR=window._BMapSecurityConfig["serviceHost"]+"custom/"+this.version+"/mapstyle?version="+4+"&qt=custom_v2&is_all=true&is_new=1&space=indoor&"}else{var oS=oS+"custom/"+this.version+"/mapstyle?version="+4+"&ak="+oP+"&qt=custom_v2&is_all=true&is_new=1&";var oR=oR+"custom/"+this.version+"/mapstyle?version="+4+"&ak="+oP+"&qt=custom_v2&is_all=true&is_new=1&space=indoor&"}var oL=this.styleJson2styleStringV2(oN,oT);var C=this.styleJson2styleStringV2(oO,oU);oS+="styles="+encodeURIComponent(oL);oR+="styles="+encodeURIComponent(C);if(T&&T.os&&T.sv){oS+="&os="+T.os+"&sv="+T.sv;oR+="&os="+T.os+"&sv="+T.sv}var oK=new Date()["getTime"]();oS+="&timeStamp="+oK;oS+=np()(oS);oR+="&timeStamp="+oK;oR+=np()(oR);var oQ={custom:{url:oS,id:"customStyleInfo_"+oV,},indoor:{url:oR,id:"indoorStyleInfo_"+oV,},hasInfoor:oO.length>0,};return oQ},styleJson2styleStringV2:function(e,oN){var oR={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 oT={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 oU=[];for(var T=this.map.getMinZoom();T<=this.map.getMaxZoom();T++){oN.zoomFrontStyle[T]={}}oN.zoomFrontStyle.main={};var C=false;for(var T=0;!!e[T];T++){var oS=e[T];if(this.isOnlyZoomStyler(oS)){continue}var oQ=this.getFrontZoom(oS);if((oS.featureType==="land"||oS.featureType==="all"||oS.featureType==="background")&&typeof oS.elementType==="string"&&(oS.elementType==="geometry"||oS.elementType==="texture"||oS.elementType==="geometry.fill"||oS.elementType==="all")&&oS.stylers&&!C){if(oS.stylers["color"]){oN.bmapLandColor=oS.stylers["color"]}if(oS.stylers["image"]){oN.bmapLandFillTexture=oS.stylers["image"]}if(oS.stylers["opacity"]){oN.bmapLandColor=oS.stylers["opacity"]}if(oS.stylers["visibility"]&&oS.stylers["visibility"]==="off"){oN.bmapLandColor="#00000000"}if(oS.featureType==="land"){C=true}}if(oS.featureType==="building"&&typeof oS.elementType==="string"&&oS.elementType==="geometry.fill"){oN.buildingFill=true}if(oS.featureType==="roadarrow"&&oS.elementType==="labels.icon"&&oS.stylers){var oO=oS.stylers["visibility"];oN.zoomFrontStyle[oQ]["bmapRoadarrowVisibility"]=oO}var oK={};hv.extend(oK,oS);var oM=oK.stylers;delete oK.stylers;hv.extend(oK,oM);var oL=[];for(var oP in oR){if(oK[oP]){if(this.isEditorZoomKeys(oP)){continue}if(oP==="elementType"){oL.push(oR[oP]+":"+oT[oK[oP]])}else{if(oP==="image"){oL.push(oR[oP]+":"+encodeURIComponent(encodeURIComponent(oK[oP])))}else{switch(oK[oP]){case"poilabel":oK[oP]="poi";break;case"districtlabel":oK[oP]="label";break}oL.push(oR[oP]+":"+oK[oP])}}}}if(oL.length>2){oU.push(oL.join("|"))}}return oU.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={};hv.extend(i,e.stylers);delete i.curZoomRegionId;delete i.curZoomRegion;delete i.level;if(hv.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={};hv.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(oK,C,i,oM){oK=JSON.parse(oK);var T="Feature";if(C.indexOf("indoor")!==-1){T="indoor"}if(oK.status===0&&oK.data&&oK.data.style&&oK.data.style.length>=3){if(!i.baseFs){if(this.version==="v3"){var e=JSON.parse(JSON.stringify(cv[T+"StyleDefault"]));i.baseFs=this.combindStyle(e,oK.data.style)}else{i.baseFs=oK.data.style}}}else{if(!i.baseFs){i.baseFs=cv[T+"StyleDefault"]}}var oL=i.baseFs;this.updateFrontFeatureStyle(i);oM&&oM()},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,oM,e,C){var i=T.split("?")[0];var oL=T.split("?")[1];var oK=new XMLHttpRequest();oK.open("POST",i,true);oK.setRequestHeader("Content-type","application/x-www-form-urlencoded");oK.timeout=10000;oK.ontimeout=function(){C&&C()};oK.onreadystatechange=function(oN){if(this.readyState===4){if(this.status===200){oM&&oM(this.responseText)}else{e&&e()}}};oK.send(oL);return oK},getDefaultStyle:function(i){var e=this;jW.load(K.getMapStyleFiles("default"),function(){cv.FeatureStyleDefault=window.FeatureStyle;cv.iconSetInfoDefault=window.iconSetInfo_high;cv.iconSetInfoCustom=window.iconSetInfo_high;cv.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){oN=oK.verticesLength[C-1]}end=oK.verticesLength[C];var oL=[];var T="";if(oK.vertex){oL=oK.vertex;T="building3d"}else{if(oK.data[0]){oL=oK.data[0];T=oK.type}else{continue}}var oM=this.calcDrawMc(oL.slice(oN,end),T,e);this.map.addAreaSpot(oM,{userData:{styleId:oK.styleIds[C],type:"mapstyle"}})}},addLabelIntoAreaSpots:function(e){if(F.environment!=="customEditor"){return}for(var oK=0;oKoM){return oM}while(oNC){oN=oK}else{oM=oK}oK=(oM-oN)*0.5+oN}return oK};dP.prototype.solve=function(e,i){return this.sampleCurveY(this.solveCurveX(e,i))};var jF={};function ij(C){var e={duration:1000,fps:30,delay:0,transition:jF.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 oK=this;setTimeout(function(){oK._doStart()},e.delay)}else{this._doStart()}this._pauseTime=0}ij.INFINITE="INFINITE";ij.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===ij.INFINITE){this._endTime=null}else{this._endTime=this._beginTime+this._options.duration}this._loop()}};ij.prototype.setBeginTime=function(e){this._beginTime=e};ij.prototype.setDuration=function(e){this._options.duration=e};ij.prototype._loop=function(T){var oM=this;T=T||new Date().getTime();T=T-this._pauseTime;if(!this._beginTime){this._beginTime=T}this._endTime=this._beginTime+this._options.duration;if(oM._endTime!==null&&T>=oM._endTime){if(oM._options.dropLastAnimation===false){oM._options.render(oM._options.transition(1),1,T)}if(typeof oM._options.finish==="function"){oM._options.finish(T,this)}for(var oL=0,e=oM._callbacks.length;oL=oK.percentage&&TT){C=oL;var oK="系统于"+e.year+"年"+e.month+"月"+e.day+"日";oO="【"+i+"】"+oK+oO;try{var oP=document.createElement("iframe");oP.style.display="none";document.body.appendChild(oP);if(oP.contentWindow&&oP.contentWindow.alert){oP.contentWindow.alert(oO)}else{window.alert(oO)}document.body.removeChild(oP)}catch(oN){window.alert(oO)}d5.sendMessage("popup",oQ,i)}}})();function oA(e){return e.style}function lC(i){if(hv.Browser.ie>0){i.unselectable="on";i.selectstart=function(){return false};i.onmousedown=function(C){C.preventDefault();return false}}else{var e=oA(i);e.MozUserSelect="none";e.WebkitUserSelect="none";i.addEventListener("mousedown",function(C){C.preventDefault()},false)}}function bx(e){return e&&e.parentNode&&e.parentNode.nodeType!==11}function cQ(i,e){if(!i){return null}i.insertAdjacentHTML("beforeEnd",e);return i.lastChild}function iC(C,i){var T=document.createElement("div");T.innerHTML=i;var e=T.childNodes[0];return C.parentNode.insertBefore(e,C)}function aF(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 kK(i){aF(i);return g(i)}function j4(){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 l5(oK){if(!oK){return}oK.onload=oK.onerror=null;var C=oK.attributes,T,e,oL;if(C){e=C.length;for(T=0;T=e){return gQ(oO,oK)}var i=oL/e;var oN=C.lng+(oK.lng-C.lng)*i;var oM=C.lat+(oK.lat-C.lat)*i;const T={lng:oN,lat:oM};return gQ(oO,T)}function hK(C,i){var e=Math.round((C.x+i.x)/2);var T=Math.round((C.y+i.y)/2);return new hV(e,T)}function nk(e,C){var i=[];C=C||function(oK){return oK};for(var T in e){i.push(T+"="+C(e[T]))}return i.join("&")}function da(C,i,oL){var oM=document.createElement(C);if(oL){oM=document.createElementNS(oL,C)}i=i||{};for(var T in i){var oK={"for":"htmlFor","class":"cssClass"}[T]||T;if(T==="style"){oM.style.cssText=i[T];continue}if(T==="class"){hv.ac(oM,i[T]);continue}if(oM.setAttribute){oM.setAttribute(oK,i[T])}else{try{oM[oK]=i[T]}catch(oM){}}}return oM}function dK(e){if(e.currentStyle){return e.currentStyle}else{if(e.ownerDocument&&e.ownerDocument.defaultView){return e.ownerDocument.defaultView.getComputedStyle(e,null)}}}function c2(e){return typeof e==="function"}function i9(e){return e===void 0}function nU(e,i){return Object.prototype.hasOwnProperty.call(e,i)}function k(oK,oL){if(i9(oK.length)){for(var T in oK){if(nU(oK,T)){oL.call(null,T,oK[T])}}}else{var C=oK.length;if(C){for(var e=0;e>4);oP=((oO&15)<<4)|(oM>>2);oN=((oM&3)<<6)|oL;C=C+String.fromCharCode(oR);if(oM!==64){C=C+String.fromCharCode(oP)}if(oL!==64){C=C+String.fromCharCode(oN)}oR=oP=oN="";oQ=oO=oM=oL=""}while(T-1||e.indexOf("iPad")>-1){return true}return false}function lt(){var e=navigator.userAgent;if(e.indexOf("Android")>-1){return true}return false}function hM(){var e=navigator.userAgent;if(e.indexOf("Harmony")>-1){return true}return false}function eY(T,C){var e=T.getContainer();var i=C.getContainer();return e===i}function nI(){var e=navigator.userAgent;if(e.indexOf("Mobile")>-1){return true}return false}function mn(e){return e*Math.PI/180}function hJ(e){return e/Math.PI*180}function cC(e,oK){var T=Math.pow(10,oK);if(typeof e==="number"){return Math.round(e*T)/T}for(var C=0;Ce){C=e}}return C}function gq(e,i){while(e<0){e+=i}return e%i}function lp(i,e){return(i>=0&&e>=0)||(i<0&&e<0)}function Z(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 mj(T,C){for(var e=0;eT||C.lati){return false}return true}function m7(oN,oM,oL,T){var oK=aj(oL,T,oN);var C=aj(oL,T,oM);var i=aj(oN,oM,oL);var e=aj(oN,oM,T);if(oK*C<0&&i*e<0){return true}else{if(oK===0&&mS(oL,T,oN)){return true}else{if(C===0&&mS(oL,T,oM)){return true}else{if(i===0&&mS(oN,oM,oL)){return true}else{if(e===0&&mS(oN,oM,T)){return true}else{return false}}}}}}function k5(C,i){var e=i.parentNode;if(e.lastChild===i){e.appendChild(C)}else{e.insertBefore(C,i.nextSibling)}}function fS(oP,oQ){if(oQ===0){return oP}var oO=0;var oM=0;if(!oP){throw"异常"}if(oP.length===0){return[]}for(var oK=1,C=oP.length-1;oKoO){oM=oK;oO=oN}}var e=[];if(oO>=oQ){var oS=oP.slice(0,oM);var oR=oP.slice(oM,oP.length);var oL=fS(oS,oQ);var T=fS(oR,oQ);for(var oK=0,C=oL.length;oK=oK){C.push(T[e])}}return C}function v(e){if(Math.log2){return Math.log2(e)}return Math.log(e)/Math.LN2}function e3(C,i,e){return Math.min(e,Math.max(i,C))}function aO(e,i){if(!i){return e}var oL=i[0];var oK=i[1];var T=i[2];var C=i[3];var oN=[];var oM=[];oN[0]=C*e[0]+T*e[2];oN[1]=e[1];oN[2]=-T*e[0]+C*e[2];oM[0]=oN[0];oM[1]=oK*oN[1]-oL*oN[2];oM[2]=oL*oN[1]+oK*oN[2];return oM}var r=Math.PI/180;var jV=180/Math.PI;function id(C){var i=(C-Date.UTC(2000,0,1,12))/86400000/36525;var e=(d3.utcDay.floor(C)-C)/86400000*360-180;return[e-hY(i)*jV,fZ(i)*jV]}function hY(T){var oK=cj(T);var i=gd(T);var C=mf(T);var oL=Math.tan(me(T)/2);oL*=oL;return oL*Math.sin(2*C)-2*oK*Math.sin(i)+4*oK*oL*Math.sin(i)*Math.cos(2*C)-0.5*oL*oL*Math.sin(4*C)-1.25*oK*oK*Math.sin(2*i)}function fZ(e){return Math.asin(Math.sin(me(e))*Math.sin(cq(e)))}function cq(e){return ot(e)-(0.00569+0.00478*Math.sin((125.04-1934.136*e)*r))*r}function ot(e){return mf(e)+nd(e)}function gd(e){return(357.52911+e*(35999.05029-0.0001537*e))*r}function mf(i){var e=(280.46646+i*(36000.76983+i*0.0003032))%360;return(e<0?e+360:e)/180*Math.PI}function nd(i){var e=gd(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 me(e){return fo(e)+0.00256*Math.cos((125.04-1934.136*e)*r)*r}function fo(e){return(23+(26+(21.448-e*(46.815+e*(0.00059-e*0.001813)))/60)/60)*r}function cj(e){return 0.016708634-e*(0.000042037+1.267e-7*e)}function ja(){return window.devicePixelRatio||1}function my(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 ej(e){if(e.lng>=0&&e.lat>=0){return new d9(e.lng-10000000,e.lat-6000000)}if(e.lng>=0&&e.lat<0){return new d9(e.lng-10000000,e.lat+6000000)}if(e.lng<0&&e.lat>=0){return new d9(e.lng+10000000,e.lat-6000000)}if(e.lng<0&&e.lat<0){return new d9(e.lng+10000000,e.lat+6000000)}}var lQ=null;if(window.performance&&window.performance.now){lQ=function(){return performance.now()}}else{if(Date.now){lQ=function(){return Date.now()}}else{lQ=function(){return(new Date).getTime()}}}function lo(T,e,i){var C="mouseWheel";if(hv.Platform.macintosh){if(!isNaN(T)&&(T<10||T!==120)&&(e%1===0&&e<5)){C="padScroll"}if(hv.Browser.firefox&&(e%1===0&&e<5&&i===0)){C="padScroll"}}if(hv.Browser.safari&&T===12){C="mouseWheel"}return C}function cR(oS,oN){var oR=oS[0];var oQ=oS[1];var T=false;for(var oM=0,oL=oN.length-2;oMoQ)!==(C>oQ))&&(oR<(oO-oP)*(oQ-oK)/(C-oK)+oP);if(e){T=!T}oL=oM}return T}function lm(oK,oM){oM=oM||[];var e=oM.length;var C=0;var oL=false;for(var T=0;T=oM[T].lat)&&(oK.lat=oM[C].lat)&&(oK.lati){C=Math.pow(C-i+1,T)+i-1}else{if(Cthis.ll.lng&&e.lngthis.ll.lat&&e.latkF){return a0}return ia};kQ.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 gV(i,T,e,C){this.sp={lng:i,lat:T};this.ep={lng:e,lat:C};this.mbr=new kQ(i,T,e,C)}function lT(T,e,oL,oK){for(var C=0;C=e[C]&&T.lng<=e[C+1]&&T.lat>=oL[C]&&T.lat<=oL[C+1]){return true}}return false}function jh(oO){var i=oO.lng;var oN=oO.lat;var T=Math.sqrt(i*i+oN*oN);var oL=Math.atan2(oN,i);var C=T+ju(oN);var oK=oL+jt(i);var e=C*Math.cos(oK);var oM=C*Math.sin(oK);return{lng:e+lc,lat:oM+lb}}function bL(oO){var i=oO.lng-lc;var oN=oO.lat-lb;var T=Math.sqrt(i*i+oN*oN);var oL=Math.atan2(oN,i);var C=T-ju(oN);var oK=oL-jt(i);var e=C*Math.cos(oK);var oM=C*Math.sin(oK);return{lng:e,lat:oM}}function ju(e){return Math.sin(e*iv*mN)*j3}function jt(e){return Math.cos(e*iv*mN)*j1}function aS(C,i,e){return((i.lng-C.lng)*(e.lat-C.lat)-(e.lng-C.lng)*(i.lat-C.lat))}function lj(i,e){return Math.abs(i-e)<=kF}function jG(T,C){var i=T.lat*mN;var oO=T.lng*mN;var e=C.lat*mN;var oN=C.lng*mN;var oL=Math.cos(i)*Math.cos(e);var oK=Math.cos(oO)*Math.cos(oN);var oQ=Math.sin(i)*Math.sin(e);var oP=Math.sin(oO)*Math.sin(oN);var oR=oL*oK+oL*oP+oQ;if(oR<-1){oR=-1}else{if(oR>1){oR=1}}var oM=Math.acos(oR)*mt;return oM}function n(oN,oM){var i=oN.lat*mN;var e=oM.lat*mN;var T=oN.lng*mN;var C=oM.lng*mN;var oL=i-e;var oK=T-C;var oO=Math.sin(oL/2)*Math.sin(oL/2)+Math.cos(i)*Math.cos(e)*Math.sin(oK/2)*Math.sin(oK/2);return 2*Math.asin(Math.sqrt(oO))*mt}function jE(oO,C){var oQ=cy(oO,C);var oP=180;var oN=90;var oM=-180;var oK=-90;var oL=C.sp;var T=C.ep;oP=oL.lng=oP&&oQ.lng<=oK&&oQ.lat>=oN){return jG(oO,oQ)}else{var i=n(oO,C.sp);var e=n(oO,C.ep);return iT.lat){if(aS({lng:eP[e],lat:eN[e]},{lng:eP[(e+1)%au],lat:eN[(e+1)%au]},T)>0){++C}}}else{if(eN[(e+1)%au]<=T.lat){if(aS({lng:eP[e],lat:eN[e]},{lng:eP[(e+1)%au],lat:eN[(e+1)%au]},T)<0){--C}}}}return C===0?ia:lE}function ok(T){var oM={};if(T.lnghu[2]+0.4||T.lat>hu[3]+0.4){oM.lng=T.lng;oM.lat=T.lat;return oM}else{if(lT(T,g7,g5,mg)){oM=jh(T);return oM}}var e=0;var oP=fG;var C=0;var oN=new kQ();var oO=1;if(cL(T)===ia){for(var oL=0;oLE[2]+0.4||i.lat>E[3]+0.4){C.lng=i.lng;C.lat=i.lat;return C}else{if(lT(i,ds,dp,mg)){C=bL(i);return C}}var e=ok(i);if(i.lng===e.lng&&i.lat===e.lng){C.lng=i.lng;C.lat=i.lat;return C}return decryptPt1(i,ok)}function md(i,e){if(e===3&&i instanceof d9){var C=ok(i);return new d9(C.lng,C.lat)}else{return i}}function g9(i,e){if(e===3&&i instanceof d9){var C=hx(i);return new d9(C.lng,C.lat)}else{if(e===5&&i instanceof d9){return new d9(i.lng,i.lat)}else{return i}}}function iM(i,e){if(i&&!lT(i,g7,g5,mg)){return i}switch(e){case BMAP_COORD_GCJ02:var C=fU.transform([i.lng,i.lat],fU.GCJ02,fU.BD09LL);return new d9(C[0],C[1]);case BMAP_COORD_WGS84:var C=fU.transform([i.lng,i.lat],fU.WGS84,fU.BD09LL);return new d9(C[0],C[1]);case 3:var C=fU.transform([i.lng,i.lat],fU.GCJ02,fU.BD09LL);return new d9(C[0],C[1]);default:return i}}function m0(i,e){if(i&&!lT(i,g7,g5,mg)){return i}switch(e){case BMAP_COORD_GCJ02:var C=fU.transform([i.lng,i.lat],fU.BD09LL,fU.GCJ02);return new d9(C[0],C[1]);case BMAP_COORD_WGS84:var C=fU.transform([i.lng,i.lat],fU.BD09LL,fU.WGS84);return new d9(C[0],C[1]);case 3:var C=fU.transform([i.lng,i.lat],fU.BD09LL,fU.GCJ02);return new d9(C[0],C[1]);default:return i}}function u(oL){if(!oL){oL={}}var oM=JSON.stringify(oL);var oK=0,C,T,e;if(oM.length===0){return oK}for(C=0,e=oM.length;C=3){var T=oK[0]||0;var C=oK[1]||0;var e=oK[2]||0;var i=oK[3]||1}else{var T=(oK)&255;var C=(oK>>8)&255;var e=(oK>>16)&255;var i=(oK>>24)&255}if(!oK){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(oK){var C=oK;var T="";var e=0;for(e=0;ei-pN?pN:pO},e.offset=function(i,pN){return pM(i=new Date(+i),null==pN?1:Math.floor(pN)),i},e.range=function(pO,i,pN){var pP=[];if(pO=e.ceil(pO),pN=null==pN?1:Math.floor(pN),!(i>pO&&pN>0)){return pP}do{pP.push(new Date(+pO))}while(pM(pO,pN),pL(pO),i>pO);return pP},e.filter=function(i){return pF(function(pN){for(;pL(pN),!i(pN);){pN.setTime(pN-1)}},function(pN,pO){for(;--pO>=0;){for(;pM(pN,1),!i(pN);){}}})},C&&(e.count=function(i,pN){return pp.setTime(+i),pt.setTime(+pN),pL(pp),pL(pt),Math.floor(C(pp,pt))},e.every=function(i){return i=Math.floor(i),isFinite(i)&&i>0?i>1?e.filter(T?function(pN){return T(pN)%i===0}:function(pN){return e.count(0,pN)%i===0}):e:null}),e}function pu(e){return pF(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())*po)/pC})}function pm(e){return pF(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)/pC})}var pp=new Date,pt=new Date,pA=pF(function(){},function(i,C){i.setTime(+i+C)},function(i,C){return C-i});pA.every=function(e){return e=Math.floor(e),isFinite(e)&&e>0?e>1?pF(function(i){i.setTime(Math.floor(i/e)*e)},function(i,C){i.setTime(+i+C*e)},function(i,C){return(C-i)/e}):pA:null};var pJ=pA.range,pH=1000,po=60000,pE=3600000,pw=86400000,pC=604800000,oQ=pF(function(e){e.setTime(Math.floor(e/pH)*pH)},function(i,C){i.setTime(+i+C*pH)},function(i,C){return(C-i)/pH},function(e){return e.getUTCSeconds()}),pG=oQ.range,pv=pF(function(e){e.setTime(Math.floor(e/po)*po)},function(i,C){i.setTime(+i+C*po)},function(i,C){return(C-i)/po},function(e){return e.getMinutes()}),oY=pv.range,pi=pF(function(i){var C=i.getTimezoneOffset()*po%pE;0>C&&(C+=pE),i.setTime(Math.floor((+i-C)/pE)*pE+C)},function(i,C){i.setTime(+i+C*pE)},function(i,C){return(C-i)/pE},function(e){return e.getHours()}),pB=pi.range,o8=pF(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())*po)/pw},function(e){return e.getDate()-1}),oP=o8.range,o5=pu(0),o7=pu(1),oL=pu(2),o3=pu(3),oS=pu(4),pl=pu(5),ps=pu(6),oN=o5.range,pk=o7.range,oW=oL.range,ph=o3.range,px=oS.range,pj=pl.range,pI=ps.range,pz=pF(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()}),pK=pz.range,o2=pF(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()});o2.every=function(e){return isFinite(e=Math.floor(e))&&e>0?pF(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 oV=o2.range,pq=pF(function(e){e.setUTCSeconds(0,0)},function(i,C){i.setTime(+i+C*po)},function(i,C){return(C-i)/po},function(e){return e.getUTCMinutes()}),pa=pq.range,o9=pF(function(e){e.setUTCMinutes(0,0,0)},function(i,C){i.setTime(+i+C*pE)},function(i,C){return(C-i)/pE},function(e){return e.getUTCHours()}),o6=o9.range,o4=pF(function(e){e.setUTCHours(0,0,0,0)},function(i,C){i.setUTCDate(i.getUTCDate()+C)},function(i,C){return(C-i)/pw},function(e){return e.getUTCDate()-1}),o1=o4.range,o0=pm(0),oZ=pm(1),oX=pm(2),oU=pm(3),oT=pm(4),oO=pm(5),oM=pm(6),oK=o0.range,pg=oZ.range,pD=oX.range,pr=oU.range,py=oT.range,pf=oO.range,pe=oM.range,pd=pF(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()}),pc=pd.range,oR=pF(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()});oR.every=function(e){return isFinite(e=Math.floor(e))&&e>0?pF(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 pb=oR.range;pn.timeInterval=pF,pn.timeMillisecond=pA,pn.timeMilliseconds=pJ,pn.utcMillisecond=pA,pn.utcMilliseconds=pJ,pn.timeSecond=oQ,pn.timeSeconds=pG,pn.utcSecond=oQ,pn.utcSeconds=pG,pn.timeMinute=pv,pn.timeMinutes=oY,pn.timeHour=pi,pn.timeHours=pB,pn.timeDay=o8,pn.timeDays=oP,pn.timeWeek=o5,pn.timeWeeks=oN,pn.timeSunday=o5,pn.timeSundays=oN,pn.timeMonday=o7,pn.timeMondays=pk,pn.timeTuesday=oL,pn.timeTuesdays=oW,pn.timeWednesday=o3,pn.timeWednesdays=ph,pn.timeThursday=oS,pn.timeThursdays=px,pn.timeFriday=pl,pn.timeFridays=pj,pn.timeSaturday=ps,pn.timeSaturdays=pI,pn.timeMonth=pz,pn.timeMonths=pK,pn.timeYear=o2,pn.timeYears=oV,pn.utcMinute=pq,pn.utcMinutes=pa,pn.utcHour=o9,pn.utcHours=o6,pn.utcDay=o4,pn.utcDays=o1,pn.utcWeek=o0,pn.utcWeeks=oK,pn.utcSunday=o0,pn.utcSundays=oK,pn.utcMonday=oZ,pn.utcMondays=pg,pn.utcTuesday=oX,pn.utcTuesdays=pD,pn.utcWednesday=oU,pn.utcWednesdays=pr,pn.utcThursday=oT,pn.utcThursdays=py,pn.utcFriday=oO,pn.utcFridays=pf,pn.utcSaturday=oM,pn.utcSaturdays=pe,pn.utcMonth=pd,pn.utcMonths=pc,pn.utcYear=oR,pn.utcYears=pb,Object.defineProperty(pn,"__esModule",{value:!0})});function hH(e){this._elemType=e;this._objCollection={}}hH.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=da(this._elemType);e=cv.getGUID("obj_pool_");this._objCollection[e]=i;return i};hH.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}};hH.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 lI={get:function(i,oK,e,C){var T=new XMLHttpRequest();T.open("GET",i,true);T.timeout=10000;T.ontimeout=function(){C&&C()};T.onreadystatechange=function(oL){if(this.readyState===4){if(this.status===200){oK&&oK(T.responseText)}else{e&&e()}}};T.send()},post:function(i,oL,oK,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(oM){if(this.readyState===4){if(this.status===200){oK&&oK(T.responseText,oL)}else{e&&e()}}};T.send(oL);return T}};var jW=(function(e){function i(oL,C,oK){if(oL.indexOf("v=")===-1){oL+="&v="+ep()}var T=da("script",{src:oL,type:"text/javascript",charset:"utf-8"});if(T.addEventListener){T.addEventListener("load",function(oN){var oM=oN.target;oM.parentNode.removeChild(oM);C&&C()},false);T.addEventListener("error",function(oN){if(oN){var oM=oN.target;oM&&oM.parentNode&&oM.parentNode.removeChild(oM)}oK&&oK(null)},false)}else{if(T.attachEvent){T.attachEvent("onreadystatechange",function(oN){var oM=window.event.srcElement;if(oM&&(oM.readyState==="loaded"||oM.readyState==="complete")){oM.parentNode.removeChild(oM)}C&&C()})}}e.getElementsByTagName("head")[0].appendChild(T)}return{load:function(oM,C,T){if(typeof oM==="string"){i(oM,C,T)}else{if(oM.length>0){var oL=oM.length;for(var oK=0;oK-1){return{col:T,row:oP,zoom:oO,useZoom:C}}else{var oM=oG.mapZoomBaseIndex[oO];var oL=oG.baseScaleZoom[oM+1];if(!oL){return null}var oN=this.getFactorByZooms(oL,oO);var e=oG.baseZoomInfo[oL];return{col:Math.floor(T/oN),row:Math.floor(oP/oN),zoom:oL,useZoom:e[e.length-1]}}return null}if(oO-1-1){return[{col:oK,row:oM,zoom:e,useZoom:C}]}else{var oX=0;var oU=e;while(oXoT){return null}var oS=Math.pow(2,oZ);var i=oK*oS;var oR=oM*oS;var oO=e+oZ;var oQ=[];for(var oW=0;oW<2;oW++){var oL=i+oW;for(var oV=0;oV<2;oV++){var oN=oR+oV;oQ.push({col:oL,row:oN,zoom:oO,useZoom:oO})}}return oQ},getFactorByZooms:function(i,T){var C=oG.mapZoomBaseIndex[i];var oK=oG.mapZoomBaseIndex[T];var e=oG.baseScaleZoomMercatorSize[C];var oL=oG.baseScaleZoomMercatorSize[oK];return e/oL}};var eV={};var ao=["swiftshader","microsoft basic render driver"];var kJ=["intel","nvidia","amd","apple","geforce"];function jI(e){e=e.toLowerCase();if(ao.indexOf(e)>=0){return true}if(e.indexOf("mobile")>=0){return true}return false}function ed(C){C=C.toLowerCase();for(var e=0;e=0){return true}}return false}function oC(e){if(!e){return false}if(jI(e)){return false}if(ed(e)){return true}return false}eV.ifEnableEarth=function(i){var e=eV.ifEnableEarth;if(!i&&typeof e._enable==="boolean"){return e._enable}if(eV.ifSupportWebGL()){e._enable=true;return true}e._enable=false;return false};eV.ifEnableWebGLMap=function(i){var e=eV.ifEnableWebGLMap;if(!i&&typeof e._enable==="boolean"){return e._enable}if(eV.ifSupportWebGL()){if(bb.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};eV.params={};eV.ifSupportWebGL=function(){var i=eV.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 oK=null;var oQ={alpha:true,antialias:false,failIfMajorPerformanceCaveat:false,preserveDrawingBuffer:false,stencil:false};try{oK=C.getContext("webgl",oQ)||C.getContext("experimental-webgl",oQ)}catch(oM){i._supportWebGL=false}if(oK===null){i._supportWebGL=false}else{i._supportWebGL=true;var oO=oK.getExtension("WEBGL_debug_renderer_info");var oN="";if(oO){oN=oK.getParameter(oO.UNMASKED_RENDERER_WEBGL);if(oC(oN)===true){i._supportWebGL=true}var oP=oK.getParameter(oO.UNMASKED_VENDOR_WEBGL);i._renderer=oN;i._vendor=oP}if(!oO&&hv.Browser.firefox){i._supportWebGL=true}if(!oO&&hv.Platform.macintosh){i._supportWebGL=true}if(oK.drawingBufferWidth!==C.width||oK.drawingBufferHeight!==C.height){i._supportWebGL=false}if(oK.getParameter(oK.MAX_VERTEX_TEXTURE_IMAGE_UNITS)<4){i._supportWebGL=false}var T=oK.getParameter(oK.MAX_TEXTURE_SIZE);eV.params.maxTextureSize=T;if(T<4096){i._supportWebGL=false}var oL=oK.getParameter(oK.MAX_TEXTURE_IMAGE_UNITS);if(oL<8){i._supportWebGL=false}if(oK.getShaderPrecisionFormat&&!oK.getShaderPrecisionFormat(oK.FRAGMENT_SHADER,oK.HIGH_FLOAT)){kU.sendMessage("Monitor","ShaderPrecision","sys_"+oN);return i._supportWebGL}if(!oK.getShaderPrecisionFormat||!oK.getShaderPrecisionFormat(oK.FRAGMENT_SHADER,oK.HIGH_FLOAT)){kU.sendMessage("Monitor","ShaderPrecision","sys_"+oN);return i._supportWebGL}if(!oK.getShaderPrecisionFormat||oK.getShaderPrecisionFormat(oK.FRAGMENT_SHADER,oK.HIGH_FLOAT).precision<23){i._supportWebGL=false}}return i._supportWebGL};eV.ifSupportCanvas2d=function(){var oK=eV.ifSupportCanvas2d;if(typeof oK.supportCanvas2d==="boolean"){return oK.supportCanvas2d}var C=document.createElement("canvas");var i=null;try{i=C.getContext("2d")}catch(T){oK.supportCanvas2d=false}if(i===null){oK.supportCanvas2d=false}else{oK.supportCanvas2d=true}return oK.supportCanvas2d};eV.ifCanvas2dInBlackList=function(){return true};eV.ifEnableCanvas2dMap=function(){return false;var i=navigator.userAgent;var e=0;var T=0;var oK=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)){oK=parseFloat(RegExp.$1);if(oK>=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};eV.ifSupportCSS3=function(oN,i){var oM=document.createElement("div");var oL="Webkit Moz O ms".split(" ");var e=oL.length;var C="";var T=oM.style;if(oN in T){C=oN}oN=oN.replace(/^[a-z]/,function(oO){return oO.toUpperCase()});while(e--){var oK=oL[e]+oN;if(oK in T){C=oK;break}}if(i){return C}else{return C.length>0?true:false}};eV.isModernBrowser=eV.ifSupportCanvas2d()&&eV.ifSupportCSS3("transform");function a1(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}a1.prototype.setData=function(T,oL){var i=this._cache;var C=this._size;if(C===0){return}var e=this._curSize;if(e===C){this._removeOld()}var oK;if(!i[T]){oK={key:T,data:oL,older:null,newwer:null};i[T]=oK;if(this._least===null){this._least=oK}if(this._most===null){this._most=oK}this._curSize++}else{oK=i[T];oK.data=oL;if(this._most===oK){return}oK.older&&(oK.older.newer=oK.newer);oK.newer&&(oK.newer.older=oK.older);if(this._least===oK){this._least=oK.newer}}if(this._most&&this._most!==oK){this._most.newer=oK;oK.older=this._most;this._most=oK;oK.newer=null}};a1.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};a1.prototype.getAllData=function(){return this._cache};a1.prototype.getHitRate=function(){return this._hitTimes/this._getDataTimes};a1.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--};a1.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 pw(pA,pz){var pD,i,pF,C=(pF=300+(pD=pA-105)+2*(i=pz-35)+0.1*pD*pD+0.1*pD*i+0.1*pl(pk(pD)),pF+=2*(20*pf(6*pD*py)+20*pf(2*pD*py))/3,(pF+=2*(20*pf(pD*py)+40*pf(pD/3*py))/3)+2*(150*pf(pD/12*py)+300*pf(pD/30*py))/3),T=function(pI,pH){var pG=2*pI-100+3*pH+0.2*pH*pH+0.1*pI*pH+0.2*pl(pk(pI));return pG+=2*(20*pf(6*pI*py)+20*pf(2*pI*py))/3,pG+=2*(20*pf(pH*py)+40*pf(pH/3*py))/3,pG+2*(160*pf(pH/12*py)+320*pf(pH*py/30))/3}(pA-105,pz-35),pC=pz/180*py,pB=pf(pC),pE=pl(pB=1-pe*pB*pB);return[C=180*C/(pq/pE*ph(pC)*py),T=180*T/(pq*(1-pe)/(pB*pE)*py)]}function pn(T){var i=T[0],C=T[1];if(!pt(i,C)){return[i,C]}var pz=pw(i,C);return[i+pz[0],C+pz[1]]}function pg(pA){var pE=pA[0],C=pA[1];if(!pt(pE,C)){return[pE,C]}for(var T=[pE,C],pC=T[0],pz=T[1],pD=pn([pC,pz]),pB=pD[0]-pE,pF=pD[1]-C;pk(pB)>0.000001||pk(pF)>0.000001;){pB=(pD=pn([pC-=pB,pz-=pF]))[0]-pE,pF=pD[1]-C}return[pC,pz]}var pr=Math.sin,ps=Math.cos,oT=Math.atan2,pv=Math.sqrt,pd=3000*Math.PI/180;function pj(T){var i=T[0]-0.0065,C=T[1]-0.006,pA=pv(i*i+C*C)-0.00002*pr(C*pd),pz=oT(C,i)-0.000003*ps(i*pd);return[pA*ps(pz),pA*pr(pz)]}function oX(T){var i=T[0],C=T[1],pA=pv(i*i+C*C)+0.00002*pr(C*pd),pz=oT(C,i)+0.000003*ps(i*pd);return[pA*ps(pz)+0.0065,pA*pr(pz)+0.006]}var pa=180/Math.PI,oO=Math.PI/180,oQ=6378137,px=20037508.342789244;function o2(i){return[i[0]*pa/oQ,(0.5*Math.PI-2*Math.atan(Math.exp(-i[1]/oQ)))*pa]}function pm(T){var i=Math.abs(T[0])<=180?T[0]:T[0]-360*(T[0]<0?-1:1),C=[oQ*i*oO,oQ*Math.log(Math.tan(0.25*Math.PI+0.5*T[1]*oO))];return C[0]>px&&(C[0]=px),C[0]<-px&&(C[0]=-px),C[1]>px&&(C[1]=px),C[1]<-px&&(C[1]=-px),C}var o1,o0,oZ,pc,oW,oL,o9,o6,o5,o7,oK,o4,pb=Math.abs,po=[12890594.86,8362377.87,5591021,3481989.83,1678043.12,0],oV=[75,60,45,30,15,0],oN=[[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]],pp=[[-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 oU(pz,C,T){var pB=pb(C)/T[9],pA=T[0]+T[1]*pb(pz),i=T[2]+T[3]*pB+T[4]*Math.pow(pB,2)+T[5]*Math.pow(pB,3)+T[6]*Math.pow(pB,4)+T[7]*Math.pow(pB,5)+T[8]*Math.pow(pB,6);return[pA*=pz<0?-1:1,i*=C<0?-1:1]}function pi(T){for(var i=T[0],C=T[1],pA=[],pz=0;pzoV[pz]){pA=pp[pz];break}}return oU(i,C,pA)}function oS(T){for(var i=T[0],C=T[1],pA=[],pz=0;pz=po[pz]){pA=oN[pz];break}}return oU(i,C,pA)}function oR(C,i){if(!C){throw new Error(i)}}function o3(i){return !!i&&"[object Array]"===Object.prototype.toString.call(i)}function oY(i){return !isNaN(Number(i))&&null!==i&&!o3(i)}function oP(){for(var T=[],i=0;i=2,"Invalid input coordinate: "+pC),oR(oY(pC[0])&&oY(pC[1]),"Invalid input coordinate: "+pC),pC=pC.map(Number),pz=!0);var T=pD;return pz?T(pC):(oM(pC,(function(pF){var i;i=T(pF),pF[0]=i[0],pF[1]=i[1]})),pC)}})})();var k0={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(oL){var oM=oL.replace("#","");if(oM.length===3){oM+="f"}else{if(oM.length===6){oM+="ff"}}var e=[];var oK=oM.length;var T=oK===8?2:1;for(var C=0;C=0&&oK<60){oM=oN;oL=C;e=0}else{if(oK>=60&&oK<120){oM=C;oL=oN;e=0}else{if(oK>=120&&oK<180){oM=0;oL=oN;e=C}else{if(oK>=180&&oK<240){oM=0;oL=C;e=oN}else{if(oK>=240&&oK<300){oM=C;oL=0;e=oN}else{if(oK>=300&&oK<360){oM=oN;oL=0;e=C}}}}}}oM=(oM+i)*255>255?255:(oM+i)*255;oL=(oL+i)*255>255?255:(oL+i)*255;e=(e+i)*255>255?255:(e+i)*255;return[Math.round(oM),Math.round(oL),Math.round(e)]},formatColorCssToRgbaArray:function(oL,C,T){T=(typeof T!=="boolean")?true:T;if(typeof oL!=="string"){return T?[0,0,0,1]:[0,0,0,255]}var i=(oL||"Black").trim().toLowerCase();var e=[];var oK=k0.ColorRefTable[i];if(oK!==undefined){i=oK[0]}e=k0.parseCSSColor(i);if(C!==undefined&&!isNaN(Number(C))){C=Number(C);e[3]=k0.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,oP,oQ,T,oV){oQ=oQ||[];T=T||"#ccc";oV=oV||1;const C=document.createElement("canvas");const oW=C.getContext("2d");C.width=256;C.height=oV;const oL=oP[0];const oS=oP[oP.length-1];if(e.length===oP.length){const oT=oW.createLinearGradient(0,0,256,1);for(var oO=0;oO>16)+(o3>>16)+(o2>>16);return(o1<<16)|(o2&65535)}function oU(o0,o1){return(o0<>>(32-o1))}function oP(o5,o2,o1,o0,o4,o3){return oV(oU(oV(oV(o2,o5),oV(o0,o3)),o4),o1)}function e(o2,o1,o6,o5,o0,o4,o3){return oP((o1&o6)|(~o1&o5),o2,o1,o0,o4,o3)}function oM(o2,o1,o6,o5,o0,o4,o3){return oP((o1&o5)|(o6&~o5),o2,o1,o0,o4,o3)}function oS(o2,o1,o6,o5,o0,o4,o3){return oP(o1^o6^o5,o2,o1,o0,o4,o3)}function oY(o2,o1,o6,o5,o0,o4,o3){return oP(o6^(o1|~o5),o2,o1,o0,o4,o3)}function C(pa,o5){pa[o5>>5]|=128<<(o5%32);pa[((o5+64)>>>9<<4)+14]=o5;var o2;var o4;var o3;var o1;var o0;var o9=1732584193;var o8=-271733879;var o7=-1732584194;var o6=271733878;for(o2=0;o2>5]>>>(o2%32))&255)}return o0}function oO(o1){var o3;var o0=[];o0[(o1.length>>2)-1]=undefined;for(o3=0;o3>5]|=(o1.charCodeAt(o3/8)&255)<<(o3%32)}return o0}function oN(o0){return oT(C(oO(o0),o0.length*8))}function oZ(o2,o5){var o1;var o4=oO(o2);var o0=[];var o3=[];var o6;o0[15]=o3[15]=undefined;if(o4.length>16){o4=C(o4,o2.length*8)}for(o1=0;o1<16;o1+=1){o0[o1]=o4[o1]^909522486;o3[o1]=o4[o1]^1549556828}o6=C(o0.concat(oO(o5)),512+o5.length*8);return oT(C(o3.concat(o6),512+128))}function oX(o3){var o2="0123456789abcdef";var o1="";var o0;var o4;for(o4=0;o4>>4)&15)+o2.charAt(o0&15)}return o1}function oQ(o0){return unescape(encodeURIComponent(o0))}function T(o0){return oN(oQ(o0))}function oR(o0){return oX(T(o0))}function i(o0,o1){return oZ(oQ(o0),oQ(o1))}function oW(o0,o1){return oX(i(o0,o1))}function oK(o1,o2,o0){if(!o2){if(!o0){return oR(o1)}return T(o1)}if(!o0){return oW(o2,o1)}return i(o2,o1)}oL.md5=oK})(this);cv._rd=cv._rd||{};var e7={request:function(T,e){var oK=(Math.random()*100000).toFixed(0);if(e){cv._rd["_cbk"+oK]=function(oL){e&&e(oL);delete cv._rd["_cbk"+oK]};T+="&callback=BMapGL._rd._cbk"+oK}function C(oM){var oL;var oN=new RegExp("(^| )"+oM+"=([^;]*)(;|$)");if(oL=document.cookie.match(oN)){return unescape(oL[2])}else{return -1}}if(T.indexOf("v=")===-1){T+="&v="+ep()}T=e7.getSeckeyAndSign(T);var i=da("script",{src:T,type:"text/javascript",charset:"utf-8"});if(i.addEventListener){i.addEventListener("load",function(oM){var oL=oM.target;oL.parentNode.removeChild(oL)},false);i.addEventListener("error",function(oL){e&&e([,,,,,])},false)}else{if(i.attachEvent){i.attachEvent("onreadystatechange",function(oM){var oL=window.event.srcElement;if(oL&&(oL.readyState=="loaded"||oL.readyState=="complete")){oL.parentNode.removeChild(oL)}})}}document.getElementsByTagName("head")[0].appendChild(i);i=null},getSeckeyAndSign:function(oL){var C=decodeURIComponent(oL);var oK=new Date().getTime();var i=window.___abvk?window.___abvk:e7.getSeckeyCidItem("SECKEY_ABVK");var oM=e7.getSeckeyCidItem("BMAP_SECKEY");var e=encodeURIComponent(i+","+oM);var T=i+","+oM;oL+="&seckey="+e+"&timeStamp="+oK;C+="&seckey="+T+"&timeStamp="+oK;oL+=np()(C);return oL},getSeckeyCidItem:function(e){if(localStorage){return localStorage.getItem(e)?localStorage.getItem(e):-1}if(sessionStorage){return sessionStorage.getItem(e)?sessionStorage.getItem(e):-1}}};var or={request:function(oM,oK,i,oO,T){var oL=(Math.random()*100000)["toFixed"](0);cv._rd["_cbk"+oL]=function(oP){if(oP.result&&oP.result["popup"]&&oP.result["popup"]===1&&oP.result["error_msg"]){dZ(oP.result["error_msg"],{from:oK.qt});return}i=i||{};oM&&oM(oP,i);delete cv._rd["_cbk"+oL]};oO=oO||"";var oN;if(i&&i.useEncodeURI){oN=nk(oK,encodeURI)}else{oN=nk(oK,encodeURIComponent)}var e="";if(window._BMapSecurityConfig&&window._BMapSecurityConfig["serviceHost"]){e=window._BMapSecurityConfig["serviceHost"]+oO+"?"+oN+"&ie=utf-8&oue=1&fromproduct=jsapi"}else{var C=K.apiHost;e=C+"/"+oO+"?"+oN+"&ie=utf-8&oue=1&fromproduct=jsapi&ak="+hj}if(!T){e+="&res=api"}e+="&callback="+h6+"._rd._cbk"+oL;e7.request(e)}};var eq={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:"";aP&&aP(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(oN,oM,T,oL,oK){if(e.isFetch(e.category.JS)&&e.hostExit(oM)){if(oK&&oK.stack){e.sendError({title:oN,msg:oK.stack,category:e.category.JS,level:e.levels.ERROR})}else{if(typeof oN==="string"){e.sendError({title:oN,msg:JSON.stringify({resourceUrl:oM,rowNum:T,colNum:oL}),category:"js",level:e.levels.ERROR})}}}if(i&&c2(i)){i&&i.apply(C,arguments)}}},handleResourceError:function(i){var e=this;i.addEventListener("error",function(oL){if(oL){var oM=oL.target||oL.srcElement;var oK=oM instanceof HTMLScriptElement||oM instanceof HTMLLinkElement||oM instanceof HTMLImageElement;if(!oK){if(!i.onerror){var C=oL.filename||null;if(!e.isFetch(e.category.JS)||!e.hostExit(C)){return}if(oL.error&&oL.error.stack){e.sendError({title:oL.message,msg:oL.error.stack,category:e.category.JS,level:e.levels.ERROR})}else{if(typeof oL.message==="string"){e.sendError({title:oL.message,msg:JSON.stringify({resourceUrl:C,rowNum:oL.lineno,colNum:oL.cowno}),category:e.category.JS,level:e.levels.ERROR})}}}return}var T=oM.src||oM.href;if(e.isFetch(e.category.RESOURCE)&&e.hostExit(T)){e.sendError({title:oM.nodeName,msg:T,category:e.category.RESOURCE,level:e.levels.ERROR})}}},true)},handleAjaxError:function(oL){var e=this;var oK=oL.location.protocol;if(oK==="file:"){return}if(!oL.XMLHttpRequest){return}var i=oL.XMLHttpRequest;var C=i.prototype.send;var T=function(oN){if(oN&&oN.currentTarget&&oN.currentTarget.status!==200){var oM=oN.target.responseURL;if(e.isFetch(e.category.AJAX)&&e.hostExit(oM)){e.sendError({title:oM,msg:JSON.stringify({response:oN.target.response,responseURL:oM,status:oN.target.status,statusText:oN.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 oM=this["onreadystatechange"];this["onreadystatechange"]=function(oN){if(this.readyState===4){T(oN)}oM&&oM.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(oK){if(oK.url){if(!e.isFetch(oK.category)){return}var T=oK.url||"";if(!e.hostExit(T)){return}delete oK.url}if(!navigator.onLine){return}e.collections.push(oK);e.checkJob(i)}},runJob:function(){if(this.collections.length===0){clearInterval(this.idleWork);this.idleWork=null;return}var oK=this.collections.slice(0,2);var C=ni(JSON.stringify({dataset:oK}));var T=new Date().getTime();if(window._BMapSecurityConfig&&window._BMapSecurityConfig["serviceHost"]){var i=K.apiIMG+"/blank.gif?product=jsapi&v="+ep()+"&l="+C+"&t="+T}else{var i=K.apiIMG+"/blank.gif?product=jsapi&v="+ep()+"&l="+C+"&ak="+hj+"&t="+T}if(this.sender){try{var oM=document.createElement("div");oM.style="width:0;height:0;visibility: hidden;opacity: 0;z-index:-999;background-image: url("+i+");";document.querySelector("BODY").appendChild(oM);setTimeout(function(){document.querySelector("BODY").removeChild(oM)})}catch(oL){}}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 oL=Object.keys(K);if(K&&oL.length>0){for(var oK in K){if(K[oK]&&(typeof K[oK]!=="function")){C[oK]=K[oK]}}}try{var oN=JSON.stringify(C);if(oN.length>2){return T+"|"+oN}else{return T}}catch(oM){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 oK=C.host+C.pathname;if(this.ignoreUrl.indexOf(oK)===-1&&this.hosts.indexOf(C.host)>-1){return true}return false}catch(T){return false}},isFetch:function(e){return this.config[e+"Error"]||false}};cv.fetchDebug=eq;var be={TYPE:"TypeError",REF:"ReferenceError",SYNTAX:"SyntaxError",RANGE:"RangeError",URI:"URIError",EVAL:"EvalError",NETWORK:"NetworkError",TIMEOUT:"TimeoutError",PROMISE:"UnhandledRejection",UNKNOWN:"Unknown"};var c8={TypeError:be.TYPE,ReferenceError:be.REF,SyntaxError:be.SYNTAX,RangeError:be.RANGE,URIError:be.URI,EvalError:be.EVAL};var hf=8*1024;var ic=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 ma={_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 oN=!!(window._BMapSecurityConfig&&window._BMapSecurityConfig["serviceHost"]);var oM=[K.staticHost,K.apiTestUrl,K.panoTilePath,K.stylePath,K.imgPath,K.apiIMG,K.mapHost];if(!oN){oM.push(K.apiHost)}oM.push(K.urlProtocol+"//" + window.location.host + "/bmap-api");if(K.tileDomain&&K.tileDomain.length){oM=oM.concat(K.tileDomain)}if(K.enTileDomain&&K.enTileDomain.length){oM=oM.concat(K.enTileDomain)}if(K.originTilePath&&K.originTilePath.length){oM=oM.concat(K.originTilePath)}var C=[];for(var T=0;T-1){var oN=/((?:https?:)?\/\/[^\s'"]+)/.exec(oQ);if(oN&&i._isMapUrl(oN[1])){oO=true}}}if(oO){var oP=oK&&oK.stack?oK.stack:JSON.stringify({resourceUrl:oM,rowNum:T,colNum:oL,msg:oQ});i._onError(oK,oQ,oP,false)}if(e&&c2(e)){e.apply(C,arguments)}};C.addEventListener("unhandledrejection",function(oL){var oO=oL.reason;var T=oO instanceof Error?(oO.stack||""):"";var oN=false;if(i._isMapStack(T)){oN=true}else{if(!T&&typeof oO==="string"){var oK=/((?:https?:)?\/\/[^\s'"]+)/.exec(oO);if(oK&&i._isMapUrl(oK[1])){oN=true}}}if(!oN){return}var oM=oO instanceof Error?(oO.message||""):String(oO);var oP=T||oM;i._onError(oO instanceof Error?oO:null,oM,oP,true)});C.addEventListener("error",function(oK){if(oK instanceof window.ErrorEvent){return}var oN=oK.target||oK.srcElement;if(!oN){return}var T=oN.src||oN.href;if(i._isMapUrl(T)){var oM="NetworkError: resource load failed";var oO=JSON.stringify({tagName:oN.tagName,url:T});var oL=new Error(oM);oL.name="NetworkError";i._onError(oL,oM,oO,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 oK=0;oKhf){T=T.slice(0,hf)}e._sendDetail(oK,{type:"num",ak:hj,title:C,ua:(typeof navigator!=="undefined"&&navigator.userAgent)||"",msg:T})})},_sendSla:function(oK,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",oK,null);try{e7.request(C,function(e){i&&i(e&&e.status===0?e.id:null)})}catch(T){i&&i(null)}},_sendDetail:function(C,oK){if(this._bot){return}if(typeof navigator!=="undefined"&&navigator.onLine===false){return}var i=this._buildUrl("/jsapi_monitor/detail",oK,C);try{e7.request(i,function(){})}catch(T){}},_buildUrl:function(oK,T,i){var oL=ni(JSON.stringify(T));var e="from=jsapi_"+ep()+"&sla="+encodeURIComponent(oL);if(i){e+="&id="+encodeURIComponent(i)}var C=(K.apiHost+"").replace(/\/+$/,"");return C+oK+"?"+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""}}};cv.slaDebug=ma;var kU={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(oK){return function(){oK.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(oM,oN,oK){if(window.navigator&&!navigator.onLine){return}oM=oM||"";oN=oN||"";oK=oK||"";var oL=oM+"-"+oN+"-"+oK;if(!e.counts[oL]){e.counts[oL]=0}e.counts[oL]++;e.values[oL]=[oM,oN,oK]}},_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 oP=Object.keys(this.records);var oO=oP[0];var T=this.records[oO]||{};var oN=T.value||[];var oK=T.count||1;var i=new Date().getTime();var C="logCbk"+Math.floor(Math.random()*10000000000);if(cv){cv[C]=function(e){delete cv[C]}}if(window._BMapSecurityConfig&&window._BMapSecurityConfig["serviceHost"]){var oM=this.url+"&bmapgl2=1&v="+ep()+"&device="+(c9()?this.device.NA:this.device.PC)+"&module="+(oN[0]||"")+"&func="+(oN[1]||"")+"&subfunc="+(oN[2]||"")+"&count="+oK+"&t="+i+"&callback="+h6+"."+C}else{var oM=this.url+"&ak="+hj+"&bmapgl2=1&v="+ep()+"&device="+(c9()?this.device.NA:this.device.PC)+"&module="+(oN[0]||"")+"&func="+(oN[1]||"")+"&subfunc="+(oN[2]||"")+"&count="+oK+"&t="+i+"&callback="+h6+"."+C}oM+=np()(oM);if(this.config.open){try{jW.load(oM);delete this.records[oO]}catch(oL){}}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={}}};kU.init(true);var d5={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 oL=Object.keys(this.records);var T=oL[0];var oM=this.records[T]||[];var C=new Date().getTime();var oK="logCbk"+Math.floor(Math.random()*10000000000);if(cv){cv[oK]=function(e){delete cv[oK]}}if(window._BMapSecurityConfig&&window._BMapSecurityConfig["serviceHost"]){var i=this.url+"&bmapgl2=1&v="+ep()+"&device="+(c9()?this.device.NA:this.device.PC)+"&module="+(oM[0]||"")+"&func="+(oM[1]||"")+"&subfunc="+(oM[2]||"")+"&count=1&t="+C+"&callback="+h6+"."+oK}else{var i=this.url+"&ak="+hj+"&bmapgl2=1&v="+ep()+"&device="+(c9()?this.device.NA:this.device.PC)+"&module="+(oM[0]||"")+"&func="+(oM[1]||"")+"&subfunc="+(oM[2]||"")+"&count=1&t="+C+"&callback="+h6+"."+oK}i+=np()(i);if(this.config.open){try{jW.load(i);delete this.records[T]}catch(oN){}}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 nT={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 eC(C,i,oK,e){var T=i?C.replace(/currentColor/g,i):C;T=T.replace(/]*>/i,function(oL){return oL.replace(/\s(?:width|height)\s*=\s*("[^"]*"|'[^']*')/gi,"").replace(/^>>2]>>>(24-(oX%4)*8))&255;oW[(C+oX)>>>2]|=oU<<(24-((C+oX)%4)*8)}}else{for(var oX=0;oX>>2]=oV[oX>>>2]}}this.sigBytes+=oY;return this},clamp:function(){var oU=this.words;var C=this.sigBytes;oU[C>>>2]&=4294967295<<(32-(C%4)*8);oU.length=oL.ceil(C/4)},clone:function(){var C=oQ.clone.call(this);C.words=this.words.slice(0);return C},random:function(oY){var oX=[];var oV=(function(o1){var o1=o1;var o0=987654321;var oZ=4294967295;return function(){o0=(36969*(o0&65535)+(o0>>16))&oZ;o1=(18000*(o1&65535)+(o1>>16))&oZ;var o2=((o0<<16)+o1)&oZ;o2/=4294967296;o2+=0.5;return o2*(oL.random()>0.5?1:-1)}});for(var oU=0,C;oU>>2]>>>(24-(C%4)*8))&255;oW.push((oY>>>4).toString(16));oW.push((oY&15).toString(16))}return oW.join("")},parse:function(oV){var C=oV.length;var oW=[];for(var oU=0;oU>>3]|=parseInt(oV.substr(oU,2),16)<<(24-(oU%8)*4)}return new oS.init(oW,C/2)}};var oK=oT.Latin1={stringify:function(oW){var oX=oW.words;var oV=oW.sigBytes;var C=[];for(var oU=0;oU>>2]>>>(24-(oU%4)*8))&255;C.push(String.fromCharCode(oY))}return C.join("")},parse:function(oV){var C=oV.length;var oW=[];for(var oU=0;oU>>2]|=(oV.charCodeAt(oU)&255)<<(24-(oU%4)*8)}return new oS.init(oW,C)}};var T=oT.Utf8={stringify:function(C){try{return decodeURIComponent(escape(oK.stringify(C)))}catch(oU){throw new Error("Malformed UTF-8 data")}},parse:function(C){return oK.parse(unescape(encodeURIComponent(C)))}};var oO=i.BufferedBlockAlgorithm=oQ.extend({reset:function(){this._data=new oS.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(o2){var oW=this._data;var o3=oW.words;var C=oW.sigBytes;var oZ=this.blockSize;var o1=oZ*4;var o0=C/o1;if(o2){o0=oL.ceil(o0)}else{o0=oL.max((o0|0)-this._minBufferSize,0)}var oY=o0*oZ;var oX=oL.min(oY*4,C);if(oY){for(var oV=0;oV>>7))^((oQ<<14)|(oQ>>>18))^(oQ>>>3);var oW=C[o0-2];var o9=((oW<<15)|(oW>>>17))^((oW<<13)|(oW>>>19))^(oW>>>10);C[o0]=pa+C[o0-7]+o9+C[o0-16]}var oX=(o4&o3)^(~o4&o2);var oP=(o8&o7)^(o8&o6)^(o7&o6);var oZ=((o8<<30)|(o8>>>2))^((o8<<19)|(o8>>>13))^((o8<<10)|(o8>>>22));var oY=((o4<<26)|(o4>>>6))^((o4<<21)|(o4>>>11))^((o4<<7)|(o4>>>25));var oU=o1+oY+oX+oN[o0]+C[o0];var oT=oZ+oP;o1=o2;o2=o3;o3=o4;o4=(o5+oU)|0;o5=o6;o6=o7;o7=o8;o8=(oU+oT)|0}oV[0]=(oV[0]+o8)|0;oV[1]=(oV[1]+o7)|0;oV[2]=(oV[2]+o6)|0;oV[3]=(oV[3]+o5)|0;oV[4]=(oV[4]+o4)|0;oV[5]=(oV[5]+o3)|0;oV[6]=(oV[6]+o2)|0;oV[7]=(oV[7]+o1)|0},_doFinalize:function(){var oR=this._data;var oS=oR.words;var oP=this._nDataBytes*8;var oQ=oR.sigBytes*8;oS[oQ>>>5]|=128<<(24-oQ%32);oS[(((oQ+64)>>>9)<<4)+14]=i.floor(oP/4294967296);oS[(((oQ+64)>>>9)<<4)+15]=oP;oR.sigBytes=oS.length*4;this._process();return this._hash},clone:function(){var oP=T.clone.call(this);oP._hash=this._hash.clone();return oP}});nY.SHA256=T._createHelper(oK);nY.HmacSHA256=T._createHmacHelper(oK)}(Math));dm.SHA256=nY.SHA256;dm.HmacSHA256=nY.HmacSHA256;var cz=(function(){try{return typeof BigInt!=="undefined"&&typeof BigInt("1")!=="undefined"}catch(i){return false}})();function bY(oL,oM){var oK=dm.SHA256(dm.enc.Utf8.parse(oL));var T=oK.toString(dm.enc.Hex);var e=[];for(var C=0;CoK){if(oN&C){i=(i*oL)%T}oN>>=C;if(oN>oK){oL=(oL*oL)%T}}return i}catch(oM){throw new Error("BigInt operation failed")}}function bt(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()}bt.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};bt.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};bt.prototype.normalize=function(){while(this.value.length>1&&this.value[this.value.length-1]===0){this.value.pop()}};bt.prototype.isZero=function(){return this.value.length===1&&this.value[0]===0};bt.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};bt.prototype.add=function(T){var C=[];var oO=0;var oL=Math.max(this.value.length,T.value.length);for(var oM=0;oM0){C.push(oO)}return new bt(C)};bt.prototype.subtract=function(T){var C=[];var oN=0;var oL=Math.max(this.value.length,T.value.length);for(var oM=0;oM=0){var e=new bt(T.value);while(true){var i=new bt(e.value);i.value.unshift(0);if(i.compare(C)>0){break}e=i}C=C.subtract(e)}return C};function eg(oL,oN,oK){oL=oL.mod(oK);var e=new bt(1);while(!oN.isZero()){if(oN.value[0]&1){e=e.multiply(oL).mod(oK)}var oM=0;for(var T=oN.value.length-1;T>=0;T--){var C=oN.value[T]|(oM<<8);oN.value[T]=C>>1;oM=C&1}oN.normalize();if(!oN.isZero()){oL=oL.multiply(oL).mod(oK)}}return e}function la(i){var e=i.toLowerCase().replace(/^0x/,"");if(!/^[0-9a-f]+$/.test(e)){throw new Error("invalid hex")}return new bt(e)}function hr(T,C,i,oL){if(!T||!C||!i||!oL){if(oL){oL(false)}return}if(cz){try{mq(T,C,i,oL)}catch(oK){bA(T,C,i,oL)}}else{bA(T,C,i,oL)}}function mq(C,i,e,T){bY(C,function(oR){try{var oK=BigInt(0);var oM=BigInt(256);for(var oN=0;oN<8;oN++){oK=(oK*oM+BigInt(oR[oN]))%e.n}var oO=nQ(i);var oP=BigInt(0);if(oO=e.n){T(false);return}var oL=nL(oO,e.e,e.n);T(oL===oK)}catch(oQ){bA(C,i,e,T)}})}function bA(C,i,e,T){bY(C,function(oR){try{var oK=new bt(0);var oM=new bt(256);for(var oN=0;oN<8;oN++){oK=oK.multiply(oM);var oQ=new bt(oR[oN]);oK=oK.add(oQ);oK=oK.mod(e.n)}var oO=la(i);if(oO.compare(new bt(0))<0||oO.compare(e.n)>=0){T(false);return}var oL=eg(oO,e.e,e.n);T(oL.compare(oK)===0)}catch(oP){T(false)}})}var gt;if(cz){gt={n:BigInt(9173503),e:BigInt(65537)}}else{gt={n:new bt(9173503),e:new bt(65537)}}if(window.B_BUSINESS_INFO){hr(window.B_BUSINESS_INFO["sign_content"],window.B_BUSINESS_INFO["signature"],gt,function(e){if(!e){var i=c0.popup_code;d5.sendMessage("sign_check","sign_error",i)}else{if(c0.business===0&&c0.unauth===1){dZ(jC,{from:"vtile"})}}})}var mL=(function(){var oW={};var oV="HIGH";var oP="FOCUS";var C={};var T;function i(oX){var o2=oX||[];for(var o3=0;o3')}else{var i='
';if(e&&e.config.autoSafeArea&&d4()){this._safeAreaContainer=cQ(this._map.container,i);this._safeAreaContainer.style.position="absolute";this._safeAreaContainer.style.bottom="env(safe-area-inset-bottom)";this._container=cQ(this._safeAreaContainer,i)}else{this._container=cQ(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 oL=this._container;var e=this._opts.offset.width;var oK=this._opts.offset.height;oL.style.left=oL.style.top=oL.style.right=oL.style.bottom="auto";switch(T){case BMAP_ANCHOR_TOP_LEFT:oL.style.top=oK+"px";oL.style.left=e+"px";break;case BMAP_ANCHOR_TOP_RIGHT:oL.style.top=oK+"px";oL.style.right=e+"px";break;case BMAP_ANCHOR_BOTTOM_LEFT:oL.style.bottom=oK+"px";oL.style.left=e+"px";break;case BMAP_ANCHOR_BOTTOM_RIGHT:oL.style.bottom=oK+"px";oL.style.right=e+"px";break;default:break}var i=["TL","TR","BL","BR"];hv.rc(this._container,"anchor"+i[C]);hv.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 mU(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 ix("onshow"))},hide:function(){if(this._visible===false){return}this._visible=false;if(this._container){this._container.style.display="none"}this.dispatchEvent(new ix("onhide"))},isPrintable:function(){return !!this._opts.printable},isVisible:function(){if(!this._container&&!this._map){return false}return !!this._visible},_asyncLoadCode:function(){var e=this;ki.load("control",function(){if(e._asyncDraw){e._asyncDraw()}})}});var gv={TOP_LEFT:0,TOP_RIGHT:1,BOTTOM_LEFT:2,BOTTOM_RIGHT:3};cv.ControlAnchor=gv;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 i0(e){if(typeof kU!=="undefined"&&kU.sendMessage){kU.sendMessage("CopyrightControl")}jM.call(this);e=e||{};this._opts={printable:false};hv.extend(this._opts,e);this._copyrightCollection=[];this.defaultAnchor=BMAP_ANCHOR_BOTTOM_LEFT;this.defaultOffset=new mU(5,2);this.setAnchor(e.anchor);this._canShow=true;this.sateMapStyle=false;this.blockInfoWindow=false;this._asyncLoadCode()}i0.inherits(jM,"CopyrightControl");hv.extend(i0.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 oM=e.minZoom;if(oM===-1||oMthis._map.getMaxZoom()){e.minZoom=this._map.getMinZoom()}if(e.mapType!==""&&!gA[e.mapType]){e.mapType=BMAP_NORMAL_MAP}}var oK=this.getCopyright(T.id);if(oK){for(var oL in e){oK[oL]=e[oL]}}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 kU!=="undefined"&&kU.sendMessage){kU.sendMessage("MapTypeControl")}jM.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 mU(10,10);this.setAnchor(i.anchor);this._opts=hv.extend(hv.extend(this._opts,{offset:this.defaultOffset,enableSwitch:true}),i);if(i.mapTypes instanceof Array){this._opts.mapTypes=i.mapTypes.slice(0)}var e=this;ki.load("control",function(){e._asyncDraw()})}G.inherits(jM,"MapTypeControl");hv.extend(G.prototype,{initialize:function(e){this._map=e;return this._container},showStreetLayer:function(e){this._map.showStreetLayer(e)}});function nc(e){if(typeof kU!=="undefined"&&kU.sendMessage){kU.sendMessage("ZoomControl")}jM.call(this);e=e||{};this._opts={};this._opts=hv.extend(this._opts,e);this._zoomInDisabled=false;this._zoomOutDisabled=false;this._zoomInTapped=false;this._zoomOutTapped=false;this.defaultAnchor=gv.BOTTOM_RIGHT;this.defaultOffset=new mU(15,20);this.setAnchor(e.anchor);this._asyncLoadCode()}nc.inherits(jM,"ZoomControl");hv.extend(nc.prototype,{initialize:function(e){this._map=e;return this._container}});function jn(e){if(typeof kU!=="undefined"&&kU.sendMessage){kU.sendMessage("LocationControl")}jM.call(this);e=e||{};this._opts={autoZoom:true,autoViewport:true,showAddressBar:!K.apiVersionIsGL(),enableAutoLocation:false,locationIcon:null,};this._opts=hv.extend(this._opts,e);this.defaultAnchor=gv.BOTTOM_LEFT;this.defaultOffset=new mU(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()}jn.inherits(jM,"LocationControl");hv.extend(jn.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||{};hv.extend(this._opts,e)}});function cB(e){if(typeof kU!=="undefined"&&kU.sendMessage){kU.sendMessage("LogoControl")}jM.call(this);e=e||{};this._opts={};this._opts=hv.extend(this._opts,e);this.defaultAnchor=gv.BOTTOM_LEFT;this.defaultOffset=new mU(5,15);if(c9()){this.defaultOffset=new mU(10,10)}this.setAnchor(e.anchor)}cB.inherits(jM,"LogoControl");hv.extend(cB.prototype,{initialize:function(i){this._map=i;var e=this._container=document.createElement("div");e.innerHTML='';i.getContainer().appendChild(e);return e}});function n9(e){if(typeof kU!=="undefined"&&kU.sendMessage){kU.sendMessage("OverviewMapControl")}jM.call(this);e=e||{};this._opts={printable:false,zoomInterval:4,isOpen:Boolean(e.isOpen),size:e.size||new mU(150,150),padding:4};this._opts=hv.extend(this._opts,e);this.defaultAnchor=gv.BOTTOM_RIGHT;this.defaultOffset=new mU(0,0);this.setSize(this._opts.size);this.setAnchor(this._opts.anchor);this._asyncLoadCode()}n9.inherits(jM,"OverviewMapControl");hv.extend(n9.prototype,{initialize:function(e){this._map=e;return this._container},remove:function(){jM.prototype.remove.call(this)},isOpen:function(){return this._opts.isOpen},changeView:function(){this._opts.isOpen=!this._opts.isOpen},setSize:function(e){if(!(e instanceof mU)){e=new mU(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 aW(e,i){this._map=e;this._indoorInfo=i;this._visible=true;this._adjustVisible=true;this._isMobile=c9();this._sizeConfig={FLOOR_BTN_HEIGHT:this._isMobile?35:26,SWITCH_ARROW_HEIGHT:this._isMobile?20:15};this._init()}aW.prototype._init=function(){this._render();this._bindDom();this._bind();this._adjustDisplayHeight();var e=new ix("onindoor_bar_show");e.uid=this._indoorInfo.uid;e.floors=this._indoorInfo.floors;this._map.dispatchEvent(e)};aW.prototype._render=function(){if(!this._indoorInfo){return}var oN=this._isMobile;var e=this._div=da("div");hv.ac(e,"floor-select-container");oN&&hv.ac(e,"mobile");oN&&hv.ac(e,"all-border-radius");var i=this._btnTop=da("button");hv.ac(i,"floor-switch-top");hv.ac(i,"top-border-radius");var oL=da("div");hv.ac(oL,"floor-switch-top-icon");i.appendChild(oL);var oK=this._btnBottom=da("button");var C=da("div");hv.ac(C,"floor-switch-bottom-icon");oK.appendChild(C);hv.ac(oK,"floor-switch-bottom");hv.ac(oK,"bottom-border-radius");var T=this._floorsContainer=da("div");hv.ac(T,"floors-container");T.appendChild(this._createFloorsDom());this._div.appendChild(i);this._div.appendChild(T);this._div.appendChild(oK);var oO=0;if(this._btnTop.style.display===""){oO=2*this._sizeConfig.SWITCH_ARROW_HEIGHT}this._div.style.height=parseInt(this._floorsContainer.style.height,10)+oO+"px";this._map.getContainer().appendChild(this._div);if(!oN){var oM=this;setTimeout(function(){oM._div.style.right="20px"},20)}};aW.prototype._createFloorsDom=function(){if(!this._indoorInfo){return}var C=this._ol=da("ol");var oL=this._indoorInfo.currentFloor;for(var oK=this._indoorInfo.floors.length-1;oK>=0;oK--){var oM=this._indoorInfo.floors[oK].floorName;var e=da("li");var T=da("button");hv.ac(T,"btn-select-floor");if(oK===oL){hv.ac(T,"selected")}T.setAttribute("data-floor",oK);T.innerHTML=oM;e.appendChild(T);C.appendChild(e)}return C};aW.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()};aW.prototype._bindDom=function(){var e=this;hv.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 ix("onindoor_bar_click");i.uid=e._indoorInfo.uid;e._map.dispatchEvent(i)}});hv.on(this._floorsContainer,"mouseover",function(C){var i=C.target;if(i.tagName.toLowerCase()==="button"){hv.ac(i,"hover")}});hv.on(this._floorsContainer,"mouseout",function(C){var i=C.target;if(i.tagName.toLowerCase()==="button"){hv.rc(i,"hover")}});hv.on(this._floorsContainer,"touchstart",function(C){var i=C.target;if(i.tagName.toLowerCase()==="button"){hv.ac(i,"onmousedown")}});hv.on(this._floorsContainer,"touchend",function(C){var i=C.target;if(i.tagName.toLowerCase()==="button"){hv.rc(i,"onmousedown")}});hv.on(this._btnTop,"mouseover",function(i){if(this._disable){return}hv.ac(this,"hover")});hv.on(this._btnTop,"mouseout",function(i){hv.rc(this,"hover")});hv.on(this._btnBottom,"mouseover",function(i){if(this._disable){return}hv.ac(this,"hover")});hv.on(this._btnBottom,"mouseout",function(i){hv.rc(this,"hover")});hv.on(this._btnTop,"touchstart",function(i){if(this.className.indexOf("disable")>-1){return}hv.ac(this,"onmousedown")});hv.on(this._btnTop,"touchend",function(i){hv.rc(this,"onmousedown")});hv.on(this._btnBottom,"touchstart",function(i){if(this.className.indexOf("disable")>-1){return}hv.ac(this,"onmousedown")});hv.on(this._btnBottom,"touchend",function(i){hv.rc(this,"onmousedown")});hv.on(this._btnTop,"click",function(i){e._setBarSliderTop(parseInt(e._ol.style.top,10)+26)});hv.on(this._btnBottom,"click",function(i){e._setBarSliderTop(parseInt(e._ol.style.top,10)-26)});hv.on(this._div,"mousemove",aF);hv.on(this._div,"wheel",kK);hv.on(this._div,"mousewheel",kK);this._map.addEventListener("resize",function(){e._adjustDisplayHeight()})};aW.prototype._adjustDisplayHeight=function(){if(!this._indoorInfo){return}var oL=this._map.getSize().height;var oM=this._sizeConfig.FLOOR_BTN_HEIGHT;var oN=oL-291-100;if(this._isMobile){oN=oL-12-108-this._map.config.bottomOffset}var e=this._indoorInfo.floors.length;var C=e*oM;var T=e;var oP=0;var oQ=this._floorsContainer.children[0];if(C>oN){this._showArrow=true;hv.rc(oQ.children[0].children[0],"top-border-radius");hv.rc(oQ.children[e-1].children[0],"bottom-border-radius")}else{this._showArrow=false;hv.ac(oQ.children[0].children[0],"top-border-radius");hv.ac(oQ.children[e-1].children[0],"bottom-border-radius")}while(C>oN){if(T===0){break}T--;oP=2*this._sizeConfig.SWITCH_ARROW_HEIGHT;C=T*oM+oP}this._currentDisplayHeight=C;if(T<3){this._setAdjustVisbile(false)}else{this._setAdjustVisbile(true)}this._floorsContainer.style.height=T*oM+"px";var oK=this._indoorInfo.currentFloor;var i=e-oK;var oO=oK-1;this._div.style.height=parseInt(this._floorsContainer.style.height,10)+oP+"px";var oR=-(e-(oK+Math.round(T/2)))*oM;this._setBarSliderTop(oR);if(T=i*C){T=e-i*C;hv.ac(this._btnBottom,"disable");hv.rc(this._btnBottom,"hover");this._btnBottom._disable=true}else{hv.rc(this._btnBottom,"disable");this._btnBottom._disable=false}if(T>=0){T=0;hv.ac(this._btnTop,"disable");hv.rc(this._btnTop,"hover");this._btnTop._disable=true}else{hv.rc(this._btnTop,"disable");this._btnTop._disable=false}this._ol.style.top=T+"px"};aW.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"}};aW.prototype._bind=function(){var i=this._map;var e=this;i.on("indoor_status_changed",function(oN){if(e._visible===false){return}var C=e._ol;var oL=oN.uid;if(!oL){return}var oM=oN.floor;for(var oK=0;oK=li.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()}hv.extend(mv.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=da("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=da("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(){mj(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 ix("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 ix("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 ix("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 eB(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=ja()>=li.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()}hv.extend(eB.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=da("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 ix("ontiltmsdown"));e._tiltAni=new ij({duration:9999999,render:function(oK){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 ix("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 oK="-"+(110+i+T+e-this._diffBgPosition)+"px "+(1+this._diffBgPosition)+"px";this._div&&(this._div.style.backgroundPosition=oK);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 kH(i){eX.call(this);this._opts={container:null,cursor:"default",marker:true};this._opts=hv.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;ki.load("menu",function(){e._draw()})}kH.inherits(eX,"ContextMenu");hv.extend(kH.prototype,{initialize:function(i,e){this._map=i;this._overlay=e||null},remove:function(){this._map=this._overlay=null},addItem:function(oK,e){if(!oK||oK._type!="menuitem"||oK._text==""||oK._width<=0){return}for(var T=0,C=this._items.length;Tthis._items.length-1){e=-1}oK._insertIndex=e;if(e===-1){this._items.push(oK);this._rItems.push(oK)}else{this._items.splice(e,0,oK);this._rItems.splice(e,0,oK)}},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 lx(C,T,i){if(!C||!T||typeof T!="function"){return}eX.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;ki.load("menu",function(){e._draw()})}lx.inherits(eX,"MenuItem");hv.extend(lx.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 lz(e,i){this.setSouthWest(e);this.setNorthEast(i)}hv.extend(lz.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.latfA.HALF_SIZE){e-=fA.HALF_SIZE*2}return new d9(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 oK=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 lz(new d9(oK,T),new d9(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 d9(0,0)}var C;var oK;C=new d9(Math.abs(e.lng),Math.abs(e.lat));for(var T=0;T=this.MCBAND[T]){oK=this.MC2LL[T];break}}var oL=this.convertor(e,oK);return new d1(oL.lat,oL.lng)},convertLL2MC:function(oM){if(!oM){return new d9(0,0)}var oO=oM.lat;var T=oM.lng;T=this.getLoop(oM.lng,-180,180);oO=dA(oO,-85,85);var oL;for(var oK=0;oK=this.LLBAND[oK]){oL=this.LL2MC[oK];break}}if(!oL){for(oK=0;oK1){oK=1}if(oK<-1){oK=-1}return this.EARTHRADIUS*Math.acos(oK)},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,oK,C,i){if(i!==undefined){i.minX=e;i.maxX=T;i.minY=oK;i.maxY=C;return i}else{return{minX:e,maxX:T,minY:oK,maxY:C}}},fromEPSG4326:function(C,oO,oM){var oK=C.length;var oL=oM>1?oM:2;var e=oO;if(e===undefined){if(oL>2){e=C.slice()}else{e=new Array(oK)}}for(var T=0;Tthis.MAX_SAFE_Y){oN=this.MAX_SAFE_Y}else{if(oN<-this.MAX_SAFE_Y){oN=-this.MAX_SAFE_Y}}e[T+1]=oN}return e},toEPSG4326:function(C,oN,oM){var oK=C.length;var oL=oM>1?oM:2;var e=oN;if(e===undefined){if(oL>2){e=C.slice()}else{e=new Array(oK)}}for(var T=0;T90){i=90}}while(e<-180){e+=360}while(e>180){e-=360}e=e||0;i=i||0;d9.call(this,e,i)}d1.inherits(d9,"LatLng");hv.extend(d1.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 el(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 d1(e.lat,e.lng);this._ne=new d1(i.lat,i.lng);this._swLng=e.lng;this._swLat=e.lat;this._neLng=i.lng;this._neLat=i.lat}}hv.extend(el.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 oK=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 d1(T,oK);this._ne=new d1(e,i);this._swLng=oK;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 d1(0,0)}if(!this._ne){this._ne=new d1(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=cQ(this._map.container,this._html);hv.on(e,"mouseup",function(C){if(C.button==2){kK(C)}});hv.on(e,"contextmenu",kK);e.style.display="none"},getDrawPoint:function(T,oM,oK){T=window.event||T;var i=T.offsetX||T.layerX||0;var oL=parseInt(T.offsetY)||parseInt(T.layerY)||0;var C=T.target||T.srcElement;if(C!=aG.getDom(this._map)&&oM==true){while(C&&C!=this._map.container){if(!(C.clientWidth==0&&C.clientHeight==0&&C.offsetParent&&C.offsetParent.nodeName.toLowerCase()=="td")){i+=C.offsetLeft;oL+=C.offsetTop}C=C.offsetParent}}if(C!=aG.getDom(this._map)&&C!=this._map.container){return}if(typeof i==="undefined"||typeof oL==="undefined"){return}if(isNaN(i)||isNaN(oL)){return}if(oK){i=i+oK.x;oL=oL+oK.y}return this._map.pixelToPointIn(new hV(i,oL))},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 bw(){this._type="overlay"}bw.inherits(hv.BaseClass,"Overlay");bw.getZIndex=function(i,e){i=i*1;if(!i){return 0}if(e){i=m8.convertMC2LL(new d9(0,i)).lat}return(i*-100000)<<1};hv.extend(bw.prototype,{_i:function(oM){this._map=oM;if(!this.domElement&&c2(this.initialize)){this.domElement=this.initialize(oM);if(this.domElement){this.domElement.style.WebkitUserSelect="none";if(this.enableDraggingMap!==undefined&&!this.enableDraggingMap&&!(this instanceof D)){var oL=["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;oM--){if(T._customOverlays[oM].enableMassClear!==false){this.removeOverlay(T._customOverlays[oM]);T._customOverlays.splice(oM,1)}}});oK.addEventListener("infowindowopen",function(oN){var oM=this.infoWindow;if(oM){hv.hide(oM.popDom);hv.hide(oM.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(oO){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 oN=0;oN1){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 lz();this.points=[];this.greatCirclePoints=[];this._parseCache=[];this._holesCache=[];this._parseCacheGL=[];this._parseCacheGLRaw=[];this._areaCacheGL=[];this._strokeStyleInfoForGL=[[]];this._fillStyleInfoForGL="";this.vertexMarkers=[];this._temp={}}mk.JOININDEX={miter:0,round:1,bevel:2};mk.CAPINDEX={round:0,butt:1,square:2};mk.inherits(g2,"Graph");mk.getGraphPoints=function(i){var e=[];if(!i||i.length===0){return e}if(typeof i==="string"){var C=i.split(";");hv.each(C,function(oK){var T=oK.split(",");e.push(new d9(T[0],T[1]))})}if(i.constructor===Array&&i.length>0){e=i}return e};mk.parseTolerance={0:[0.09,0.005,0.0001,0.00001],1:[9000,500,20,1]};hv.extend(mk.prototype,{initialize:function(e){this.map=e;return null},draw:function(){},setPoints:function(e){this._clearCache();this.points=mk.getGraphPoints(e).slice(0);this._calcBounds()},setPathIn:function(e){this.setPoints(e)},_calcBounds:function(){if(!this.points){return}var e=this;e._bounds=new lz();if(!this.hasMultipleParts){hv.each(this.points,function(i){e._bounds.extend(i)})}else{hv.each(this.points,function(i){hv.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 d9(e.lng,e.lat);this._calcBounds()},setPositionAt:function(i,e){if(!e||!this.points[i]){return}var C=m8.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 lz(m8.convertMC2LL(e.getSouthWest()),m8.convertMC2LL(e.getNorthEast()));i.setMinMax();return i},remove:function(){if(this.map){this.map.removeEventListener("onmousemove",this._graphMouseEvent);this.map.removeEventListener("onclick",this._graphClickEvent)}g2.prototype.remove.call(this);this._clearCache();var e=new ix("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;ki.load("poly",function(){e.addVertexs()},true)},disableEditing:function(){this._config.enableEditing=false;var e=this;ki.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){oK=this.greatCirclePoints}var oL=this.getParseTolerance(e.getZoom(),1);if(!this.hasMultipleParts){var oO=fS(oK,oL);oO=mo(oO,oL)}else{var oO=[];for(var C=0;CoK.maxY){C.bottom=4;C.all+=C.bottom}}if(e>oK.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 fH.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 fH.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,oK,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,oK==null?null:oK.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){oP*=Math.sqrt(o4);oO*=Math.sqrt(o4)}var oW=(oR==oN?-1:1)*Math.sqrt(((Math.pow(oP,2)*Math.pow(oO,2))-(Math.pow(oP,2)*Math.pow(pc.y,2))-(Math.pow(oO,2)*Math.pow(pc.x,2)))/(Math.pow(oP,2)*Math.pow(pc.y,2)+Math.pow(oO,2)*Math.pow(pc.x,2)));if(isNaN(oW)){oW=0}var oV=new fH.Point(oW*oP*pc.y/oO,oW*-oO*pc.x/oP);var oK=new fH.Point((o7.x+oS.x)/2+Math.cos(C)*oV.x-Math.sin(C)*oV.y,(o7.y+oS.y)/2+Math.sin(C)*oV.x+Math.cos(C)*oV.y);var o2=function(pd){return Math.sqrt(Math.pow(pd[0],2)+Math.pow(pd[1],2))};var oY=function(pe,pd){return(pe[0]*pd[0]+pe[1]*pd[1])/(o2(pe)*o2(pd))};var pa=function(pe,pd){return(pe[0]*pd[1]=1){o8=0}var o1=1-oN?1:-1;var o6=pb+o1*(o8/2);var i=new fH.Point(oK.x+oP*Math.cos(o6),oK.y+oO*Math.sin(o6));o5.addMarkerAngle(i,o6-o1*Math.PI/2);o5.addMarkerAngle(oS,o6-o1*Math.PI);oQ.addPoint(oS.x,oS.y);if(o3!=null){var oY=oP>oO?oP:oO;var oZ=oP>oO?1:oP/oO;var oX=oP>oO?oO/oP:1;o3.translate(oK.x,oK.y);o3.rotate(C);o3.scale(oZ,oX);o3.arc(0,0,oY,pb,pb+o8,1-oN);o3.scale(1/oZ,1/oX);o3.rotate(-C);o3.translate(-oK.x,-oK.y)}}break;case"Z":case"z":if(o3!=null){o3.closePath()}o5.current=o5.start}}return oQ};this.getMarkers=function(){var T=this.PathParser.getMarkerPoints();var oL=this.PathParser.getMarkerAngles();var oK=[];for(var C=0;Cthis.x2){this.x2=oK}}if(oL!=null){if(isNaN(this.y1)||isNaN(this.y2)){this.y1=oL;this.y2=oL}if(oLthis.y2){this.y2=oL}}};this.addX=function(oK){this.addPoint(oK,null)};this.addY=function(oK){this.addPoint(null,oK)};this.addBoundingBox=function(oK){this.addPoint(oK.x1,oK.y1);this.addPoint(oK.x2,oK.y2)};this.addQuadraticCurve=function(oP,oO,oL,oK,oR,oQ){var oN=oP+2/3*(oL-oP);var oM=oO+2/3*(oK-oO);var oT=oN+1/3*(oR-oP);var oS=oM+1/3*(oQ-oO);this.addBezierCurve(oP,oO,oN,oT,oM,oS,oR,oQ)};this.addBezierCurve=function(oX,oW,oO,oM,oT,oR,oZ,oY){var oP=[oX,oW],oN=[oO,oM],oL=[oT,oR],oK=[oZ,oY];this.addPoint(oP[0],oP[1]);this.addPoint(oK[0],oK[1]);for(nw=0;nw<=1;nw++){var o0=function(o4){return Math.pow(1-o4,3)*oP[nw]+3*Math.pow(1-o4,2)*o4*oN[nw]+3*(1-o4)*Math.pow(o4,2)*oL[nw]+Math.pow(o4,3)*oK[nw]};var o2=6*oP[nw]-12*oN[nw]+6*oL[nw];var o3=-3*oP[nw]+9*oN[nw]-9*oL[nw]+3*oK[nw];var o1=3*oN[nw]-3*oP[nw];if(o3==0){if(o2==0){continue}var oV=-o1/o2;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)}}};hS.prototype._refresh=function(e){e.textureCoord=e.textureCoordGLMap=null;var i=new ix("onstatus_change");i.overlay=e;i.action="setIcon";i.imageUrlChanged=true;setTimeout(function(){e.fire(i)},100)};hS.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}};hS.prototype.getCurrentImageUrl=function(){return this.id};hS.prototype.getRenderData=function(){this._renderData=this.generateRenderData();return this._renderData};hS.prototype.setAnchor=function(e){if(e instanceof mU){this.anchor=e;this.offset=e}};hS.prototype.toString=function(){return"Symbol"};var ie={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 dq={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 fK(i,e){hS.call(this);e=e||{};this.style={anchor:e.anchor||new mU(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 mU(0,0);this.anchor=new mU(0,0);this._rawPath=i;this._buildPath(true)}fK.inherits(hS,"SVGSymbol");fK.generateKey=function(T,i){if(!T){return null}if(parseInt(T)){T=parseInt(T)}if(typeof T==="number"){if(!ie[T]&&![0,1,2,0,4][T]){return null}}var e={anchor:i.anchor||new mU(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};hv.extend(fK.prototype,{_buildPath:function(oU){var oO=this;var oQ=oO._rawPath;if(parseInt(oQ)){oQ=parseInt(oQ)}if(ie[oQ]){oQ=ie[oQ]}oO.id=fK.generateKey(oQ,oO.style);if(!oO.id){return}this._originOffset=new mU(0,0);this._innerOffset=null;this._rotationAngle=0;switch(oQ){case dq.BMap_Symbol_SHAPE_CIRCLE:var oR=oO._calSize(2),oP=oR,oZ=oO.style.scale,oK=oO._anchor;this.size=new mU(oR,oP);this.anchor=new mU(oR/2+oK.width*oZ,oP/2+oK.height*oZ);oO.path=dq.BMap_Symbol_SHAPE_CIRCLE;break;case dq.BMap_Symbol_SHAPE_RECTANGLE:var oR=oO._calSize(4),oP=oO._calSize(2),oK=oO._anchor,oW=oO.style.strokeWeight!==undefined?oO.style.strokeWeight:oO.style.scale,oZ=oO.style.scale;this.size=new mU(oR,oP);this._originOffset=new mU(Math.floor(-oW/2),Math.floor(-oW/2));this.anchor=new mU(oR/2+oK.width*oZ,oP/2+oK.height*oZ);oO.path=dq.BMap_Symbol_SHAPE_RECTANGLE;break;case dq.BMap_Symbol_SHAPE_STAR:var oR=oO._calSize(20),oP=oR,oK=oO._anchor,oZ=oO.style.scale;this.size=new mU(oR,oP);this.anchor=new mU(oR/2+oK.width*oZ,oP/2+oK.height*oZ);oO.path=dq.BMap_Symbol_SHAPE_STAR;break;default:var oQ=new fH(oQ),T=oQ.bounds(),oT=oO.style.rotation*Math.PI/180,oW=oO.style.strokeWeight!==undefined?oO.style.strokeWeight:oO.style.scale,oZ=oO.style.scale,oK=oO._anchor;var oY=new mU(Math.floor(T.x1*oZ-oW/2),Math.floor(T.y1*oZ-oW/2)),e={topleft:new hV(Math.floor(T.x1*oZ-oW/2)-oZ*oK.width,Math.floor(T.y1*oZ-oW/2)-oZ*oK.height),bottomleft:new hV(Math.floor(T.x1*oZ-oW/2)-oZ*oK.width,Math.ceil(T.y2*oZ-oW/2)-oZ*oK.height),topright:new hV(Math.ceil(T.x2*oZ+oW/2)-oZ*oK.width,Math.floor(T.y1*oZ-oW/2)-oZ*oK.height),bottomright:new hV(Math.ceil(T.x2*oZ+oW/2)-oZ*oK.width,Math.ceil(T.y2*oZ+oW/2)-oZ*oK.height)},i={},oX=[],oN=[];var oV=e.topleft.x===0?0:Math.atan(e.topleft.y/e.topleft.x),C=oV+oT;for(var oS in e){var oM=Math.cos(oT)*e[oS].x-Math.sin(oT)*e[oS].y,oL=Math.sin(oT)*e[oS].x+Math.cos(oT)*e[oS].y;i[oS]=new hV(oM,oL);oX.push(oM);oN.push(oL)}xmax=Math.max.apply(Math,oX),ymax=Math.max.apply(Math,oN),xmin=Math.min.apply(Math,oX),ymin=Math.min.apply(Math,oN);this.size=new mU(Math.ceil(xmax-xmin),Math.ceil(ymax-ymin));this.anchor=new mU(-xmin,-ymin);this._originOffset=new mU(xmin-i.topleft.x,ymin-i.topleft.y);this._innerOffset=new hV(oY.width,oY.height);this._rotationAngle=oT;oO.path=oQ;break}this.imageSize=new mU(this.size.width,this.size.height);this.offset=this.anchor;if(oU){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 oQ=this,T=this.style.scale,oR,oS=this.size;var oO=(C&&C.config&&C.config.ratio)||1;if(this.context){oR=this.context;if(this.context.canvas.width/oO!==this.size.width||this.context.canvas.height/oO!==this.size.height){this.context.canvas.width=this.size.width*oO;this.context.canvas.height=this.size.height*oO}oR.clearRect(0,0,this.size.width*oO,this.size.height*oO);oR.fillStyle=k0.convert2rgba(oQ.style.fillColor,oQ.style.fillOpacity);oR.strokeStyle=k0.convert2rgba(oQ.style.strokeColor,oQ.style.strokeOpacity);oR.save()}else{return false}oR.scale(oO,oO);oR.lineCap="round";oR.lineJoin="round";oR.lineWidth=oQ.style.strokeWeight||T;if(oQ._originOffset){oR.translate(-oQ._originOffset.width,-oQ._originOffset.height)}if(oQ._rotationAngle){oR.rotate(oQ._rotationAngle)}if(oQ._innerOffset){oR.translate(-oQ._innerOffset.x,-oQ._innerOffset.y)}switch(oQ.path){case dq.BMap_Symbol_SHAPE_CIRCLE:oR.arc(oS.width/2,oS.height/2,T,0,2*Math.PI);break;case dq.BMap_Symbol_SHAPE_RECTANGLE:oR.rect(0,0,4*T,2*T);break;case dq.BMap_Symbol_SHAPE_STAR:oR.beginPath();var oL=oS.width/2,oN=T*10;var oK=(2*Math.PI)/10;for(var oM=11;oM!=0;oM--){var e=oN*(oM%2+1)/2;var oP=oK*oM;oR.lineTo((e*Math.sin(oP))+oL,(e*Math.cos(oP))+oL)}oR.closePath();break;default:oR.lineWidth=oR.lineWidth/T;oR.scale(T,T);oQ.path.draw(oR)}oR.fill();oR.stroke();oR.restore();this.data=oR.getImageData(0,0,this.size.width*oO,this.size.height*oO);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 mU){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=k0.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()}});cv.SymbolShapeType=dq;(function(){for(var e in dq){if(dq.hasOwnProperty(e)){window[e]=dq[e]}}})();function nF(oL,T,C){if(!oL||!T){return}this.imageUrl=null;this.imageDom=null;if(typeof oL==="string"){this.imageUrl=oL}else{this.imageDom=oL;if(!this.imageDom.id){this.imageDom.id=cv.getGUID("icon_dom_")}}this.size=T;var oK=new mU(Math.floor(T.width/2),Math.floor(T.height/2));var i={offset:oK,imageOffset:new mU(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)}nF.prototype.setImageUrl=function(e){if(!e){return}this.imageUrl=e;this._renderData=null};nF.prototype.getCurrentImageUrl=function(){if(window.devicePixelRatio>1&&this.srcSetObject["2x"]){return this.srcSetObject["2x"]}return this.imageUrl};nF.prototype.setPrintImageUrl=function(e){if(!e){return}this.printImageUrl=e};nF.prototype.setSize=function(e){if(!e){return}this.size=new mU(e.width,e.height);this._renderData=null};nF.prototype.setOffset=function(e){if(!e){return}this.anchor=this.offset=new mU(e.width,e.height);this._renderData=null};nF.prototype.setAnchor=function(e){this.setOffset(e)};nF.prototype.setImageOffset=function(e){if(!e){return}this.imageOffset=new mU(e.width,e.height);this._renderData=null};nF.prototype.setInfoWindowOffset=function(e){if(!e){return}this.infoWindowOffset=new mU(e.width,e.height)};nF.prototype.setInfoWindowAnchor=function(e){this.setInfoWindowOffset(e)};nF.prototype.setImageSize=function(e){if(!e){return}this.imageSize=new mU(e.width,e.height)};nF.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};nF.prototype.toString=function(){return"Icon"};nF.prototype.generateRenderData=function(oL){var C=this.offset;var e=this.size;var oN=this.imageOffset;var oM=[];oM.push(-C.width,C.height-e.height,0);oM.push(e.width-C.width,C.height-e.height,0);oM.push(e.width-C.width,C.height,0);oM.push(-C.width,C.height-e.height,0);oM.push(e.width-C.width,C.height,0);oM.push(-C.width,C.height,0);if(oL!==0){for(var oK=0;oK730){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;ki.load("infowindow",function(){e._draw()})}f9.inherits(hv.BaseClass,"InfoWindow");hv.extend(f9.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(){hv.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 m8.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 m0(m8.convertMC2LL(e),this.coordType)},getOffset:function(){return this._config.offset},dispose:function(){hv.BaseClass.prototype.decontrol.call(this)},toString:function(){return"InfoWindow"}});li.prototype.openInfoWindow=function(oL,e,T){if(!K.apiVersionIsGL()){return this._openInfoWindow30(oL,e)}var oK=e;var C=(T&&T.coordType)||cv.coordType;oK=iM(oK,C);oL.latLng=new d1(oK.lat,oK.lng);var i=m8.convertLL2MC(oK);this.openInfoWindowIn(oL,i)};li.prototype._openInfoWindow30=function(T,e){if(!(T instanceof f9)||!e){return}T.latLng=new d1(e.lat,e.lng);var i=this.temp;if(!i.marker){var C=new nF(K.imgPath+"blank.gif",{width:1,height:1});i.marker=new og(e,{icon:C,offset:new mU(0,0),clickable:false});i.marker._fromMap=1}else{i.marker.setPoint(e)}this.addOverlay(i.marker);i.marker.show();i.marker.openInfoWindow(T)};li.prototype.closeInfoWindow=function(){var e=this.temp.infoWin||this.temp._infoWin;if(e&&e.overlay){e.overlay.closeInfoWindow()}};li.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 nF(K.imgPath+"blank.gif",{width:1,height:1});i.marker=new og(e,{icon:C,width:1,height:1,offset:new mU(0,0),infoWindowOffset:new mU(0,0),clickable:false});i.marker._fromMap=1}else{i.marker.setPoint(e)}this.addOverlay(i.marker);i.marker.show();i.marker.openInfoWindow(T)};g2.prototype.openInfoWindow=function(e){if(this.map){this.map.closeInfoWindow();e._visible=true;this.map.temp._infoWin=e;e.overlay=this;hv.BaseClass.call(e,e.hashCode)}};g2.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 b3(C,i){g2.call(this);this.content=C;this.map=null;this.domElement=null;var T=fq();this._config={width:0,offset:new mU(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||cv.coordType;this.setConfig(i);if(this._config.width<0){this._config.width=0}this.point=this._config.point;var e=this;ki.load("marker",function(){e._draw()})}b3.inherits(g2,"Label");hv.extend(b3.prototype,{setPoint:function(e){if(e&&e.toString()==="Point"&&!this.getMarker()){this.point=this._config.point=iM(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 mU(e.width,e.height)},getOffset:function(){return this._config.offset},setStyle:function(e){e=e||{};this._config.styles=hv.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 m8.convertLL2MC(e)}return e},setPositionIn:function(e){if(!e){return}if(!K.apiVersionIsGL()){this.setPoint(m8.convertMC2LL(e))}else{this.point=this._config.point=new d9(e.lng,e.lat)}},});function ls(T,C){var oK={};var e=(C&&C.coordType)||cv.coordType;for(var i in C){if(C.hasOwnProperty(i)){if(i==="position"){if(!K.apiVersionIsGL()){oK.point=iM(C[i],e)}else{oK.point=m8.convertLL2MC(iM(C[i],e))}this.latLng=iM(C[i],e)}else{oK[i]=C[i]}}}b3.call(this,T,oK)}ls.inherits(b3,"LabelOut");hv.extend(ls.prototype,{toString:function(){return"Label"},setPosition:function(e){this.latLng=new d1(e.lat,e.lng);var i;if(!K.apiVersionIsGL()){i=e}else{i=m8.convertLL2MC(e)}this.setPoint(i)},getPosition:function(){return m0(this.latLng,this.coordType)}});function cx(){}hv.extend(cx,{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,oK){if(!this.isGeoJSON(e)){return null}var C=h7.normalize(e);if(!C.length){return null}if(C.length>1){this._warn("GeoJSON 含多个要素,仅使用第一个;如需全部渲染请使用 GeoJSONLayer 或可视化图层")}var i=C[0];var T=null;if(oK==="point"){T=this._pickPoint(i)}else{if(oK==="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=h7.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=h7.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 d9(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 ix("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 d1(e.lat,e.lng);var i=m8.convertLL2MC(e);this.setPositionIn(i)},getPosition:function(){var e=this.getPositionIn();return m0(m8.convertMC2LL(e),this.coordType)}});function iJ(C,e){mk.call(this,e);this._normalizedBounds=new lz();this.setPoints(C);this._addlog(e);var i=this;ki.load("poly",function(){i._draw()})}iJ.inherits(mk,"Polyline");hv.extend(iJ.prototype,{_addlog:function(e){var i=1;var C="normal";if(e&&e.strokeTexture){i=2;C="texture"}kU.sendMessage("Polyline","bindtype",C)},getBoundsIn:function(e){if(!e){this._bounds.setMinMax();return this._bounds}this._normalizedBounds.setMinMax();return this._normalizedBounds},setPoints:function(oM){this._clearCache();this.points=mk.getGraphPoints(oM).slice(0);if(this._config.geodesic===true){this.greatCirclePoints.length=0;for(var oK=0;oK15437726){if(oL.lng0){hv.each(e.greatCirclePoints,function(i){e._bounds.extend(i)})}else{hv.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<-li.WORLD_SIZE_MC_HALF||e._normalizedBounds.ne.lng>li.WORLD_SIZE_MC_HALF){e._normalizedBounds.sw.lng=-li.WORLD_SIZE_MC_HALF;e._normalizedBounds.ne.lng=li.WORLD_SIZE_MC_HALF}},calcGreatCirclePoints:function(T,C){var oL=T.latLng;var oK=C.latLng;if(oL.equalsEpsilon(oK,0.00001)){return}var e=m8.getDistance(mn(oL.lng),mn(oL.lat),mn(oK.lng),mn(oK.lat));if(e<250000){return}var oP=Math.round(e/150000);var oT=this.calcAngularDistance(oL,oK);this.greatCirclePoints.push(T);var oS=oL.lng;var oR=T;for(var oM=0;oM30037726){if(oQ.lng30037726){if(C.lng0){hv.each(e.greatCirclePoints,function(i){e._bounds.extend(i)})}else{hv.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<-li.WORLD_SIZE_MC_HALF||e._normalizedBounds.ne.lng>li.WORLD_SIZE_MC_HALF){e._normalizedBounds.sw.lng=-li.WORLD_SIZE_MC_HALF;e._normalizedBounds.ne.lng=li.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,oL){var C=[];for(var e=0;e0){hv.each(e.greatCirclePoints,function(i){e._bounds.extend(i)})}else{hv.each(e.points,function(i){hv.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<-li.WORLD_SIZE_MC_HALF||e._normalizedBounds.ne.lng>li.WORLD_SIZE_MC_HALF){e._normalizedBounds.sw.lng=-li.WORLD_SIZE_MC_HALF;e._normalizedBounds.ne.lng=li.WORLD_SIZE_MC_HALF}}});function kC(C,e){mk.call(this,e);e=e||{};this.coordType=this.coordType||e.coordType||cv.coordType;if(typeof e.fillOpacity==="number"){this._config.fillOpacity=e.fillOpacity}else{this._config.fillOpacity=0.6}dA(this._config.fillOpacity,0,1);if(e.fillColor===""){this._config.fillColor=""}else{if(e.fillColor){this._config.fillColor=e.fillColor}else{this._config.fillColor=fq().fillColor}}this._parseFillCacheWebGL=[];this.setPoints(C,e);var i=this;ki.load("poly",function(){i._draw()})}kC.inherits(mk,"Polygon");hv.extend(kC.prototype,{setPoints:function(oL){var T=[];if(typeof oL==="string"||oL.length===1||oL[0] instanceof d9||oL[0] instanceof d1||this instanceof ka||oL.length===0){if(oL.length===1){oL=oL[0]}var e=this._processSinglePointArray(oL);this._userPoints=e.userPoints;T=e.innerPoints;this.hasMultipleParts=false}else{this._userPoints=[];for(var oK=0;oK1&&!innerPoints[0].equals(innerPoints[innerPoints.length-1])){innerPoints.push(new d9(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 d9(e.lng,e.lat);this.points[i][C]=new d9(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 d9(e.lng,e.lat)}}else{this._userPoints[C]=new d9(e.lng,e.lat);this.points[C]=new d9(e.lng,e.lat);if(C===0&&!this.points[0].equals(this.points[this.points.length-1])){this.points[this.points.length-1]=new d9(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 oK=m8.convertLL2MC(e);this.setPointAt(C,oK,i)},getPoints:function(){var e=this._userPoints;if(e.length===0){e=this.points}return e},getPathIn:function(){return this.getPoints()}});function mw(C,e){this.coordType=(e&&e.coordType)||cv.coordType;if(!C||C.length===0){return}var i=this.setPath(C,true);kC.call(this,i,e)}mw.inherits(kC,"PolygonOut");hv.extend(mw.prototype,{toString:function(){return"Polygon"},toGeoJSON:function(){var oK="Polygon";var oL=[];var oN=this.getPath();if(this.hasMultipleParts){oK="Multi"+oK;for(var T=0;T1&&!innerPoints[0].equals(innerPoints[innerPoints.length-1])){innerPoints.push(new d9(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 d9(e.lng,e.lat);this.points[i]=new d9(e.lng,e.lat);if(i===0&&!this.points[0].equals(this.points[this.points.length-1])){this.points[this.points.length-1]=new d9(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 ix("onlineupdate");i.overlay=this;this.dispatchEvent(i)},getAltitude:function(){return this._config.altitude}});function cm(oN,oL,oO){if(!oN||oN.length===0){return}this.userPath=oN;var e=[];if(typeof oN==="string"||oN[0] instanceof d9||oN[0] instanceof d1){var oP=this._processSinglePointArray(oN);for(var oK=0;oK1||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,oK){if(oK){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 oO=this.maskOverlayPixels;var oL=oO[1][0]-oO[0][0];var oK=oO[1][1]-oO[0][1];var C=Math.floor((T[0][0]-oO[0][0])/oL*this.imageMaskObject.width);var i=Math.floor((-T[0][1]+oO[1][1])/oK*this.imageMaskObject.height);var oN=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 oM=this.imageMaskObject.data.data;if(oN+3>oM.length){return false}if(oM[oN+3]>0){if(this._config.maskData>-1&&this._config.maskData!==oM[oN]){return false}return true}return false},doOnceDraw:function(){var e=new ix("onlineupdate");e.overlay=this;this.dispatchEvent(e)},destroy:function(){this.points=[];this.imageMaskObject=null}});function iQ(T,oQ){if(!T){return}oQ=oQ||{};var oL=[];if(oQ.sysType==="fixed"){oL=T}else{if(T instanceof lz){var oN=Math.min(T.sw.lng,T.ne.lng);var oK=Math.max(T.sw.lng,T.ne.lng);var oM=Math.min(T.sw.lat,T.ne.lat);var C=Math.max(T.sw.lat,T.ne.lat);var oP=[new d9(oN,oM),new d9(oK,oM),new d9(oK,C),new d9(oN,C)];var e=mk.getGraphPoints(oP).slice(0);for(var oO=0;oOthis.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;hv.hide(this.domElement)},show:function(e){if(!e){this.visible=true}this._visible=true;hv.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 oL=this.div.children[0].clientWidth;var e=this.div.children[0].clientHeight;if(!oL&&this.lastClientWidth){oL=this.lastClientWidth;e=this.lastClientHeight}this.lastClientWidth=oL;this.lastClientHeight=e}var T=0;var C=0;var oK=m8.convertLL2MC(this.point);var i=this.map.pointToOverlayPixelIn(oK,{useRound:false});if(!this.useTranslate){T=this.div.children[0]?oL*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,oK){if(!this.div||!this.map){return}var i=this;var T=this.map;function e(oO){var oM=new ix("onclick").inherit(oO);oM.type=oO.type;var oN=oO.srcElement||oO.target;var oL=oO.clientX||oO.pageX;var oQ=oO.clientY||oO.pageY;if(oO&&oM&&oN&&oL&&oQ){var oP=hv.Dom.getOffset(T.container);oM.pixel=new hV(oL-oP.left,oQ-oP.top);oM.latLng=T.pixelToPoint(oM.pixel)}return oM}switch(C){case"mouseover":if(this.div.style){this.div.style.cursor="pointer"}hv.on(this.div,"mouseover",function(oM){i.div.style.cursor="pointer";var oL=e(oM);i.dispatchEvent(oL);oK(oL)});break;case"mouseout":hv.on(this.div,"mouseout",function(oM){var oL=e(oM);i.dispatchEvent(oL);oK(oL)});break;case"click":if(this.div.style){this.div.style.cursor="pointer"}hv.on(this.div,"click",function(oM){var oL=e(oM);i.dispatchEvent(oL);oK(oL)});break;default:break}},setPoint:function(e,oK){if(e instanceof d9){if(!oK){this.div.innerHTML="";this.div.appendChild(this.createDom(this.properties))}this.point=iM(e,this.coordType);if(this.synUpdate){this.map.dispatchEvent(new ix("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 oL=m8.convertLL2MC(this.point);var i=this.map.pointToOverlayPixelIn(oL,{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(oN){oN=oN+this.rotationInit;while(oN<0){oN+=360}this._rotation=oN%360;var oL=0;var C=this._rotation;if((this._rotation>90&&this._rotation<270)&&this.rotationFlip){oL=180;C-=360}else{oL=0}if(this.rotationFlip){var oP=((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=oP}else{if(Math.abs(this._rotation-100)<=10||Math.abs(this._rotation-280)<=10){this.offsetX=-oP}else{this.offsetX=this._originOpt.offsetX||0}}}var i=this.div.style.transform;const oK=/translate\(([^)]+)/;const oO=i.match(oK);if(oO){const oM=oO[1].split(",");const T=oM[0].trim();const e=oM[1].trim();this.div.style.transform="translate("+T+", "+e+") rotateZ("+C+"deg) rotateX("+oL+"deg)"}else{this.div.style.transform="rotateZ("+C+"deg) rotateX("+oL+"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 m0(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=m8.convertLL2MC(this.point);var i=this.map.pointToOverlayPixelIn(T,{zoom:C,center:e,fixPosition:true});return i},});function ik(e){if(typeof kU!=="undefined"&&kU.sendMessage){kU.sendMessage("CanvasLayer")}bw.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}ik.inherits(bw,"CanvasLayer");ik.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 oK=T.getPanes()[this.paneName];if(oK){oK.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};ik.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"};ik.prototype.adjustRatio=function(i){var oK=i.backingStorePixelRatio||i.webkitBackingStorePixelRatio||i.mozBackingStorePixelRatio||i.msBackingStorePixelRatio||i.oBackingStorePixelRatio||i.backingStorePixelRatio||1;var T=(window.devicePixelRatio||1)/oK;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)};ik.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)};ik.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 ix("onremove"))};ik.prototype.getContainer=function(){return this.canvas};ik.prototype.show=function(){if(!this.canvas&&this._map){this._map.addOverlay(this)}if(this.canvas){this.canvas.style.display="block"}};ik.prototype.hide=function(){if(this.canvas){this.canvas.style.display="none"}};ik.prototype.setZIndex=function(e){this.zIndex=e;if(this.canvas){this.canvas.style.zIndex=e}};ik.prototype.getZIndex=function(){return this.zIndex};var aX={};function lD(C,i){hv.BaseClass.call(this);this.content=C;this.map=null;this._config={width:0,height:0,maxWidth:600,offset:new mU(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;ki.load("simpleInfowindow",function(){e._draw()})}lD.inherits(hv.BaseClass,"SimpleInfoWindow");hv.extend(lD.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(){hv.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(){hv.BaseClass.prototype.decontrol.call(this)},toString:function(){return"SimpleInfoWindow"}});li.prototype.openSimpleInfoWindow=function(oK,e){if(!oK||oK.toString()!="SimpleInfoWindow"||!e||e.toString()!="Point"){return}var i=m8.convertLL2MC(e);var C=this.temp;if(!C.marker){var T=new nF(K.imgPath+"blank.gif",{width:1,height:1});C.marker=new og(i,{icon:T,width:1,height:1,offset:new mU(0,0),infoWindowOffset:new mU(0,0),clickable:false});C.marker._fromMap=1}C.marker.setPositionIn(i);this.addOverlay(C.marker);C.marker.show();C.marker.openSimpleInfoWindow(oK)};li.prototype.closeSimpleInfoWindow=function(){var e=this.temp.infoWin||this.temp._infoWin;if(e&&e.overlay){e.overlay.closeSimpleInfoWindow()}};g2.prototype.openSimpleInfoWindow=function(e){if(this.map){this.map.closeSimpleInfoWindow();e._visible=true;this.map.temp._infoWin=e;e.overlay=this;hv.BaseClass.call(e,e.hashCode)}};g2.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 dM(C,e){mk.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;ki.load("poly",function(){i._draw()})}dM.inherits(mk,"MapMask");hv.extend(dM.prototype,{setPoints:function(i){var e=mk.getGraphPoints(i).slice(0);this.hasMultipleParts=false;mk.prototype.setPoints.call(this,e)},setPathIn:function(e){this.setPoints(e)},_processSinglePointArray:function(e){var i=mk.getGraphPoints(e).slice(0);innerPoints=i.slice(0);if(innerPoints.length>1&&!innerPoints[0].equals(innerPoints[innerPoints.length-1])){innerPoints.push(new d9(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 ov(oL,C){if(!oL||oL.length===0){return}var oK=[];if(oL[0] instanceof d9){var e=this._processSinglePointArray(oL);for(var T=0;T=4){ms=window.B_HOST_TILE_BASE_URLS}var oB={B_NORMAL_MAP:{tileUrls:fx(K.tileDomain,K.rasterTilePath),vectorTileUrls:fx(K.tileDomain,K.vectorTilePath),languageTileUrls:function(e){switch(e){case BMAP_LANGUAGE_ZH:return fx(K.tileDomain,K.vectorTilePath);default:if(window._BMapSecurityConfig&&window._BMapSecurityConfig["serviceHost"]){return fx([window._BMapSecurityConfig["serviceHost"]],K.enVectorTilePath)}return fx(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 lz(new d9(-21364736,-11708041.66),new d9(23855104,12474104.17)),imgExtend:"png"},B_SATELLITE_MAP:{tileUrls:[K.urlProtocol+"//"+(ms[0]||"apimaponline0.bdimg.com/starpic/?qt=satepc&"),K.urlProtocol+"//"+(ms[0]||"apimaponline1.bdimg.com/starpic/?qt=satepc&"),K.urlProtocol+"//"+(ms[0]||"apimaponline2.bdimg.com/starpic/?qt=satepc&"),K.urlProtocol+"//"+(ms[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 lz(new d9(-21364736,-10616832),new d9(23855104,15859712)),imgExtend:"png"},B_STREET_MAP:{tileUrls:fx(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 lz(new d9(-21364736,-10616832),new d9(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 lz(new d9(-21364736,-10616832),new d9(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 lz(new d9(-21364736,-10616832),new d9(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 lz(new d9(-21364736,-11708041.66),new d9(23855104,12474104.17)),imgExtend:"png"}};var gA=oB;function at(e,i,C){this._name=e;this._layers=[];if(i){this._layers=i instanceof kT?[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 lz(new d9(-21364736,-16023552),new d9(23855104,19431424)),projection:C.projection||new m8()};if(typeof C.id==="string"){this.id=C.id;this.mapTypeId=C.id;this._config=gA&&gA[C.id]?gA[C.id]:null}if(typeof C.compatType==="string"){this.compatType=C.compatType}}hv.extend(at.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 mR(oL,C,e,T){var i=gA&&gA[oL]?gA[oL]:null;T=T||{};var oK={id:oL,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 m8()};return new at(C,null,oK)}at.builtin={BMAP_NORMAL_MAP:mR("B_NORMAL_MAP","地图","显示普通地图",{compatType:"BMAP_NORMAL_MAP"}),BMAP_SATELLITE_MAP:mR("B_SATELLITE_MAP","卫星","显示卫星影像",{compatType:"BMAP_SATELLITE_MAP"}),BMAP_HYBRID_MAP:mR("B_SATELLITE_MAP","混合","显示带有街道的卫星影像",{compatType:"BMAP_HYBRID_MAP",labelText:"路网"}),BMAP_EARTH_MAP:mR("B_EARTH_MAP","地球","显示地球",{compatType:"BMAP_EARTH_MAP"}),BMAP_NONE_MAP:mR("B_NONE_MAP","空白","显示空白地图",{compatType:"BMAP_NONE_MAP"})};function es(oM,oN,C,e,oL){if(oL&&gA[oL]){this.mapTypeName=oL}else{this.mapTypeName=lg}if(oM&&oM instanceof Array){var oK=true;for(var T=0;T=gA[this.mapTypeName].webgl.minZoom){if(gA[this.mapTypeName].webgl){if(oN>=gA[this.mapTypeName].webgl.minZoom){this.minZoom=oN}else{this.minZoom=gA[this.mapTypeName].webgl.minZoom}}else{if(oN>=gA[this.mapTypeName].minZoom){this.minZoom=oN}else{this.minZoom=gA[this.mapTypeName].minZoom}}}if(typeof C==="number"){if(gA[this.mapTypeName].webgl){if(C<=gA[this.mapTypeName].webgl.maxZoom){this.maxZoom=C}else{this.maxZoom=gA[this.mapTypeName].webgl.maxZoom}}else{if(C<=gA[this.mapTypeName].maxZoom){this.maxZoom=C}else{this.maxZoom=gA[this.mapTypeName].maxZoom}}}if(this.maxZoomthis.maxZoom){return false}var oL=this.containsPoint(e,oK);if(oL){return oL}for(var C=0;Cthis.maxZoom){return oK}for(var C=0;C0){oQ[oM.name]=oM;oQ.push(oM.name)}var oU=oQ.length-oS.bufferNumber;for(var oV=0;oU>0&&oV0&&this._transparentPng){this.img.src=K.imgPath+"blank.gif"}else{this.img.src=this.src}};lh.prototype._callCbks=function(){var C=this;for(var e=0;e8);function nh(e){this.tileLayers=[];this.map=e;this.bufferNumber=300;this.mapTiles=[];this.bufferTiles=[];this.config=gA[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={}}cv.register(function(i){if(i._renderType==="webgl"){return}var e=i.tileMgr=new nh(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===c1){return}e.loadTiles()});i.addEventListener("zoomstartcode",function(C){if(this.mapType===c1){return}e._zoom(C)});i.addEventListener("moving",function(C){if(this.mapType===c1){return}e.moveGridTiles()});i.addEventListener("resize",function(C){if(this.mapType===c1){return}e.resizeMap(C)});i.addEventListener("addtilelayer",function(C){e.addTileLayer(C)});i.addEventListener("removetilelayer",function(C){e.removeTileLayer(C)})});hv.extend(nh.prototype,{addTileLayer:function(T){var C=this;var i=T.target;C.tileLayers.push(i);if(C.map.loaded){C.moveGridTiles()}},removeTileLayer:function(oQ){var oR=this;var oO=oQ.target;var oM=oO.mapType;var oL=oR.mapTiles;var oT=oR.bufferTiles;for(var C in oT){var T=C.split("-")[1];if(T==oM){delete oT[C]}}for(var C in oL){var T=C.split("-")[1];if(T==oM){delete oL[C]}}if(oR.zoomsDiv&&oR.zoomsDiv.parentNode){oR.zoomsDiv.parentNode.removeChild(oR.zoomsDiv);oR.zoomsDiv.innerHTML=""}var oK=oR.map;if(oK.deepZoom){var oS=oK.deepZoom.preDeepZoomDiv;if(oS&&oS.parentNode){oS.parentNode.removeChild(oS)}}for(var oP=0,oN=oR.tileLayers.length;oP=1.5?2:1;this.normalUdt=oe("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}kT.inherits(eX,"TileLayer");kT.prototype.isTileLayer=true;hv.extend(kT.prototype,{isTransparentPng:function(){return this.transparentPng},getTilesUrl:function(oR,e){var oQ=mH(this.mapType);var C=gA[oQ];if(typeof C!=="object"){return null}var T=oR.x;var oS=oR.y;T=hz.calcLoopParam(T,e).col;var i="";if(this.opts.tileUrlTemplate){i=this.opts.tileUrlTemplate;i=i.replace(/\{X\}/,oS);i=i.replace(/\{Y\}/,T);i=i.replace(/\{Z\}/,e)}else{if(oQ===lg){var oP=this.isCanvasMap?0:1;var oL=C.tileUrls[Math.abs(oS+T)%C.tileUrls.length];if(window.offLineIPAddress){oL=window.offLineIPAddress+"tile5/"}var oK=this.map.config.style;i=oL+"?qt=vtile&x="+T+"&y="+oS+"&z="+e+(oK==="default"?"":("&styleId=1"))+"&styles=pl&udt="+this.normalUdt+"&scaler="+this.scaler+"&showtext="+oP+"&ak="+hj+"&is_has_bmap_proxy="+k1+"&from=gl";i=i.replace(/-(\d+)/gi,"M$1")}if(oQ===j9){var oM=oe("ditu","satellite");var oO=oM.ver;var oN=oM.udt;i=C.tileUrls[Math.abs(oS+T)%C.tileUrls.length]+"u=x="+T+";y="+oS+";z="+e+";v="+oO+";type=sate&fm=46&udt="+oN;i=i.replace(/-(\d+)/gi,"M$1")}}return i},initialize:function(oM){this.map=oM;if(oM._renderType==="webgl"){var oL=null;if(this.customLayer!==false){oL=this.getTilesUrl}hv.extend(this,hQ);this.labelProcessor=new na(this);this.callbackDataQueue=[];if(oL){this.getTilesUrl=oL}var C=this;oM.on("indoor_data_refresh",function(oN){if(!C.baseLayer){return}C._refreshIndoorData(oN.uid,oN.floor)});oM.on("custom_labels_ready",function(oN){if(C.mapType!==lg&&oN.model==="custom"){return}if((oN.model==="custom")||oN.model==="mvt_"+C.drawIndex){C._doWorkAfterLabelImageLoad(oN.virtualTile,oN.labelCanvas,null,oN.imgKey)}});oM.on("glmoduleloaded",function(){if(!C.baseLayer){return}C.updateAllIconsTextureCoords()});oM.on("layer_update",function(oO){if(C.dataType===2&&oM.customLoaded&&oM.areaCustomLoaded){var oN=new ix("onlayer_clear");oM.fire(oN)}});oM.on("layer_clear",function(oN){if(C.dataType===2){C.clearCache()}});if(this.ontology&&this.ontology._initEvent){this.ontology._initEvent(oM)}}if(!oM.temp.layerZIndex){oM.temp.layerZIndex=0}this.zIndex=this.zIndex||1;if(oM.getRenderType()==="dom"){this.zIndex=oM.tileMgr.tileLayers.length}else{if(this.baseLayer){this.zIndex=0}else{if(this.zIndex>0){this.adjustZIndex()}else{var e=oM._featureMgr.result.bkData;this.zIndex=e.length||1}}}if(!oM.temp.layid){oM.temp.layid=0}if(!this.opts.mapType){this.mapType="BMAP_CUSTOM_LAYER_"+oM.temp.layid;oM.temp.layid++}else{this.mapType=mH(this.opts.mapType)}var T=gA[this.mapType];if(!T){gA[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 lz(new d9(-21364736,-10616832),new d9(23855104,15859712)),imgExtend:"png"}}if(oM._renderType!=="webgl"){var oK=cQ(oM.platform,'
');oK.style.display="";oK.style.left=Math.ceil(-oM.offsetX+oM.width/2)+"px";oK.style.top=Math.ceil(-oM.offsetY+oM.height/2)+"px";this.tilesDiv=oK}this.isCanvasMap=oM.isCanvasMap();this.lastZoom=oM.getZoom();var i=this;this.addEventListener("initDrawData",function(oN){if(i.opts.boundary){i.addBoundary(i.opts.boundary)}});oM.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(oK){var C=this.zIndex;if(this.map&&this.map._featureMgr){var e=this.map._featureMgr.result.bkData;if(oK==="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 hz.calcLoopParam(e,i)},addBoundary:function(oL){if(!oL||!this.map){return}if(typeof oL==="string"){oL=[oL]}for(var T=0;T-1;oK--){var oL={};C=T.children[oK].style;oL.top=parseInt(C.top,10);oL.left=parseInt(C.left,10);this._zoomAniInfo[oK]=oL}},prepareLabelLayer:function(){var oK=this._map;if(this._enableCanvas2dMap&&oK.canvas2dMapMgr){if(this.touchZoomLabelCanvas){this.touchZoomLabelCanvas.parentNode.removeChild(this.touchZoomLabelCanvas)}var i=oK.canvas2dMapMgr._labelCanvas;this.touchZoomLabelCanvas=i.cloneNode(false);var e=this.touchZoomLabelCanvas.getContext("2d");e.drawImage(i,0,0);oK.platform.insertBefore(this.touchZoomLabelCanvas,oK.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-(oK.offsetX+T))+"px "+(this._fixPosition.y-(oK.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 oL=T.tileMgr.tileLayers;var oK;for(var C=0,e=oL.length;C-1;oS--){var oQ=this._zoomAniInfo[oS];oR=T.children[oS].style;var oK=oQ.left-oN.x;var C=oQ.top-oN.y;oQ.dx=oK*e-oK;oQ.dy=C*e-C;oQ.preDx=oK-oK;oQ.preDy=C-C;oZ=oQ.preDx+(oQ.dx-oQ.preDx);oO=oQ.preDy+(oQ.dy-oQ.preDy)+oP;oR.left=oQ.left+oZ+"px";oR.top=oQ.top+oO+"px";oR.width=oR.height=256*e+"px"}if(this._enableCanvas2dMap){var oY=!oX._isIE9?"translate3d(0px, "+oP+"px, 0) scale("+e+")":"translate(0px, "+oP+"px) scale("+e+")";this.touchZoomLabelCanvas.style[oU]=oY}},setZoomFinish:function(){this._animationDiv=null},startAnimation:function(oM){this.prepareLayer();this.hideNonAnimationLayers();var o5=this._map;if(this.touchZoomLabelCanvas){this.touchZoomLabelCanvas.style.display="none"}oM=oM||{};var o3=oM.zoomCount||0;var oR=oM.fixPosition;var o1=oM.fixMCPosition;var oP=oM.pixOffset;this._zoomCount=o3;var T=o5.getZoom();var o4=T+o3;var e=o5.config.enableContinuousZoom;var oV=0.5;var oQ=5;var C=Math.pow(2,o3);var o7=this._baseLayerDiv;var oS={x:oR.x-parseInt(o7.style.left,10)-o5.offsetX,y:oR.y-parseInt(o7.style.top,10)-o5.offsetY};var oN=this._animationDiv;var oZ=oN.children.length;var o9=this._preZoomTimes;var o2=[];var o0=this._transformStyleName;var oO=this._transformOriginStyleName;for(var oY=oZ-1;oY>-1;oY--){var oW={};var oX=oN.children[oY].style;oW.top=parseInt(oX.top,10);oW.left=parseInt(oX.left,10);var oL=oW.left-oS.x;var oK=oW.top-oS.y;oW.dx=oL*C-oL;oW.dy=oK*C-oK;oW.preDx=oL*o9-oL;oW.preDy=oK*o9-oK;o2[oY]=oW}var o6=this;var oU;var o8;var oT;this._zoomAni=new ij({fps:60,duration:e?500:1,transition:function(i){i=i*oQ/(2*oV);return oQ*i-oV*i*i},render:function(pi){pi=pi*(4*oV)/(oQ*oQ);oU=o9+pi*(C-o9);var pb=T+v(oU);var pg=null;var pf=0;var pj=0;if(oM.onAnimationBeforeLooping){var pk=oM.onAnimationBeforeLooping(pi,pb);pg=pk.loopingCenter;pf=pk.yDiff;pj=pk.totalYDiff}for(var pc=o2.length-1;pc>-1;pc--){var pd=o2[pc];if(oN.children[pc]){var ph=oN.children[pc].style;o8=pd.preDx+(pd.dx-pd.preDx)*pi-oP.width*pi;oT=pd.preDy+(pd.dy-pd.preDy)*pi-oP.height*pi+pf;ph.left=pd.left+o8+"px";ph.top=pd.top+oT+"px";ph.height=ph.width=256*oU+"px"}}var pa=oP.width*pi;var pe=oP.height*pi;if(o5.isRestrict){o6._enableCanvas2dMap&&o6._canvas2dMapMgr.clearLabel()}else{o6._enableCanvas2dMap&&o6._canvas2dMapMgr.drawLabel(oU,oR,T,o4,o3,pi,pa,pe,pj,pf)}o6._preZoomTimes=oU;o6._preRenderTick=pi;oM.onAnimationLooping&&oM.onAnimationLooping(pi,pb,pg)},finish:function(){o6._preZoomTimes=1;o6._zoomAni=null;o6._animationDiv=null;oM.onAnimationFinish&&oM.onAnimationFinish();o6.showNonAnimationLayers()}});return this._zoomAni},stopAnimation:function(){if(this._zoomAni){this._zoomAni.stop();this._zoomAni=null}}});function oH(e){this._initVars(e);this._initColorCanvas();this._bindEvent(e)}hv.extend(oH.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=da("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(oW){var oV=oW.textImg;var C=oW.textPos;var oT=this.ratio;var oR=this.sizeRatio/oT;var oK=this._colorCtx;var oO=this._colorCvsSize;oK.clearRect(0,0,oO,oO);var oQ=0;var e=0;var oN=0;for(var oP=0;oPoQ){oQ=C[oP].width;e=oP;oN=C[oP].drawX}}oQ/=oR;var oS=0;for(var oP=0,oM=C.length;oPoQ){oQ=oU.width/oR}oS+=oU.height/oR+2*oT}var T=oK.getImageData(0,0,oQ,oS);var oL=oK.getImageData(0,0,oQ,oS);return[T,oL]},_bindEvent:function(i){var e=this,C=i._map;C.addEventListener("onspotmouseover",function(oM){if(!this.isCanvasMap()||!this.temp.isPermitSpotOver||this.config.enableIconHighlight===false){return}if(oM.spots.length>0){var oL=oM.spots[0].userdata.uid;var oK=oM.spots[0].userdata.name;var T=e.findLabelByUid(oL,oK);T&&e._toHighLightColor(T)}});C.addEventListener("onspotmouseout",function(oM){if(!this.isCanvasMap()||!this.temp.isPermitSpotOver){return}if(oM.spots.length>0){var oL=oM.spots[0].userdata.uid;var oK=oM.spots[0].userdata.name;var T=e.findLabelByUid(oL,oK);T&&e._toDefaultColor(T)}});C.addEventListener("onspotclick",function(oM){if(!this.isCanvasMap()||!this.temp.isPermitSpotOver){return}if(oM.spots&&oM.spots.length>0){var oL=oM.spots[0].userdata.uid;var oK=oM.spots[0].userdata.name;var T=e.findLabelByUid(oL,oK);T&&e._changeBaseMapState(T)}else{e._recoverNormalState()}});C.on("spot_status_reset",function(){e._recoverNormalState()});C.on("spot_highlight",function(oK){var T=e.findLabelByUid(oK.uid);T&&e._changeBaseMapState(T)})},_getTextBound:function(oU){if(!oU.textPos){return null}var oS=this.ratio;var oQ=this.sizeRatio/oS;var C=oU.textPos;var oT=oU.baseDrawX;var oR=oU.baseDrawY;var oO=oT*oS+(C[0].drawX-oT)/oQ;var oM=oR*oS+(C[0].drawY-oR)/oQ;var oK=oO+C[0].width/oQ;var e=oM+C[0].height/oQ;for(var oP=0,oN=C.length;oPoK){oK=oL+oV.width}if(T+oV.height>e){e=T+oV.height}}return[oO,oM,oK,e]},_toHighLightColor:function(C){if(C._tempRank&&C._tempRank==this.RANK5){return}var oN=this._getTextBound(C);if(!oN){return}var T=Math.round(oN[0]);var i=Math.round(oN[1]);var e=this.getLabelImageData(C);var oL=e[0];var oK=e[1];var oM=this._canvas2dMapMgr.getFilterImageData(oL,this.RANK5);C._oldImgData=oK;this._labelCtx.putImageData(oM,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 oK={guid:i,name:T.name,guidExt:e};C._labelStrategy.setStrategyInfo(oK);C._loadData()},_recoverNormalState:function(){var e=this._canvas2dMapMgr;e._labelStrategy.setStrategyInfo(null);e._loadData()},findLabelByUid:function(oL,T){var oN=this._canvas2dMapMgr,e=oN._computedLabel;for(var oK=0,C=e.length;oKpN){pN=pQ.drawX+pQ.width}if(pQ.drawY+pQ.height>pM){pM=pQ.drawY+pQ.height}}}}}else{oR.tileX=T;oR.tileY=C;oY=T+oR.minXOriginal;oW=C+oR.minYOriginal;pN=T+oR.maxXOriginal;pM=C+oR.maxYOriginal}if(oY!=undefined){var pF=pC+(oY-pC)/pv;var pE=pB+(oW-pB)/pv;var ph=pC+(pN-pC)/pv;var pf=pB+(pM-pB)/pv;oR.minX=pF;oR.minY=pE;oR.maxX=ph;oR.maxY=pf;var pJ=(pF+ph)/2,pI=(pE+pf)/2,pq=oX+(pJ-pG/2)*o1,po=oV+(pp/2-pI)*o1;oR.geoX=pq;oR.geoY=po;pj.push(oR)}}}if(pU){for(var pg=0,pc=pU.length;pgpN){pN=o6+pH.width}if(oU+pH.height>pM){pM=oU+pH.height}if(o0.length===2){var o5=o0[1];var o3=pC+o5.destX;var oT=pB+o5.destY;if(oTpN){pN=o3+o5.width}if(oT+o5.height>pM){pM=oT+o5.height}}py._tempBounds=[oY,oW,pN,pM];var pn=oS.iconPos;var oM=pn.geoX;var oK=pn.geoY;var pC=(oM-oX)/o1+pG/2;var pB=(oV-oK)/o1+pp/2;var oY=pC+pn.destX;var oW=pB+pn.destY;var pN=oY+pn.width;var pM=oW+pn.height;oS.textPos=oS.textPos||oS._textPos;var o0=oS.textPos;var pH=o0[0];var o6=pC+pH.destX;var oU=pB+pH.destY;if(o6pM){pM=oU+pH.height}if(o0.length===2){var o5=o0[1];var o3=pC+o5.destX;var oT=pB+o5.destY;if(o3pM){pM=oT+o5.height}}oS._tempBounds=[oY,oW,pN,pM]}for(var pg=0,pc=pU.length;pgpS[2]||pO[3]pS[3])){oZ++;if(pk.textPos){pk._textPos=pk.textPos;delete pk.textPos}}var pS=pT._tempBounds;if(!(pO[2]pS[2]||pO[3]pS[3])){oZ++;if(pT.textPos){pT._textPos=pT.textPos;delete pT.textPos}}if(oZ>=2){if(pK.textPos){pK._textPos=pK.textPos;delete pK.textPos}}}}for(var pg=0,pc=pU.length;pgpN){pN=pH.drawX+pH.width}if(pH.drawY+pH.height>pM){pM=pH.drawY+pH.height}if(o0.length===2){var o5=o0[1];o5.drawX=pC+o5.destX;o5.drawY=pB+o5.destY;if(o5.drawXpN){pN=o5.drawX+o5.width}if(o5.drawY+o5.height>pM){pM=o5.drawY+o5.height}}}var pF=pC+(oY-pC)/pv;var pE=pB+(oW-pB)/pv;var ph=pC+(pN-pC)/pv;var pf=pB+(pM-pB)/pv;pl.minX=pF;pl.minY=pE;pl.maxX=ph;pl.maxY=pf;var px=(pF+ph)/2;var pw=(pE+pf)/2;var oN=oX+(px-pG/2)*o1;var oL=oV+(pp/2-pw)*o1;pl.geoX=oN;pl.geoY=oL;pj.push(pl)}}var pz=this._strategyInfo;if(pz){var pi=pz.guid;var pr=pz.name;var o8=pz.guidExt;for(var pg=0,pc=pj.length;pgpm.maxX-pe||pK.maxY-pepm.maxY-pe)){pK.arrIntersectIndex.push(pd)}}}for(var pg=0,pc=pj.length;pgoO){var C=oM.splice(0,oL);for(var oP=0,oN=C.length;oP0){this.isDrawText=true}},_loadLabelData:function(oS,oR,oQ,C,oT,e){var oL=oS.toString();var T=oR.toString();var oN="cbk_"+oL.replace("-","_")+"_"+T.replace("-","__")+"_"+Math.floor(oQ);var oX=h6+"."+oN;var oW=this._labelDataUrls;var oP=Math.abs(oS+oR)%oW.length;var o2=oW[oP];if(window.offLineIPAddress){o2=window.offLineIPAddress+"pvd/"}var i=this.labelStyleParam;var oV="?qt=vtile";var oY="";if(this._map.config.style!=="default"){oY="&styleId=1"}var oU="x={x}&y={y}&z={z}&udt={udt}&v={v}&styles={styles}"+oY+"&textonly=1&textimg=1&scaler={scaler}&fn="+encodeURIComponent(oX);var oZ=hz.calcLoopParam(oS,oQ).col;var oO=this.ratio>1?2:1;var oM=oU.replace(/{x}/,oZ).replace(/{y}/,oR).replace(/{z}/,Math.floor(oQ)).replace(/{styles}/,i).replace(/{udt}/,this._udt).replace(/{v}/,this._version).replace(/{scaler}/,oO);var oK=o2+oV+"¶m="+window.encodeURIComponent(hq(oM));var o1=this;var o0=o1._map;cv[oN]=function(o3){o1._vectorDrawLib.parseLabelData(o3,oS,oR,oQ,C,oT,function(o8){var o5=o0.getCenterIn();var o9=o0.getZoom();var pb="viewKey_"+Math.floor(o5.lng)+"_"+Math.floor(o5.lat)+"_"+o9;o1._labelCount--;var pc=o1._getCache(oS,oR,oQ,C).updateLabelCounter;o1._labelCount-=pc;var o6=o1._curViewLabels;if(pb===e||(o1._labelCount<0&&o9===oQ)){o6.push(o8)}if(pb===e){o1.statResponseCount++}if(o1._labelCount<=0){var o4=(new Date()).getTime();o1.updateLabel();var o7=(new Date()).getTime();var pa=new ix("oncanvasmaploaded");pa.drawTime=o7-o4;if(o1.statResponseCount===o1.statRequestCount){pa.isAllLoadedDrawing=true}o0.dispatchEvent(pa)}o1._setCacheValue(oS,oR,oQ,C,o8);delete cv[oN]})};jW.load(oK)},drawLabel:function(C,T,oQ,i,oO,oK,e,oL,oP,oM){var oN=this;if(!oN._computedLabel){return}if(oN._computedLabel._zoom!==oQ){oN.clearLabel();return}oN._map.temp.isPermitSpotOver=false;oN.clearLabel();oN._vectorDrawLib.zoomingIconAndText(this._labelCtx,oN._computedLabel,C,T,i,oO,oK,e,oL,oP,oM)},_addSpotData:function(){this._spotData=[];var oQ=this._map.getZoom();for(var oL=0,oK=this._computedLabel.length;oLoQ)){continue}var oM=[];oM[0]=(oN.minX-oN.maxX)/2;oM[1]=(oN.minY-oN.maxY)/2;oM[2]=(oN.maxX-oN.minX)/2;oM[3]=(oN.maxY-oN.minY)/2;var T=null;if(oN.iconPos){T=new d9(oN.iconPos.geoX,oN.iconPos.geoY)}var C=oN.name?oN.name.replace("\\\\","
"):"";if(oN.iconPos&&oN.iconPos.iconType.indexOf("ditie")>-1&&this._map.getZoom()>14){C=""}var oP={n:C,pt:new d9(oN.geoX,oN.geoY),userdata:{iconPoint:T,uid:oN.guid,name:C,type:oN.iconPos?oN.iconPos.iconType:"",iconImg:oN.iconImg,mapPoi:true,adver_log:oN.adver_log||""},bd:oM,tag:"MAP_SPOT_INFO"};this._spotData.push(oP)}var oO=new ix("onspotsdataready");oO.spots=this._spotData;this._map._spotDataOnCanvas=this._spotData;this._map.dispatchEvent(oO)},isClickableLabel:function(e){if(e.isDel||(!e.guid&&!e.name)){return false}return true},getFilterImageData:function(C,oM){if(this._map&&this._map.config.enableIconHighlight===false){return C}var oN=C.data,oL=this._labelStrategy,oM=parseInt(oM);for(var oO=0,oK=oN.length;oO0&&!oR){continue}var oV=Math.round(o4[0]/100);var oU=Math.round(o4[1]/100);var o7={lng:o1+oV,lat:o0-(oY*oO-oU)};var oM=oV/oO;var oL=oY-oU/oO;var oZ=o4[7]||"";var pc=o4[5];var o2={type:"fixed",name:oZ,textImg:oX,rank:o4[4],baseX:oM,baseY:oL,iconPos:null,textPos:null,guid:o4[3]||"",tracer:o8,direction:pc,startScale:3};if((pc!==m4&&oR||!oR)&&pb!==null){o2.iconPos=this._getIconPosition(pb,oQ,oM,oL,o7);if(o2.iconPos){C=o2.iconPos.width;oW=o2.iconPos.height}}if(C===0){o2.direction=m4}if(oR){o2.textPos=this._getTextDrawData(o4,oM,oL,C,oW)}if(o2.textPos||o2.iconPos){o3.push(o2)}}}},_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=hT[i].start;return T[i-C]==="1"},_getIconPosition:function(oN,oL,C,i,e){var T=this._map.config.style;var oO=cv["iconSetInfo"+T][oN];if(!oO){if(oN.charCodeAt(0)>=48&&oN.charCodeAt(0)<=57){oO=cv["iconSetInfo"+T]["_"+oN]}}if(!oO){return null}var oK=oO[0];var oM=oO[1];oK=oK*oL;oM=oM*oL;return{srcX:0,srcY:0,destX:C-oK/2,destY:i-oM/2,width:oK,height:oM,geoX:e.lng,geoY:e.lat,mcPt:e,iconType:oN}},_getTextDrawData:function(oU,oT,oS,T,oQ){var oZ=oU[5];if(typeof oZ!=="number"){oZ=0}var oO=this.ratio;var oN=oO/2;T*=oN;oQ*=oN;var oP=oU[12];var oK=oP.length;var o2=0;var o1=0;var oY=[];var oX=0;var o0=0;for(var oW=0;oW0&&e>0){oY.push({srcX:oL,srcY:i,destX:o2,destY:o1,width:C,height:e})}}if(oY.length>0){return oY}return null},_getLineLabelInfo:function(oR,T,oK,o6,pj,oY,o4,o3,o5,oX){if(oR.length!==10){return}var o8=this.ratio;var C=this.ratio;var pf=oR[7].length;var oZ=oR[1];var ph=oR[3];var pn=oR[8];var oN=oR[4];var e=2;var oL=oN.slice(0,e);for(var pk=e;pkoV){oV=pr+oM}if(pq+oP>oU){oU=pq+oP}}o0.push({angle:oT,srcX:oO,srcY:oQ,destX:pr,destY:pq,width:oM,height:oP})}var pg={type:"line",textImg:T,rank:oZ,baseX:pd,baseY:pb,arrWordPos:o0,minXOriginal:o9,minYOriginal:o7,maxXOriginal:oV,maxYOriginal:oU,text:""};oX.push(pg)}},alterColor:function(oM,e,oL){var C=this._colorCtx,i=this._canvas2dMapMgr;C.clearRect(0,0,oM.width,oM.height);C.drawImage(e,oM.srcX,oM.srcY,oM.width,oM.height,0,0,oM.width,oM.height);var oK=C.getImageData(0,0,oM.width,oM.height),T=i.getFilterImageData(oK,oL);C.putImageData(T,0,0)},drawIconAndText:function(oY,oX,e){var oP=this.ratio;var oN=this.sizeRatio/oP;var oR=2/oP;var o9=this;for(var o1=0,oZ=oX.length;o110&&o4<350){oY.save();var o7=Math.round(pa+o3.width/2);var o6=Math.round(o8+o3.height/2);oY.translate(o7,o6);oY.rotate(-o4/180*Math.PI);oY.drawImage(oV,o3.srcX,o3.srcY,o3.width,o3.height,-Math.round(o3.width/2),-Math.round(o3.height/2),o3.width/oN,o3.height/oN);oY.restore()}else{oY.drawImage(oV,o3.srcX,o3.srcY,o3.width,o3.height,pa,o8,o3.width/oN,o3.height/oN)}}}}}},isCollide:function(oL,oU,oT,e,oN,C,oP){for(var oK=0,T=C.length;oKoO[1]+oO[3]+oS||oT+oNoO[2]+oO[4]+oR)){return true}}}return false},zoomingIconAndText:function(o9,o3,T,o7,o8,pA,pg,oR,pm,pf,o0){var pB=this.ratio;var oS=this.sizeRatio/pB;var pC=2/pB;var pM=pB/2;var pw=o7.x;var pv=o7.y;var pa=2*pB;if(o0!==0){pv+=pf}var oV=undefined,oO=undefined,oL=undefined,oQ=undefined,oZ=undefined;var pl=pA>0?true:false;if(!pl){oV=[];var pp=1-pg}for(var pI=0,pG=o3.length;pI10&&o6<350){var py=pr+pz.width/2;var px=pq+pz.height/2;var oK=o6/180*Math.PI;var pd=Math.cos(oK);var oW=Math.sin(oK);var po=pd;var oX=pd;var pn=oW;var oY=-oW;var o5=py-py*pd-px*oW;var e=px+py*oW-px*pd;o9.save();o9.transform(po,oY,pn,oX,o5,e);o9.drawImage(oM,pz.srcX,pz.srcY,oQ,oZ,oO,oL,oQ/oS,oZ/oS);o9.restore()}else{o9.drawImage(oM,pz.srcX,pz.srcY,oQ,oZ,oO,oL,oQ/oS,oZ/oS)}!pl&&oV.push([pI,oO,oL,oQ,oZ])}}o9.restore()}}}});function gN(e){this.initVars(e)}hv.extend(gN.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(oL,oP){var oN=this;this.bizData=oL;this.objTextsPng=null;this.arrIconsPng=null;var C=oL.textsPng;var oR=oL.iconsPng;if(!C||!oR){return}var oO=new Image();oO.onload=function(){oN.objTextsPng=this;oN.calcIconAndTextInfo(oP);this.onload=null};oO.src=this.base64Prefix+C;var oQ=oR.length;var e=[];for(var oK=0;oKoN.width||i>oN.height)&&(e>oN.width||oR>oN.height)){return false}return true},_setPlatformPosition:function(oQ,oP,oS){oS=oS||{};if(oQ===0&&oP===0&&!oS.point){return}if(isNaN(oS.initMapOffsetX)){oS.initMapOffsetX=this.offsetX}if(isNaN(oS.initMapOffsetY)){oS.initMapOffsetY=this.offsetY}var oM=mn(this._heading);if(this._tilt>0){oP=oP/Math.cos(mn(this._tilt))}var oR=oQ*Math.cos(oM)+oP*Math.sin(oM);var oO=-oQ*Math.sin(oM)+oP*Math.cos(oM);oR=oR+oS.initMapOffsetX;oO=oO+oS.initMapOffsetY;if(oS.point){var i=this.restrictCenter(oS.point);if(!i.equals(this.centerPoint)){this.centerPoint=i.clone();this.fire(new ix("oncenter_changed"))}}else{var T=this.offsetX-oR;var e=this.offsetY-oO;var oN=this.centerPoint.lng;var oL=this.centerPoint.lat;var oK=new d9(oN,oL);var C=this.getZoomUnits();this.centerPoint=this.restrictCenter(new d9(oK.lng+T*C,oK.lat-e*C),C);this.fire(new ix("oncenter_changed"))}this.offsetX=oR;this.offsetY=oO;this.dispatchEvent(new ix("onmoving"))},restrictCenter:function(oT,oM){if(this.config.restrictCenter===false){return oT}oM=oM||this.getZoomUnits();var oQ=this.pixelToPointIn(new hV(this.width,0),{center:oT});var e=this.pixelToPointIn(new hV(0,this.height),{center:oT});var oS=oT.lng;var oR=oT.lat;if(!!this.config.restrictBounds&&!this.config.restrictBounds.isEmpty()){var oV=this.config.restrictBounds;var oN=oV.getSouthWest();var oW=oV.getNorthEast();var oU=m8.convertLL2MC(oN);var oK=m8.convertLL2MC(oW);oT.lng=this.calcNewLngByBounds(oS,e,oQ,oU.lng,oK.lng,oM);oT.lat=this.calcNewLatByBounds(oR,e,oQ,oU.lat,oK.lat,oM);return oT}var T=this.pixelToPointIn(new hV(0,0),{center:oT});var oO=this.pixelToPointIn(new hV(0,this.height),{center:oT});if(this.zoomLevel<5){if(T.lat>li.MAX_LAT&&oO.latli.MAX_LAT){oT.lat=li.MAX_LAT-this.height/2*oM}else{if(oO.latoL&&e.latoM&&e.lngoL){oK=oL-this.height/2*e}else{if(T.latC){i=C-this.width/2*e}else{if(oL.lngoQ){this._tilt=oQ}if(oU){if(this._heading%360!==0||this._tilt>0){var oR=this._webglMapCamera.fromScreenPixelToMC(oN.x,oN.y,{center:T,zoom:this.zoomLevel});if(oR){var oX=oR.sub(oS);var e=T.sub(oX);this.centerPoint=this.restrictCenter(e)}}else{var i=this.getZoomUnits();var e=new d9(oU.lng-i*(oN.x-this.width/2),oU.lat+i*(oN.y-this.height/2));this.centerPoint=this.restrictCenter(e,i)}this.fire(new ix("oncenter_changed"))}this._checkFireZoomend();oL.callback&&oL.callback();return}this._animationInfo.zoom={current:this.zoomLevel,diff:C-this.zoomLevel,target:C};var oW=this;var oK=this._tilt;if(this.fixPoint||oK>li.MAX_DRAG_TILT_L2){oL.renderCallback=function(){var o1=oW.getCurrentMaxTilt();if(oW._tilt>o1){oW._tilt=o1}var o2=oW.fixPixel;if(!oW.fixPixel||!oW.fixPoint){return}var oY=oW.fixPixel;var o8=oW.fixPoint;var o5=oW.fixCenter;var o3=oW.mousePosMCPoint;if(oW._heading%360!==0||oW._tilt>0){var oZ=oW._webglMapCamera.fromScreenPixelToMC(oY.x,oY.y,{center:o5,zoom:oW.zoomLevel,tilt:oW._tilt});if(oZ){var o7=oZ.sub(o3);var o0=o5.sub(o7);oW.centerPoint=oW.restrictCenter(o0)}}else{var o4=oY;var o6=oW.getZoomUnits();var o0=new d9(o8.lng-o6*(o4.x-oW.width/2),o8.lat+o6*(o4.y-oW.height/2));oW.centerPoint=oW.restrictCenter(o0,o6)}oW.fire(new ix("oncenter_changed"))}}if(oL.fromMouseWheel===true){this._startInfiniteZoomAnimation(oL);oL.callback&&oL.callback();oW._checkFireZoomend();return}if(!oL.callback){oL.callback=function(){oW._checkFireZoomend()}}else{var oP=oL.callback;oL.callback=function(oY,oZ){oP(oY,oZ);oW._checkFireZoomend()}}this._startAnimation(oL)},_checkFireZoomend:function(){var e=this;if(e.fireZoomendTimer){clearTimeout(e.fireZoomendTimer)}e.fireZoomendTimer=setTimeout(function(){if(e.zoomEventStatus==="zooming"){e.fire(new ix("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,pd,oY){oY=oY||{};var oK=this._getProperZoom(pd);pd=oK.zoom;if(this.centerPoint.equals(C)&&this.zoomLevel===pd&&typeof oY.heading!=="number"&&typeof oY.tilt!=="number"){return}var e=this.getHeading()%360;var oQ=this.getTilt();var oW=0;var o0=0;var oT=this.getBounds().containsPoint(C);if(typeof oY.heading==="number"){oW=oY.heading}else{if(oT){oW=e}}if(typeof oY.tilt==="number"){o0=oY.tilt}else{if(oT){o0=oQ}}this._heading=e;var pa=oW-e;var o6=o0-oQ;var oU=this;var oM=this.zoomLevel;var oN=1.42;var o2=this.zoomScale(pd-oM);var pf=this.getZoomUnits();var oS=this.centerPoint.div(pf);var pg=C.div(pf);var o9=this.worldSize();var o5=oN;var o4=Math.max(this.width,this.height);var o3=o4/o2;var oR=pg.sub(oS).mag();var i=o5*o5;function pc(pi){var ph=(o3*o3-o4*o4+(pi?-1:1)*i*i*oR*oR)/(2*(pi?o3:o4)*i*oR);return Math.log(Math.sqrt(ph*ph+1)-ph)}function T(ph){return(Math.exp(ph)-Math.exp(-ph))/2}function oO(ph){return(Math.exp(ph)+Math.exp(-ph))/2}function oX(ph){return T(ph)/oO(ph)}var oP=pc(0);var o7=function(ph){return(oO(oP)/oO(oP+o5*ph))};var o8=function(ph){return o4*((oO(oP)*oX(oP+o5*ph)-T(oP))/i)/oR};var oL=(pc(1)-oP)/o5;if(Math.abs(oR)<0.000001||oL===Infinity||isNaN(oL)){if(Math.abs(o4-o3)<0.000001){this._animationInfo.zoom={current:this.zoomLevel,diff:pd-this.zoomLevel};this._animationInfo.center={current:this.centerPoint,diff:C.sub(this.centerPoint)};this._animationInfo.heading={current:e,diff:oW-e};this._animationInfo.tilt={current:oQ,diff:o0-oQ};this.setLock(true);this._startAnimation({callback:function(ph){oU.setLock(false);if(oY.callback){oY.callback(ph)}},duration:oY.duration});return}var pe=o35){pb=(oL-5)/2+pb}}var oZ=oY.duration||1000*oL/pb;if(isNaN(oZ)){var o1={};for(var oV in oY){o1[oV]=oY[oV];o1.noAnimation=true}this.centerAndZoomIn(C,pd,o1);return}this.fire(new ix("onmovestart"));this.fire(new ix("onzoomstart"));this.setLock(true);this._startAnimation({duration:oZ,renderCallback:function(ph,pi){var pj=ph*oL;var pm=o8(pj);var pl=oM+oU.scaleZoom(1/o7(pj));if(ploU.getMaxZoom()){pl=oU.getMaxZoom()}if(pl!==oU.zoomLevel){oU.zoomLevel=pl;oU.fire(new ix("onzoom_changed"))}oU.centerPoint=oS.add(pg.sub(oS).mult(pm)).mult(pf);oU.fire(new ix("oncenter_changed"));if(typeof oW==="number"){var pk=ph/0.7;if(pk>1){pk=1}oU.setHeading(e+pa*ph,{noAnimation:true})}if(typeof o0==="number"){oU.setTilt(oQ+o6*ph,{noAnimation:true})}},callback:function(ph,pi){oU.setLock(false);if(pi&&pi.stop===true){oU.fire(new ix("onmoveend"));oU.fire(new ix("onzoomend"));oY.callback&&oY.callback(ph);return}if(pd!==oU.zoomLevel){oU.zoomLevel=pd;oU.fire(new ix("onzoom_changed"))}oU.fire(new ix("onmoveend"));oU.fire(new ix("onzoomend"));oY.callback&&oY.callback(ph)}})},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 oL=Math.round(this.height/2);var oK=this._ifUseAnimation(i,this.zoomLevel);if(C.noAnimation===true||oK===false){this._stopAllAnimations();this._applyHeadingTilt(C);this._panToIn(e-T.x,oL-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 ix("onmovestart"));this._setPlatformPosition(i,e,{point:T});this.dispatchEvent(new ix("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,oK){if(this.temp.operating===true){return}oK=oK||{};this.dispatchEvent(new ix("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 ij({fps:oK.fps||T.config.fps,duration:oK.duration||T.config.actionDuration,transition:oK.transition||jF.easeInOutQuad,render:function(oL){this.terminative=T.temp.operating;if(T.temp.operating){return}T._setPlatformPosition(i*oL,e*oL,{initMapOffsetX:C.pl,initMapOffsetY:C.pt})},finish:function(oL){T.dispatchEvent(new ix("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 ix("onmoveend"));T.temp.tlPan=false}})},_startAnimation:function(i){var oK=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 oL=i.duration||500;var oM=i.transition||jF.ease;var e=new ix("onanimation_start");this.fire(e);if(i.unstopable){oK=this._animationInfoUnstopable}var T=new ij({duration:oL,transition:oM,render:function(oP,oO){for(var oN in oK){if(!oK.hasOwnProperty(oN)){continue}var oR=oK[oN].current;var oQ=oK[oN].diff;C._setValueTick(oN,oR,oQ,oP)}if(i.renderCallback){i.renderCallback(oP,oO)}},finish:function(oN){C.fire(new ix("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(oN)}},onStop:function(oN){oN=oN||{};C.fire(new ix("onanimation_end"));if(oN.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 ix("onanimation_start"));i._infiniteAni=new ij({duration:10000,transition:jF.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 ix("onanimation_end"));if(e.callback){e.callback()}},onStop:function(){i._infiniteAni=null;i._animationInfo={};i.fire(new ix("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 ix("on"+e+"_changed"))}return}else{if(e==="center"){this.centerPoint=C}}this["_"+e]=C;this.fire(new ix("on"+e+"_changed"))},_setValueTick:function(e,oK,T,i){if(e==="center"){var C=new d9(oK.lng+T.lng*i,oK.lat+T.lat*i);this._setValue(e,C);return}if(e==="zoom"){this._setValue(e,Math.pow(oK,1-i)*Math.pow(oK+T,i));return}this._setValue(e,oK+T*i)},setHeading:function(T,i){i=i||{};if(T===this._heading){i.callback&&i.callback();return}var C=gq(this._heading,360);var e=gq(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 oK=e-C;if(Math.abs(e-C)>180){if(oK>0){oK=oK-360}else{oK=oK+360}}this._animationInfo.heading={current:C,diff:oK}}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>li.MAX_TILT){e=li.MAX_TILT}if(e0){oR=1/Math.sqrt(oR);oU[0]=oT[0]*oR;oU[1]=oT[1]*oR}return oU};oP.dot=function(oS,oR){return oS[0]*oR[0]+oS[1]*oR[1]};oP.cross=function(oT,oS,oR){var oU=oS[0]*oR[1]-oS[1]*oR[0];oT[0]=oT[1]=0;oT[2]=oU;return oT};oP.lerp=function(oT,oS,oR,oU){var oW=oS[0],oV=oS[1];oT[0]=oW+oU*(oR[0]-oW);oT[1]=oV+oU*(oR[1]-oV);return oT};oP.random=function(oR,oT){oT=oT||1;var oS=oK()*2*Math.PI;oR[0]=Math.cos(oS)*oT;oR[1]=Math.sin(oS)*oT;return oR};oP.transformMat2=function(oU,oT,oS){var oR=oT[0],oV=oT[1];oU[0]=oS[0]*oR+oS[2]*oV;oU[1]=oS[1]*oR+oS[3]*oV;return oU};oP.transformMat2d=function(oU,oT,oS){var oR=oT[0],oV=oT[1];oU[0]=oS[0]*oR+oS[2]*oV+oS[4];oU[1]=oS[1]*oR+oS[3]*oV+oS[5];return oU};oP.transformMat3=function(oU,oT,oS){var oR=oT[0],oV=oT[1];oU[0]=oS[0]*oR+oS[3]*oV+oS[6];oU[1]=oS[1]*oR+oS[4]*oV+oS[7];return oU};oP.transformMat4=function(oU,oT,oS){var oR=oT[0],oV=oT[1];oU[0]=oS[0]*oR+oS[4]*oV+oS[12];oU[1]=oS[1]*oR+oS[5]*oV+oS[13];return oU};oP.rotate=function(oU,oS,oR,oY){var oX=oS[0]-oR[0];var oW=oS[1]-oR[1];var oT=Math.sin(oY);var oV=Math.cos(oY);oU[0]=oX*oV-oW*oT+oR[0];oU[1]=oX*oT+oW*oV+oR[1];return oU};oP.forEach=(function(){var oR=oP.create();return function(oU,oY,oZ,oX,oW,oS){var oV,oT;if(!oY){oY=2}if(!oZ){oZ=0}if(oX){oT=Math.min((oX*oY)+oZ,oU.length)}else{oT=oU.length}for(oV=oZ;oV0){oR=1/Math.sqrt(oR);oU[0]=oT[0]*oR;oU[1]=oT[1]*oR;oU[2]=oT[2]*oR}return oU};oO.dot=function(oS,oR){return oS[0]*oR[0]+oS[1]*oR[1]+oS[2]*oR[2]};oO.cross=function(oS,oX,oW){var oR=oX[0],oZ=oX[1],oY=oX[2],oV=oW[0],oU=oW[1],oT=oW[2];oS[0]=oZ*oT-oY*oU;oS[1]=oY*oV-oR*oT;oS[2]=oR*oU-oZ*oV;return oS};oO.lerp=function(oT,oS,oR,oU){var oX=oS[0],oW=oS[1],oV=oS[2];oT[0]=oX+oU*(oR[0]-oX);oT[1]=oW+oU*(oR[1]-oW);oT[2]=oV+oU*(oR[2]-oV);return oT};oO.random=function(oR,oV){oV=oV||1;var oT=oK()*2*Math.PI;var oU=(oK()*2)-1;var oS=Math.sqrt(1-oU*oU)*oV;oR[0]=Math.cos(oT)*oS;oR[1]=Math.sin(oT)*oS;oR[2]=oU*oV;return oR};oO.transformMat4=function(oU,oT,oS){var oR=oT[0],oW=oT[1],oV=oT[2];oU[0]=oS[0]*oR+oS[4]*oW+oS[8]*oV+oS[12];oU[1]=oS[1]*oR+oS[5]*oW+oS[9]*oV+oS[13];oU[2]=oS[2]*oR+oS[6]*oW+oS[10]*oV+oS[14];return oU};oO.transformMat3=function(oU,oT,oS){var oR=oT[0],oW=oT[1],oV=oT[2];oU[0]=oR*oS[0]+oW*oS[3]+oV*oS[6];oU[1]=oR*oS[1]+oW*oS[4]+oV*oS[7];oU[2]=oR*oS[2]+oW*oS[5]+oV*oS[8];return oU};oO.transformQuat=function(oX,o3,oR){var o4=o3[0],o2=o3[1],o1=o3[2],oZ=oR[0],oY=oR[1],oW=oR[2],o0=oR[3],oU=o0*o4+oY*o1-oW*o2,oT=o0*o2+oW*o4-oZ*o1,oS=o0*o1+oZ*o2-oY*o4,oV=-oZ*o4-oY*o2-oW*o1;oX[0]=oU*o0+oV*-oZ+oT*-oW-oS*-oY;oX[1]=oT*o0+oV*-oY+oS*-oZ-oU*-oW;oX[2]=oS*o0+oV*-oW+oU*-oY-oT*-oZ;return oX};oO.rotateX=function(oT,oS,oR,oW){var oV=[],oU=[];oV[0]=oS[0]-oR[0];oV[1]=oS[1]-oR[1];oV[2]=oS[2]-oR[2];oU[0]=oV[0];oU[1]=oV[1]*Math.cos(oW)-oV[2]*Math.sin(oW);oU[2]=oV[1]*Math.sin(oW)+oV[2]*Math.cos(oW);oT[0]=oU[0]+oR[0];oT[1]=oU[1]+oR[1];oT[2]=oU[2]+oR[2];return oT};oO.rotateY=function(oT,oS,oR,oW){var oV=[],oU=[];oV[0]=oS[0]-oR[0];oV[1]=oS[1]-oR[1];oV[2]=oS[2]-oR[2];oU[0]=oV[2]*Math.sin(oW)+oV[0]*Math.cos(oW);oU[1]=oV[1];oU[2]=oV[2]*Math.cos(oW)-oV[0]*Math.sin(oW);oT[0]=oU[0]+oR[0];oT[1]=oU[1]+oR[1];oT[2]=oU[2]+oR[2];return oT};oO.rotateZ=function(oT,oS,oR,oW){var oV=[],oU=[];oV[0]=oS[0]-oR[0];oV[1]=oS[1]-oR[1];oV[2]=oS[2]-oR[2];oU[0]=oV[0]*Math.cos(oW)-oV[1]*Math.sin(oW);oU[1]=oV[0]*Math.sin(oW)+oV[1]*Math.cos(oW);oU[2]=oV[2];oT[0]=oU[0]+oR[0];oT[1]=oU[1]+oR[1];oT[2]=oU[2]+oR[2];return oT};oO.forEach=(function(){var oR=oO.create();return function(oU,oY,oZ,oX,oW,oS){var oV,oT;if(!oY){oY=3}if(!oZ){oZ=0}if(oX){oT=Math.min((oX*oY)+oZ,oU.length)}else{oT=oU.length}for(oV=oZ;oV0){oR=1/Math.sqrt(oR);oV[0]=oU[0]*oR;oV[1]=oU[1]*oR;oV[2]=oU[2]*oR;oV[3]=oU[3]*oR}return oV};oN.dot=function(oS,oR){return oS[0]*oR[0]+oS[1]*oR[1]+oS[2]*oR[2]+oS[3]*oR[3]};oN.lerp=function(oT,oS,oR,oU){var oX=oS[0],oW=oS[1],oV=oS[2],oY=oS[3];oT[0]=oX+oU*(oR[0]-oX);oT[1]=oW+oU*(oR[1]-oW);oT[2]=oV+oU*(oR[2]-oV);oT[3]=oY+oU*(oR[3]-oY);return oT};oN.random=function(oR,oS){oS=oS||1;oR[0]=oK();oR[1]=oK();oR[2]=oK();oR[3]=oK();oN.normalize(oR,oR);oN.scale(oR,oR,oS);return oR};oN.transformMat4=function(oV,oU,oS){var oR=oU[0],oX=oU[1],oW=oU[2],oT=oU[3];oV[0]=oS[0]*oR+oS[4]*oX+oS[8]*oW+oS[12]*oT;oV[1]=oS[1]*oR+oS[5]*oX+oS[9]*oW+oS[13]*oT;oV[2]=oS[2]*oR+oS[6]*oX+oS[10]*oW+oS[14]*oT;oV[3]=oS[3]*oR+oS[7]*oX+oS[11]*oW+oS[15]*oT;return oV};oN.transformQuat=function(oX,o3,oR){var o4=o3[0],o2=o3[1],o1=o3[2],oZ=oR[0],oY=oR[1],oW=oR[2],o0=oR[3],oU=o0*o4+oY*o1-oW*o2,oT=o0*o2+oW*o4-oZ*o1,oS=o0*o1+oZ*o2-oY*o4,oV=-oZ*o4-oY*o2-oW*o1;oX[0]=oU*o0+oV*-oZ+oT*-oW-oS*-oY;oX[1]=oT*o0+oV*-oY+oS*-oZ-oU*-oW;oX[2]=oS*o0+oV*-oW+oU*-oY-oT*-oZ;return oX};oN.forEach=(function(){var oR=oN.create();return function(oU,oY,oZ,oX,oW,oS){var oV,oT;if(!oY){oY=4}if(!oZ){oZ=0}if(oX){oT=Math.min((oX*oY)+oZ,oU.length)}else{oT=oU.length}for(oV=oZ;oV=2&&e<=4){this.result.eleData[e][i||0]=C;return}else{if(e===0||e===5||e===6){C.sort(function(oK,T){return oK.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(oK,T){return oK.tileInfo.useZoom-T.tileInfo.useZoom})}}});var jl=(function(){var oT=new Int8Array(4);var C=new Int32Array(oT.buffer,0,1);var oO=new Float32Array(oT.buffer,0,1);function oV(o2){C[0]=o2;return oO[0]}function i(o2){oO[0]=o2;return C[0]}function oP(o2){var o4=(o2[3]<<24|o2[2]<<16|o2[1]<<8|o2[0]);var o3=oV(o4&4278190079);return o3}var oK=0;var oN=1;var oR=2;var oZ=0;var oW=1;var oU=2;var oL=9;function oS(o2,o3){var o4;if(o3%2===0){o4=[-o2[1],o2[0]]}else{o4=[o2[1],-o2[0]]}return o4}function e(o2,o3,o4){var o5=oS(o2,o3);var o6;if(o4===oN){return o5}else{if(o3===4||o3===5){o6=[o5[0]-o2[0],o5[1]-o2[1]]}else{o6=[o5[0]+o2[0],o5[1]+o2[1]]}if(o4===oK){i5.normalize(o6,o6)}return o6}}function oY(o3,o2){return Math.sqrt(Math.pow(o3[0]-o2[0],2)+Math.pow(o3[1]-o2[1],2))}function T(o6,o5,o4,o2){var o3=i5.dot(o6,o5);if(o4===oU||o4===oW){if((o2===0||o2===1)&&o3>0){return true}else{if((o2===2||o2===3)&&o3<0){return true}}}if((o2===0||o2===1)&&o3<0){return true}else{if((o2===2||o2===3)&&o3>0){return true}}return false}function oQ(o3,o8,pa){var o9=oS(o3,o8);var o5;var o7=o3;var o6=pa;var pc=[];i5.normalize(pc,[o7[0]+o6[0],o7[1]+o6[1]]);var pb=i5.dot(o9,[-pc[1],pc[0]]);if(Math.abs(pb)<0.1){pb=1}var o4=1/pb;o5=[-pc[1]*o4,pc[0]*o4];var o2=i5.dot(o3,o5);if(o2<0){i5.negate(o5,o5)}return{cos2:o2,offset:o5}}function o1(o3,o8,pa,o2){var o9=oS(o3,o8);var o7;var o6;var o5;if(o8===0||o8===1){o7=pa;o6=o3}else{o7=o3;o6=pa}if(!o7||!o6){return o9}var pc=[o7[0]+o6[0],o7[1]+o6[1]];if(pc[0]===0&&pc[1]===0){i5.normalize(pc,o6)}else{i5.normalize(pc,pc)}var pd=T(pc,o9,o2,o8);if(pd){return o9}var pb=i5.dot(o9,[-pc[1],pc[0]]);if(Math.abs(pb)<0.1){pb=1}var o4=1/pb;o5=[-pc[1]*o4,pc[0]*o4];return o5}function o0(pd,pe,o7,o6,pg,pc,o5,o8,o4,pb){var pa;var o3=0;var o2=false;pa=pc.length/oL-1;function pf(ph){if(o8 instanceof Array){ph=Math.max(0,Math.min(ph,o8.length-1));return o8[ph]}else{return o8}}oM(pe[0],pd[0],o7[0],pg,o6,4,pf(0),o4,undefined,pc,pb);pa++;o3++;oM(pe[0],pd[0],o7[0],pg,o6,5,pf(0),o4,undefined,pc,pb);pa++;o3++;for(var o9=0;o90){o9+=oY(pf[o8],pf[o8-1]);o6.push(o9*10)}if(o8!==pf.length-1){var o5=[pf[o8+1][0]-pf[o8][0],pf[o8+1][1]-pf[o8][1]];var pi=[];if(o5[0]===0&&o5[1]===0){pi=[0,0]}else{i5.normalize(pi,o5)}pc[pc.length]=[pi[0],pi[1]]}}var ph;if(o7[0] instanceof Array){for(var o8=0;o80){this.zoomState=1}else{if(e<0){this.zoomState=-1}}this.lastZoom=i;return this.zoomState},releaseOutViewTileData:function(e){var oK=this.map._workerMgr.releasePendingData(e);for(var T=0,C=oK.length;T=0.5){o7=true}else{if(oS<0.5&&e>=0.5){o7=true}else{if(oS>=0.5&&e<0.5){o7=true}}}if(o7){this.cacheDataCollideLabels(0)}this.LAST_CALC_ZOOM=oQ}else{if(this.tileLabels.length>0){this.cacheDataCollideLabels(hv.Browser.ie?50:30)}}},loadVectorLayerData:function(oP){this.map.temp.isPermitSpotOver=false;var oO=this;function oN(i,oS){var oV=oO.tileCache.getData(oS);if(!oV){return}if(!i||i.error){if(i.event){var oR=JSON.parse(i.event.msg||"{}");if(oR.status===403){if(c0.business===0&&c0.unauth===1){oO.watermarkTileKeys.push(oS);oO._checkTilesLoaded()}}cv.fetchDebug&&cv.fetchDebug.sendError({title:i.event.title,msg:i.event.msg,category:cv.fetchDebug.category.AJAX,level:cv.fetchDebug.levels.ERROR,url:i.event.title})}bj=true;if(oO.map.stickySpamCtrl&&c0.business===0&&c0.unauth===1){dZ(jC,{from:"vtile"});oO.map.stickySpamCtrl.update(jC)}var oU=new ix("ontileloaderror");i=i||{};oU.error=i.error||"";oU.message=i.message||"";oO.map.fire(oU);if(c0.business!==0||c0.unauth!==1){oV.status="init";oV.reloadTimer=setTimeout(function(){if(oV.retry<3){oV.retry++;oV.status="loading";oO.loadVectorTileData(i.tileInfo,oN)}else{oO.tileCache.removeData(oS);oO._checkTilesLoaded()}},4000)}if(oO.map._featureMgr){oO.map._featureMgr.clearData(oO.drawIndex)}oO.getVectorLayerDataFromCache(oO.curViewTilesInfo,oO.getZoomState());return}if(oV.reloadTimer){clearTimeout(oV.reloadTimer);oV.reloadTimer=null}var oQ=oO.map._displayOptions.language||"zh";var oT=i.tileInfo.language||"zh";if(oT!==oQ){oO.tileCache.removeData(oS);oO._checkTilesLoaded();return}oO.callbackDataQueue.push([i,oS]);if(oO.processDataTimer){return}oO.processDataTimer=setTimeout(function(){while(oO.callbackDataQueue.length>0){var oX=oO.callbackDataQueue.shift();var oY=oO.map._displayOptions.language||"zh";var oZ=oX[0].tileInfo.language||"zh";if(oZ!==oY){oO.tileCache.removeData(oS)}else{oO.vectorTileDataCbk(oX[0],oX[1])}oO._checkTilesLoaded()}if(oO.map._featureMgr){oO.map._featureMgr.clearData(oO.drawIndex)}oO.getVectorLayerDataFromCache(oO.curViewTilesInfo,oO.getZoomState());var oW=new ix("onrefresh");oW.source="webgllayer";oO.map.dispatchEvent(oW);oO.processDataTimer=null},200)}for(var oM=0,oK=oP.length;oM0){var oR=Math.pow(2,oT);if(Math.floor(oU.col/oR)===oL&&Math.floor(oU.row/oR)===oW){if(!this.thumbCache[oU.key]){this.map._featureMgr.setData(oU.tile,this.drawIndex,1);this.thumbCache[oU.key]=true;oX=true}}}else{if(oT<0){var oQ=Math.pow(2,-oT);if(Math.floor(oL/oQ)===oU.col&&Math.floor(oW/oQ)===oU.row){if(!C||oU.zoom>C.zoom){C=oU}}}}}}if(!oM&&C){var oK=this.getTileKey(T);if(!this.thumbCache[oK]&&this._placeUpsampleThumb(C.tile,C.tile.tileInfo,oK,T)){this.thumbCache[oK]=true;oX=true}}}if(oX){this.map._featureMgr.sortThumbData(this.drawIndex);var oS=this.map._featureMgr.result.bkData[this.drawIndex];if(oS&&oS[1]&&oS[1].length>1){oS[1].sort(function(oY,i){return oY.tileInfo.useZoom-i.tileInfo.useZoom})}}},_recordScreenTiles:function(){var oP=this.map._featureMgr.result.bkData[this.drawIndex];if(!oP){return}var oN={};var oK=0;for(var oQ=0;oQ<3;oQ++){var e=oP[oQ];if(!e){continue}for(var T=0;T0){return}this._lastScreenTiles=oN},loadVectorTileData:function(oW,oX){var oK=oW.col;var oL=oW.row;var e=oW.zoom;var oU=oW.baseTileSize;var T=this.getTilesUrl(new hV(oK,oL),e,oU);var oM=this.map.getPrivateRegions();if(!this.processData&&this.map.getPrivateStatus()&&oM){var oS=oW.useZoom;var oR=this.tileType.getMercatorSize(oS);var oQ=oK*oR;var oP=oL*oR;var oT=new d9(oQ+oR/2,oP+oR/2);var oO=new lz(new d9(oQ,oP),new d9(oQ+oR,oP+oR));var oN=ja()>=1.5?2:1;for(var oV=0;oV65536){o5.renderData.base.push({type:"line",data:[jl.toTileSolidLineVertices(pb,4000),new Uint16Array(pe)]});pb=[];pe=[]}for(var o4=0;o40){oL=oK.labelProcessor.collisionTest(oL,-1)}}else{if(oM||oO){if(this._collisionTimer){if(!oM){clearTimeout(this._collisionTimer)}else{if(Date.now()-oK.lastCollisionTestTime>500){oK.lastCollisionTestTime=Date.now()}else{clearTimeout(this._collisionTimer)}}}this._collisionTimer=setTimeout(function(){if(oK&&!oK.map.tileMgr&&!oK.map.tileMgr.isExitTileLayer(oK)){oK._collisionTimer=null;return}oL=oK.labelProcessor.collisionTest(oK.tileLabels);if(oL){if(oK._isInnerLayer&&oK.map.stencil&&oK.map.stencil.isPoiMask){var oP=oK.isPoiInPolygon(oL);i.setLabelData(oP,oK.drawIndex)}else{i.setLabelData(oL,oK.drawIndex)}}oK.updateLabels();oK.map.dispatchEvent(new ix("onrefresh"));oK._collisionTimer=null},60);return}else{oL=oK.labelProcessor.getCachedLabels(oK.tileLabels)}}if(oL){if(oK._isInnerLayer&&oK.map.stencil&&oK.map.stencil.isPoiMask){var oN=oK.isPoiInPolygon(oL);i.setLabelData(oN,oK.drawIndex)}else{i.setLabelData(oL,oK.drawIndex)}}oK.updateLabels();oK.map.dispatchEvent(new ix("onrefresh"))}if(!C){clearTimeout(oK.cacheLabelTimer);T()}else{if(oK.cacheLabelTimer){return}oK.cacheLabelTimer=setTimeout(function e(){T()},C)}},isPoiInPolygon:function(C){var o5=this;var oT=o5.map.stencil;var oL=o5.map._featureMgr.result.eleData[9];var oK=[];var T=false;for(var oZ=0;oZ1){T=true;for(var oW=0;oW0){var T=oL.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)}oL.temp.isPermitSpotOver=false;this.labelProcessor.curSpotAdded=false}},loadRasterLayerData:function(oR,T){this.thumbCache={};var oS=this.getZoomState();if(T){var oQ=this.useThumbData&&this.thumbUpsample&&this.tileType.getName()==="xyz";var oO=oQ?[]:null;for(var oM=0,oK=oR.length;oM-1){C+="&ak="+hj+"&is_has_bmap_proxy="+k1+"&from=gl"}var oL=this.getTileKey(i);this.loadTileImage(C,oL,e,i)},loadTileImage:function(oN,C,oL,e){var T=new Image();T.crossOrigin="anonymous";T.tileInfo=e;var oK;var oM=this;function oO(){if(oM.retry){oK&&clearInterval(oK);oK=null}}if(this.retry){var i=1;oK=setInterval(function(){if(i>3){oO();return}if(e.tileLoadFunction){e.tileLoadFunction(T,oN)}else{T.src=oN}i++},this.retryTime)}T.onload=function(){oO();oL&&oL(this,C)};T.onerror=function(){oO();cv.fetchDebug&&cv.fetchDebug.sendError({title:oN,msg:oN,category:cv.fetchDebug.category.RESOURCE,level:cv.fetchDebug.levels.ERROR,url:oN});oL&&oL(null,C)};if(e.tileLoadFunction){e.tileLoadFunction(T,oN)}else{T.src=oN}return T},_calcXYZTileVertex:function(oO,o7,C){var ps=oO.zoom;var oN=oO.col;var oV=oO.row;if(!oO.preciseVertex){return[0,0,C,0,0,o7,0,C,1,0,o7,o7,C,1,1,0,0,C,0,0,o7,o7,C,1,1,0,o7,C,0,1]}var pk=fA.resolutions[Math.floor(ps)];var o8=fA.gridSize;var pp=fA.origin;var o1=Math.pow(2,(18-ps));var pj=pp[0]+oN*o8[0]*pk;var o2=pp[1]-oV*o8[1]*pk;var o3=pj+o8[0]*pk;var pi=o2-o8[1]*pk;if(this.reproject){var pn=fA.toEPSG4326([pj,pi]);var pf=fA.toEPSG4326([o3,o2]);var pl=Math.max(Math.abs(pf[0]-pn[0]),Math.abs(pf[1]-pn[1]));var oM=Math.max(1,Math.min(16,Math.ceil(pl/0.5)));var pc=oM+1;var py=(o3-pj)/oM,px=(o2-pi)/oM;var oT=fA.wgs84ToBd09mc(pn[0],pn[1]);var o5=oT[0]/o1;var o4=oT[1]/o1;oO._tileLBBdPixel=[o5,o4];var oS=this.reprojectSourceCRS==="EPSG4326";var oL=oS?(pf[0]-pn[0]):0;var pr=oS?(pf[1]-pn[1]):0;var oP=pc*pc;var oR=new Float64Array(oP);var oQ=new Float64Array(oP);var oX=new Float64Array(oP);var oU=new Float64Array(oP);for(var T=0;T<=oM;T++){for(var oK=0;oK<=oM;oK++){var pe=fA.toEPSG4326([pj+py*oK,pi+px*T]);var pm=fA.wgs84ToBd09mc(pe[0],pe[1]);var pw=T*pc+oK;oR[pw]=pm[0]/o1-o5;oQ[pw]=pm[1]/o1-o4;if(oS){oX[pw]=(pe[0]-pn[0])/oL;oU[pw]=(pe[1]-pn[1])/pr}else{oX[pw]=oK/oM;oU[pw]=T/oM}}}var pv=oM*oM*30;var pu=new Float32Array(pv);var o0=0;for(var o9=0;o90){var oQ=T.dataIndex/256;i.renderData={vertexAll:[0,0,this.height,0,0,T.dataIndex,0,this.height,oQ-oL,0,T.dataIndex,256,this.height,oQ-oL,1,0,0,this.height,0,0,T.dataIndex,256,this.height,oQ-oL,1,0,256,this.height,0,1]}}else{var e=-T.dataIndex;var oQ=e/256;i.renderData={vertexAll:[e,0,this.height,oQ+oL,0,256,0,this.height,1,0,256,256,this.height,1,1,e,0,this.height,oQ+oL,0,256,256,this.height,1,1,e,256,this.height,oQ+oL,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(oM,i,oP)}},setRasterTileData:function(oK,e,T){e.status="ready";if(this.thumbUpsample){e.key=oK}this.tileCache.setData(oK,e);if(this.tileType.getName()==="xyz"&&this.useThumbData&&this.thumbUpsample&&this._lastScreenTiles&&e.tileInfo){this._lastScreenTiles[oK]={key:oK,col:e.tileInfo.col,row:e.tileInfo.row,zoom:e.tileInfo.zoom,tile:e}}var C=false;if(this.curViewTilesInfo[T]){e.dataType=jK;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 ix("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 ix("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 ix("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 ix("onrefresh"))}}e._checkTileLoadedTimer=null},60)}},_checkTilesLoaded:function(){this._checkLayerTilesLoaded();this.numLoading--;if(this.map.firstTileLoad===false){if(K.apiVersionIsGL()){this.map.dispatchEvent(new ix("onfirsttilesloaded"));this.map.dispatchEvent(new ix("onfirsttileloaded"))}else{if(!this.map._firstTileLoadedFired){this.map._firstTileLoadedFired=true;this.map.dispatchEvent(new ix("onfirsttilesloaded"));this.map.dispatchEvent(new ix("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 ix("ontilesloaded"));e.map.firstTileLoad=false}e._checkLoadedTimer=null},60);if(c0.business===0&&c0.unauth===1){e.shuffleTiles()}}},shuffleTiles:function(){var oM=this.watermarkTileKeys;for(var oL=oM.length-1;oL>0;oL--){var oK=Math.floor(Math.random()*(oL+1));var T=oM[oL];oM[oL]=oM[oK];oM[oK]=T}var C=Math.floor(oM.length*c0.watermark_ratio);var oN=[];for(var e=0;e9&&!e.guid){return false}if(e.zoom<=9&&!e.name&&!e.guid){return false}return true}};var by=5;var m4=4;var jD=3;var aa=2;var gM=1;var kR=0;function aY(i){this._ratio=ja();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()})}hv.extend(aY.prototype,{_loadIcons:function(C,oP,oL){var T=0;var oM=this;var oK=this._map.config.style;for(var oN in C){T++;var oO=new Image();oO.id=oN;oO.crossOrigin="anonymous";oO.onload=function(){oM._iconCache[this.id].loaded=true;T--;if(T===0){oP()}this.onload=null};oO.onerror=function(){oM._iconCache[this.id]=null;T--;if(T===0){oP()}this.onerror=null};if(!oL){var e=K.getIconSetPath(oK)+oN+".png";var i=cw();if(i&&i.udt){e+="?udt="+i.udt}}else{var e=oN}oO.src=e;this._iconCache[oN]={loaded:false,image:oO}}},_getEmptyDrawingCanvas:function(){for(var C=0;C0){while(oL0){oL=0;while(oL0){oL=0;while(oL0){o3=this._drawEachTypeOfLabels(oW,C,o5,oO,oN,oS,o0);o5=o3.curStyleId;oO=o3.curX;oN=o3.curY;oS=o3.curLineHeight;o1=o3.overHeight||o1}if(!o1&&oX.length>0){o3=this._drawEachTypeOfLabels(oW,oX,o5,oO,oN,oS,o0);o5=o3.curStyleId;oO=o3.curX;oN=o3.curY;oS=o3.curLineHeight;o1=o3.overHeight||o1}if(!o1&&o6>0){var o4=this;this._loadIcons(oU,function(){o3=o4._drawEachTypeOfLabels(oW,oV,o5,oO,oN,oS,o0);o5=o3.curStyleId;oO=o3.curX;oN=o3.curY;oN+=o4._bufferSpan[1];oS=o3.curLineHeight;o1=o1||o3.overHeight;var i=o4._generateEachLabelCanvas(e,oN,oR,oX,C,o2);T(i[0],i[1])});return}oN+=this._bufferSpan[1];var oP=this._generateEachLabelCanvas(e,oN,oR,oX,C,o2);T(oP[0],oP[1])},drawCustomLabelsOnCanvas:function(oO,oN,C){if(oO.length===0){oN();return}var oL={};var oK=false;for(var T=0;T0){oN[oK].textPos=null;oN[oK].iconPos=null}continue}this._updateFixedLabelCoords(oN[oK],oL);this._addFixedLabelBounds(oN[oK])}for(var oK=0;oK0){oP[oK].textPos=null;oP[oK].iconPos=null}continue}this._updateFixedLabelCoords(oP[oK],oL);this._addFixedLabelBounds(oP[oK])}for(var oK=0;oK4){pu=4}var pe=[];var o0=[];var pa=0;if(oK&&!oK[pw]){oK[pw]={}}var oU=oV+pu*2+pz[0]*2;var pf=oU;if(oN.containDescendings){pf+=4}if(pu===0){pf+=2}if(oN.textOnIcon){pf=Math.max(pf,oN.iconSize[1])}if(pw!==C||pf>pd){C=pw;if(ph>=10&&ph%10===0){o2.font=ph*10+" "+oV+"px "+this._map.config.fontFamily}else{o2.font=oV+"px "+this._map.config.fontFamily}if(pf>pd){var pb=pf-pd;pd+=pb;o3+=pb}if(pu>0){o2.lineWidth=pu*2;o2.strokeStyle=oM}o2.fillStyle=po}if(oN.type==="line"){var oP=pc.split("");var o6=[];for(var py=0;pythis._drawingCanvasHeight){for(var px=0;pxthis._drawingCanvasWidth){o4=0+this._bufferSpan[0];o3+=pf;o3+=this._bufferSpan[1];pd=pf;if(o3+pf+this._bufferSpan[1]>this._drawingCanvasHeight){for(var px=0;px0){T+=pu;pq-=Math.round(pu/2);o2.strokeText(pr,o4,o3)}o2.fillText(pr,o4,o3);var pn=[T,pf];o7=[Math.round(pn[0]/2),Math.round(pn[1]/2)];if(oN.containDescendings){pi=[pq,o3-pf+4]}else{pi=[pq,o3-pf]}oK[pw][pr]={displaySize:o7,curWordPosition:pi,totalHeight:pa};o6.push(pr);o4+=T}pe.push(o7);o0.push(pi)}pa=Math.round(pe[0][1])}else{if(oK[pw][pc]){var oX=oK[pw][pc];pe=oX.textSize;o0=oX.labelImagePosition;pa=oX.totalHeight}else{var oW=pc.split("\\");if(oW.length>1&&oN.textOnIcon){var pA=0;var pv=0;var pD=[];var o8=8;for(var py=0;pypA){pA=oT}pD.push(Math.round(oT/2));pv+=pf}var oQ=pA+2*o8;var pt=pv+2*o8;if(o4+oQ>this._drawingCanvasWidth){o4=0+this._bufferSpan[0];o3+=pd;o3+=this._bufferSpan[1]}var pb=pt-pd;if(pb>0){o3+=pb;pd+=pb}if(o3+this._bufferSpan[1]>this._drawingCanvasHeight){return{overHeight:true,curX:o4,curY:o3-(pb>0?pb:0),curLineHeight:pd-(pb>0?pb:0),styleId:pw}}var pm=o4;var o9=o3-pt;var e=Math.round(oQ/2);var oZ=this._iconCache[oN.icon].image;this.drawStretchedIcon(o2,oZ,[pm,o9],o8,pA,pv);for(var py=0;pythis._drawingCanvasWidth&&oW.length==1){oW[py]=pc.substring(0,Math.floor(pc.length/2));oW[py+1]=pc.substring(Math.floor(pc.length/2));py--;continue}var oQ=oT;var oL=0;if(oN.textOnIcon){oL=10;oQ+=oL*2;if(oN.styleId===519){oQ=oN.iconSize[0];oL=Math.round((oQ-oT)/2)}}if(o4+oQ>this._drawingCanvasWidth){var o5=o3+pf+this._bufferSpan[1];if(o5+this._bufferSpan[1]>this._drawingCanvasHeight){return{overHeight:true,curX:o4,curY:o3,curLineHeight:pd,styleId:pw}}o3=o5;o4=0+this._bufferSpan[0];pd=pf}else{if(o3+this._bufferSpan[1]>this._drawingCanvasHeight){return{overHeight:true,curX:o4,curY:o3,curLineHeight:pd,styleId:pw}}}var pm=o4;var o9=o3-pf;var pl=o4;var pk=o3;if(oN.containDescendings){pk-=4}if(oN.textOnIcon){var pg=false;var oZ=this._iconCache[oN.icon].image;var pj=oN.iconSize.concat([]);if(oU>=pj[1]){pj[1]=oU;pg=true;pf+=oL*2;var pb=pf-pd;if(pb>0){if(o3+pb+this._bufferSpan[1]>this._drawingCanvasHeight){return{overHeight:true,curX:o4,curY:o3,curLineHeight:pd,styleId:pw}}o3+=pb;pd=pf;pk+=(pb-oL);o9+=(pb-oL*2)}else{pk-=oL;o9-=oL*2}}if(oT>=pj[0]){pj[0]=oT}if(oN.styleId===519){o2.drawImage(oZ,0,0,pj[0],pj[1],pm,o9,pj[0],pj[1])}else{if(oN.noStretch){pk-=oU/2;var o1=oT+oL*2;o2.drawImage(oZ,0,0,oZ.width,oZ.height,pm,o9,o1,oU)}else{if(pg){this.drawStretchedIcon(o2,oZ,[pm,o9],oL,oT,pj[1])}else{this.draw3StretchedIcon(o2,oZ,[pm,o9],oL,oT,pj[1])}}}pl+=oL;if(oN.iconSize[1]>oU){pk-=(oN.iconSize[1]-oU)/2-1;if(oN.containDescendings){pk+=4}}}if(pu>0){if(pw===71028){pf-=2}if(pw===32){pf-=2}o2.strokeText(pc,pl,pk)}o2.fillText(pc,pl,pk);var oO=[oQ,pf];var o7=[Math.round(oO[0]/2),Math.round(oO[1]/2)];pe.push(o7);o0.push([pm,o9]);pa+=Math.round(o7[1]);o4+=oQ}}oK[pw][pc]={textSize:pe,labelImagePosition:o0,totalHeight:pa}}}oN.textSize=pe;oN.labelImagePosition=o0;oN.totalHeight=pa;return{curX:o4,curY:o3,curLineHeight:pd,styleId:pw}},drawStretchedIcon:function(e,C,T,oM,oN,i){var oL=T[0];var oK=T[1];e.drawImage(C,0,0,oM,oM,oL,oK,oM,oM);e.drawImage(C,oM,0,1,oM,oL+oM,oK,oN,oM);e.drawImage(C,C.width-oM,0,oM,oM,oL+oN+oM,oK,oM,oM);e.drawImage(C,0,oM,oM,1,oL,oK+oM,oM,i);e.drawImage(C,oM,oM,1,1,oL+oM,oK+oM,oN,i);e.drawImage(C,C.width-oM,oM,oM,1,oL+oN+oM,oK+oM,oM,i);e.drawImage(C,0,C.height-oM,oM,oM,oL,oK+i+oM,oM,oM);e.drawImage(C,oM,C.height-oM,1,oM,oL+oM,oK+i+oM,oN,oM);e.drawImage(C,C.width-oM,C.height-oM,oM,oM,oL+oN+oM,oK+i+oM,oM,oM)},draw3StretchedIcon:function(e,i,C,oL,oN,oM){var oK=C[0];var T=C[1];e.drawImage(i,0,0,oL,i.height,oK,T,oL,i.height);e.drawImage(i,oL,0,1,i.height,oK+oL,T,oN,i.height);e.drawImage(i,i.width-oL,0,oL,i.height,oK+oL+oN,T,oL,i.height)},_updateFixedLabelCoords:function(oK,oZ){if(oZ===0){return}var oU=[];var o6=[];var o7=0;var oX=oK.totalHeight;var pf=oK.textSize.length;var oL=oK.direction;if(typeof oL!=="number"){oL=0}for(var o8=0;o8C){C=oT}if(oRe){e=oR}}}if(oP.custom&&oP.style.iconSize&&!oP.name){var oQ=oP.style.iconSize;var oS=oP.direction;switch(oS){case m4:oL=-Math.round(oQ[0]/2);T=-Math.round(oQ[1]/2);C=Math.round(oQ[0]/2);e=Math.round(oQ[1]/2);break;case aa:oL=-Math.round(oQ[0]/2);T=0;C=Math.round(oQ[0]/2);e=oQ[1];break}}if(oP.textPos){var oM=oP.textPos["vertex"];for(var oO=0,oK=oM.length;oOC){C=oT}if(oRe){e=oR}}}oP.bds=[oL,T,C,e]},_updateLineLabelCoords:function(o1,oQ){if(oQ===0){return}var T=o1.wordsInfo;var oY=o1.wordCount;if(!o1.labelImagePosition){return}var oS=this._map._displayOptions.isEn;var oT=o1.labelImagePosition.slice(0);var o2=o1.textSize.slice(0);if(o1.reverse&&!oS){oT.reverse();o2.reverse()}var pb=1000;var o8=1000;var o9=-1000;var o7=-1000;for(var o3=0;o3o9){o9=o0}if(oLo7){o7=oN}}if(!oS){o1.bds=[pb,o8,o9,o7]}}});var iV={0:"00000000",16:"00010000",32:"00100000",48:"00110000",64:"01000000",96:"01100000"};function gw(oL,oN,T){var oK=oL.bds;if(!oK){return false}var oM=oL.tracer;var C;if(oM){if(!iV[oM]){C=oM.toString(2);if(C.length<8){C=new Array(8-C.length+1).join("0")+C}iV[oM]=C}C=iV[oM];var e=oG.mapZoomStartZoomMapping[oN];var oO=oN>20?21:oN;return C[oO-e]==="1"}var i=oL.displayRange;if(T>=i[0]&&T<=i[1]){return true}return false}function na(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=ja();this._useRound=true;this._sharpenRender=false;if(this._ratio>li.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 a1((c9()||hv.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()}hv.extend(na.prototype,{bind:function(){var C=this.map;var i=this;C.addEventListener("mapstatusbusy_inner",function(T){i._mapIsMoving=true;if(i._ratio>li.HIGH_RES_MIN_RATIO){i._sharpenRender=false}else{i._useRound=false}});C.addEventListener("mapstatusidle_inner",function(T){if(i._ratio>li.HIGH_RES_MIN_RATIO){i._sharpenRender=true}else{i._useRound=true}i._mapIsMoving=false});C.addEventListener("onspotmouseover",function(oL){if(!this.temp.isPermitSpotOver||this.config.enableIconHighlight===false){return}if(oL.spots.length>0){var oK=oL.spots[0].userdata.uid;var oM=oL.spots[0].userdata.tilePosStr;var T=i.getLabelByUid(oK,oM);T&&T.formatedData&&i._toHighlightColor(T.formatedData)}});C.addEventListener("onspotmouseout",function(oL){if(!this.temp.isPermitSpotOver){return}if(oL.spots.length>0){var oK=oL.spots[0].userdata.uid;var oM=oL.spots[0].userdata.tilePosStr;var T=i.getLabelByUid(oK,oM);T&&T.formatedData&&i._toDefaultColor(T.formatedData)}});C.addEventListener("spotclick",function(oL){if(oL.spots&&oL.spots.length>0){if(oL.spots[0].userdata.zoom<10){return}var oK=oL.spots[0].userdata.uid;var oM=oL.spots[0].userdata.tilePosStr;if(i.currentSelectedLabel&&(i.currentSelectedLabel.uid!==oK||i.currentSelectedLabel.tilePosStr!==oM)){i._recoverNormalState()}var T=i.getLabelByUid(oK,oM);T&&i._changeBaseMapState(T)}else{i._recoverNormalState()}});C.on("spot_status_reset",function(){i._recoverNormalState()});C.on("spot_highlight",function(oK){var T=i.getLabelByUid(oK.uid,oK.tilePosStr);T&&T.formatedData&&i._toHighlightColor(T.formatedData)});C.addEventListener("mousemove",function(T){if(i.curSpotAdded){return}if(this.currentOperation!==gp.idle||i._mapIsMoving===true){return}i._refreshSpotData();this.temp.isPermitSpotOver=true;i.curSpotAdded=true});if(c9()){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&&pP<45)||(pP>=315&&pP<360)){oZ=pH;oY=pG;pV=o7;pU=o5}else{if(pP>=45&&pP<135){oZ=pG;oY=-o7;pV=o5;pU=-pH}else{if(pP>=135&&pP<225){oZ=-o7;oY=-o5;pV=-pH;pU=-pG}else{if(pP>=225&&pP<315){oZ=-o5;oY=pH;pV=-pG;pU=o7}}}}pF._tempBds=[pZ+oZ,pY+oY,pZ+pV,pY+pU];var pN=o0.pixelToPointIn(new hV(pF._tempBds[0],pE.y+oY),{zoom:pc});var pC=o0.pixelToPointIn(new hV(pF._tempBds[2],pE.y+pU),{zoom:pc});pF._mcBds=[pN,pC];pk.push(pF)}}else{for(var pj=0,o2=pW.length;pj0){pT=6}pQ=o0.getZoom();if(pQ>=8&&pQ<9){pQ<8.5?(pT=6):(pT=3)}if(o0._displayOptions.labelMargin>0){pT=o0._displayOptions.labelMargin}var px=2;if(pQ<6&&pQ>=5){px=-1}for(var pA=0,oT=pk.length;pAp1[2]+pT+px||pI[3]+pT+pxp1[3]+pT+px)){pS._intersectIdx.push(pq)}}}for(var py=0,oS=pk.length;py=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 oL=false;for(var T=0;Te){oR.isDel=true}if(oR.isDel){continue}var oZ=oR.pt;var C=(oR.hue||0)?jp(oR.hue):0;var T=oR.iconPos;if(T&&T.texcoord){if(!T.rtVertex){T.rtVertex=[];o0=T.vertex;var oO=my(oZ.lng);var oY=my(oZ.lat);T.rtVertex=[oO[0],oY[0],oO[1],oY[1],0,o0[0],o0[1],0,0,T.texcoord[0],T.texcoord[1],C,oO[0],oY[0],oO[1],oY[1],0,o0[2],o0[3],0,0,T.texcoord[2],T.texcoord[3],C,oO[0],oY[0],oO[1],oY[1],0,o0[4],o0[5],0,0,T.texcoord[4],T.texcoord[5],C,oO[0],oY[0],oO[1],oY[1],0,o0[6],o0[7],0,0,T.texcoord[6],T.texcoord[7],C,oO[0],oY[0],oO[1],oY[1],0,o0[8],o0[9],0,0,T.texcoord[8],T.texcoord[9],C,oO[0],oY[0],oO[1],oY[1],0,o0[10],o0[11],0,0,T.texcoord[10],T.texcoord[11],C]}}if(!oR.textOnIcon){C=0}var oX=oR.textPos;if(oX){if(!oX.rtVertex){oX.rtVertex=[];o0=oX.vertex;var oM=oX.rtVertex;var oU=my(oZ.lng);var o3=my(oZ.lat);var o2=my(oK);for(var oT=0,o1=o0.length;oT0&&o4[0]){oZ=o4[0].angle||0}var pg=this.calcLoopHeading(oZ-pa);if(oM&&pg>90&&pg<270){pc=180;oY=true}if(!oM&&pg>45&&pg<315){if(pg>45&&pg<=135){pc=270}else{if(pg>135&&pg<=225){pc=180}else{if(pg>225&&pg<315){pc=90}}}if(o2>225&&o2<=315&&pc<=180){oY=true}else{if((o2>=0&&o2<=45||o2>=315&&o2<360)&&pc>=180){oY=true}}}}if(oM){if(oU===oY){continue}else{oU=oY}if(oY){o4=oP.reverse_wordsInfo}}for(var pi=0,oV=o4.length;pi-1&&C<14)||C<=13){oS=oT[oL][3];oQ=oT[oL][4]}var oR=this.calcLineLabelOffsetAndAngle(e,oS,oN,oQ,C);var oP=oT[oL][5];for(var oM=0;oM=(oZ.length/2-1)){return false}if(oQ===-1&&o8<=0){return false}oW=[oZ[o8*2],oZ[o8*2+1]];oU=[oZ[(o8+oQ)*2],oZ[(o8+oQ)*2+1]];o7=oW;return true}var o3=1;for(var o6=oO;oQ===1?o6<=oM:o6>=0;oQ===1?o6++:o6--){var o9=e[o6];var o1=o9.size[0]*T;var oX=o9.size[1]*T;while(o3===1){var pa=o5[o8+(oQ===1?0:oQ)];var pb=oW;if(C.length){var oK=C[C.length-1];pb=oK.mc;var oL=this.calculateAngleDifference(pb,o7,oU);if(oL>0&&oL<90){o3=0;break}}var oN=this.linearEquationAndNextPoint(oW,oU,o7,pb,oT,o1/2,oS);if(!oN){oS+=o1/2}else{if(oN.length===1){oT=oN[0];if(!o4()){o3=0;break}}else{oS=0;var oP=[(oN[0]-o0)*i,(oN[1]-oY)*i];o7=[oN[2],oN[3]];C.push(Object.assign({offset:oP,angle:pa,z:0,mc:[oN[0],oN[1]],},o9));oT=0;break}}}if(o3===0){break}oV++}if(oVC){C=oN}if(Te){e=oK}}return[oM,oL,C,e]},calcWordsInfoMCBds:function(o0,oR,oS,oP){var i=o0.getHeading();i=this.calcLoopHeading(i);var oQ=o0.height;var oT=oP.pt;var oO=o0.pointToPixelIn(oT,{zoom:oR,useRound:this._useRound});var oV=oO.x+oS;var oU=oQ-oO.y;var T=oP.bds;var oM=T[0];var oK=T[1];var oL=T[2];var C=T[3];var oZ=oM;var oY=oK;var oX=oL;var oW=C;if((i>=0&&i<45)||(i>=315&&i<360)){oZ=oM;oY=oK;oX=oL;oW=C}else{if(i>=45&&i<135){oZ=oK;oY=-oL;oX=C;oW=-oM}else{if(i>=135&&i<225){oZ=-oL;oY=-C;oX=-oM;oW=-oK}else{if(i>=225&&i<315){oZ=-C;oY=oM;oX=-oK;oW=oL}}}}oP._tempBds=[oV+oZ,oU+oY,oV+oX,oU+oW];var oN=o0.pixelToPointIn(new hV(oP._tempBds[0],oO.y+oY),{zoom:oR});var e=o0.pixelToPointIn(new hV(oP._tempBds[2],oO.y+oW),{zoom:oR});oP._mcBds=[oN,e]},calcLoopHeading:function(e){while(e>=360){e-=360}while(e<0){e+=360}return e},fixDataFormat:function(oS){var T=this.fixedLabelData;var e=this.lineLabelData;var C=this.highlightLabelData;var o1=0;var oN=0;var oX=0;var oY;if(this.currentSelectedLabel){var oM=this.getLabelByUid(this.currentSelectedLabel.guid,this.currentSelectedLabel.tilePosStr);if(!oM||oM.isDel){T[o1]=this.currentSelectedLabel.formatedData;o1++;if(this.map.config.enableIconHighlight!==false){C[oX]=this.currentSelectedLabel.formatedData;oX++}}}for(var oW=0;oWT)){continue}var i=oK[e].spot||this._getSpotDataFromLabel(oK[e]);if(i){this._spotData.push(i)}}},_getSpotDataFromLabel:function(C){var oL=this.map;if(!C.bds){return null}var e=C.bds.slice(0);var T=null;if(C.iconPos){T=new d9(C.pt.lng,C.pt.lat)}var i=C.name?C.name.replace("\\\\","
"):"";if(C.iconPos&&C.iconPos.iconType.indexOf("ditie")>-1&&oL.getZoom()>14){i=""}var oK={n:i,pt:new d9(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=oK;return oK},drawLabelsOnCanvas:function(i,e){if(this._labelTextCanvas){this._labelTextCanvas.drawLabelsOnCanvas(i,e)}}});function m2(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()}m2.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)};m2.prototype.updateLabels=function(oM){var oQ=this._map.tileMgr.getLabelTextCanvas();var C=this._map;var oO=this;var oN=eR();if(oM&&oM.model==="mvt"){var oS=oM.data;var oR="mvt_"+oM.index;if(!this._task[oR]){this._task[oR]=[oN]}else{this._task[oR].push(oN)}}else{var oS=C._customTileLabels;var oR="custom";if(!this._task[oR]){this._task[oR]=[oN]}else{this._task[oR].push(oN)}}var oL=JSON.parse(JSON.stringify(oS));for(var oK=0;oK2){e=2}this._workerNum=e;this.arrWorker=[];this.ratio=ja();this.wordSpaceRatio=this.ratio;this.textSizeRatio=hQ.devicePixelRatio>1?2:1;if(typeof this.map.config.style==="string"){this.stringifiedCustomStyleInfo=null;this.stringifiedCustomStyleInfoZoom=[];this.stringifiedAreaStyleInfo=null}h8.canUseWebAssembly(function(T){var oN;if(T){oN=(window.location.protocol === "http:" ? "http:" : "https:") + "//" + window.location.host + "/bmap-api/res/webgl/10/worker_wasm_g0l1oe.js"}else{oN=(window.location.protocol === "http:" ? "http:" : "https:") + "//" + window.location.host + "/bmap-api/res/webgl/10/worker_asm_3u43mq.js"}i._onWorkerMessage=function oL(oR){if(oR.data&&oR.data.action==="wasm_alloc_failed"){i._fallbackToAsm();return}if(oR.data){this._cbk&&this._cbk(oR.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 oT=i.arrPendingData.shift();var oQ=oT.cbk;i.loadTileData(oT.url,oT.tileInfo,oT.tileKey,oQ)}var oS=new ix("onrefresh");oS.source="workermgr";C.fire(oS)};for(var oM=0;oM0){for(var oK=0;oK=0;oK--){T[oK]=null}i.stringifiedIndoorStyle=null;i.stringifiedCustomStyleInfo=null;i.stringifiedCustomStyleInfoZoom=[];i.stringifiedAreaStyleInfo=null;var oL=Object.keys(i);for(var oK=0;oK-1||oL[oK].indexOf("stringifiedIconSetInfo")>-1){delete i[oL[oK]]}}})},_fallbackToAsm:function(){var oO=this;if(oO._isAsm||oO._fallingBack){return}oO._fallingBack=true;oO._isAsm=true;window.disableWebAssembly=true;for(var oM=0;oM0){for(var oK=0;oK=0;oL--){var oN=oM[oL];var e=oN.tileInfo;if(C.tileTypeName!==e.tileTypeName){continue}var oK="id_"+e.col+"_"+e.row+"_"+e.zoom;if(!C[oK]){oM.splice(oL,1);T.push(e)}}return T},loadTileData:function(i,T,oU,oT){var oL=this.getIdleWorker();var e=this.map._displayOptions.poi;var oN=e?this.map._displayOptions.poiText:false;var oS=this.map._displayOptions.buildingSideGradation;if(oL){oL._cbk=oT;oL._parsingTileInfo=T;oL._parsingTileKey=oU;oL._parsingUrl=i;var oR=(this.map.mapType!==lg&&this.map.config.showVectorStreetLayer);if(this.map.parking){var oK=this.map.parking._auth}var C={action:"loadTileData",url:i,tileInfo:T,tileKey:oU,isText:oN,isPoi:e,buildingSideGradation:oS,hasPoly:oR?false:true,hasLine:oR?this.map.config.showVectorLine:true,carport:oK,isEn:this.map._displayOptions.isEn,language:this.map._displayOptions.language||"zh",referrer:window.location.href};var oQ=this.map.getMapStyleId();var oV=this.map.getAreaStyleId();var oP=!!(oQ.indexOf("custom")===0);var oO=oQ;if(oP){oO="Custom"}if(oP&&cv["customStyleInfo_"+oQ]&&!cv["customStyleInfo_"+oQ]["baseFs"]){oT()}if(!oL.isSendFS){if(!this["stringifiedFeatureStyle"+oQ]&&cv["FeatureStyle"+oQ]){this["stringifiedFeatureStyle"+oQ]=JSON.stringify(cv["FeatureStyle"+oQ])}if(!this["stringifiedIconSetInfo"+oO]){this["stringifiedIconSetInfo"+oO]=JSON.stringify(cv["iconSetInfo"+oO])}if(oP&&cv["indoorStyleInfo_"+oQ]&&cv["indoorStyleInfo_"+oQ]["baseFs"]){this.stringifiedIndoorStyle=JSON.stringify(cv["indoorStyleInfo_"+oQ]["baseFs"])}else{if(!this.stringifiedIndoorStyle){this.stringifiedIndoorStyle=JSON.stringify(cv.indoorStyleDefault)}}if(oP&&cv["customStyleInfo_"+oQ]&&cv["customStyleInfo_"+oQ]["baseFs"]){if(!this.stringifiedCustomStyleInfo){this.stringifiedCustomStyleInfo=JSON.stringify(cv["customStyleInfo_"+oQ])}}if(oP&&cv["customStyleInfo_"+oV]){if(!this.stringifiedAreaStyleInfo){this.stringifiedAreaStyleInfo=JSON.stringify(cv["customStyleInfo_"+oV])}}if(this["stringifiedFeatureStyle"+oQ]){C.featureStyle=this["stringifiedFeatureStyle"+oQ]}C.iconSetInfo=this["stringifiedIconSetInfo"+oO];if(!(oP&&!this.map.config.showCustomIndoor)){C.indoorStyle=this.stringifiedIndoorStyle}if(oP&&this.stringifiedCustomStyleInfo){C.customMapStyle=this.stringifiedCustomStyleInfo}if(oP&&this.stringifiedAreaStyleInfo){C.areaMapStyle=this.stringifiedAreaStyleInfo}C.iconInfo={wordSpaceRatio:this.wordSpaceRatio,textSizeRatio:this.textSizeRatio};C.mapStyleId=oQ;C.areaStyleId=oV;oL.isSendFS=true}oL.postMessage(C)}else{var oM={url:i,tileInfo:T,tileKey:oU,cbk:oT};this.arrPendingData.push(oM)}},setWorkerConfig:function(C){var e={action:"setWorkerConfig"};for(var oK in C){if(C.hasOwnProperty(oK)){e[oK]=C[oK]}}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 ix("onlayer_update");i.name="na";T.map.fire(i);T.loadLayersData()})}}},removeWebGLLayer:function(oL){var oM=false;for(var oK=0,T=this.tileLayers.length;oK0){this.loadLayersData()}if(this.tileLayers.length===1){this.map.setDisplayOptions({isFlat:false})}else{var e=false;for(var oK=1;oK50);if(!e){if(!this.syncLoadTimer){this.syncLoadTimer=setTimeout(function(){oK._loadLayersFromCache(T);oK.syncLoadTimer=null},40)}}else{this._loadLayersFromCache(T)}if(!oK.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(!oK.map){return}if(oK.map.viewAnimationTime){if(new Date().getTime()-oK.map.viewAnimationTime<1000){return}oK.map.viewAnimationTime=new Date().getTime()}var oM=oK.tileLayers.length;oK.tilesInfoCache={};for(var oO=0;oO0});var C=oO.length;this.tilesInfoCache={};for(var oK=0;oKhz._mc180X){var oU=hz.getSpaceDistanceInPixel(oM);pd=Math.ceil(oU/oL)}if(o6.sw.lng19505879.362428114||o6.sw.lat<-15949096.637571886){o6.ne.lat=19505879.362428114;o6.sw.lat=-15949096.637571886}var oQ=[Math.floor(o6.sw.lng/o0)-C,Math.floor(o6.sw.lat/o0)];var pp=[Math.floor(o6.ne.lng/o0)+pd,Math.floor(o6.ne.lat/o0)];oZ=oQ[0]-o9.config.extendTiles;ph=pp[0]+1+o9.config.extendTiles;o7=oQ[1]-o9.config.extendTiles;pk=pp[1]+1+o9.config.extendTiles;var oV=[];for(var oS=oZ;oS=0?oS-oN:oS+oN;var o3="id_"+o1+"_"+oX+"_"+oM;if(hz.isTileBlank(o1,oM,oL)===true){continue}if(!oV[o3]){var pm=false;var oR=256;if(pr==="web"){var o2=this._webTileRaste180(o1,oX,oM);pm=o2.combine;oR=o2.dataIndex}var oT={col:o1,row:oX,zoom:oM,useZoom:pi,loopOffsetX:0,tileSize:o8,baseTileSize:oL,mercatorSize:o0,combine:pm,dataIndex:oR,tileLoadFunction:pn.tileLoadFunction,};oV.push(oT);oV[o3]=true}}}if(this.map._tilt>0&&(pr!=="web"||o4>=8)){for(var po=0;po0&&oY.x0&&oY.ypb.lng&&pc.minYpb.lat){continue}if(!this.ifTileInMapBounds(pc,o6,pj,pq)){oV.splice(po,1);po--}}}oV.sort((function(i){return function(T,ps){return((0.4*Math.abs(T.col-i[0])+0.6*Math.abs(T.row-i[1]))-(0.4*Math.abs(ps.col-i[0])+0.6*Math.abs(ps.row-i[1])))}})([o5,oO]));oV.zoom=oM;oV.tileTypeName=pr;return oV},_webTileRaste180:function(C,oO,e){var i=this.map;var oL=false;var oM=256;var oK=hz.calcLoopParam(C,e);var oN={col:oK.col,row:oO,baseTileSize:256,zoom:e};var T=m8.prototype.tileToBound(oN,i.getCenter());if(Math.ceil(T.LL.sw.lng)*Math.floor(T.LL.ne.lng)<0){oL=true;oM=hz.pixelWidth(T.MC.sw.lng,e);if(oN.col<0){oM=-oM}}return{combine:oL,dataIndex:oM}},calcXYZTilesInfo:function(oU,oN,oT,oY,oM,o1){var oP=o1.width;var oZ=o1.height;var oO=Math.floor(oT);var oQ=null;if(oM.transform.target==="EPSG3857"){var T=fA.transformBDmcPoint(oU,oM.transform);var oK=fA.getRangeExtent(T,oP,oZ,oO,oM.transform);oQ=[oK.minX,oK.minY,oK.maxX,oK.maxY]}else{if(oM.transform.source==="BD09MC"){var T=[oU.lng,oU.lat];oQ=[oN.sw.lng,oN.sw.lat,oN.ne.lng,oN.ne.lat]}else{var T=fA.transformBDmcPoint(oU,oM.transform);var oL=fA.transformBDmcPoint(oN.ne,oM.transform);var oS=fA.transformBDmcPoint(oN.sw,oM.transform);oQ=fA.getLoopBox(T,[oS[0],oS[1],oL[0],oL[1]])}}if(!T||!oQ){return[]}oO=oO+oM.spanLevel;var C=fA.getTileRangeForExtentFactory(oQ,oO,oM.transform);var e=[];var o2=fA.getResolutionScale(oO,oM.transform);for(var oX=C.minX;oX<=C.maxX;oX++){for(var oV=C.minY;oV<=C.maxY;oV++){var oW={col:oX,row:oV,zoom:oO,useZoom:oO,tileTypeName:oY,loopOffsetX:0,tileSize:256*o2,transform:oM.transform,combine:false,dataIndex:0,tileLoadFunction:oM.tileLoadFunction,preciseVertex:oM.preciseVertex||false};e.push(oW);var oR="id_"+oX+"_"+oV+"_"+oO;e[oR]=true}}var o0=fA.getTileCoordForCoordAndZ(T,oO);e.sort((function(i){return function(o3,o4){return((0.4*Math.abs(o3.col-i[0])+0.6*Math.abs(o3.row-i[1]))-(0.4*Math.abs(o4.col-i[0])+0.6*Math.abs(o4.row-i[1])))}})([o0[1],o0[2]]));e.zoom=oO;e.tileTypeName=oY;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,oL,C,oK){var i=oL.normalizedBottomLeft;var oW=oL.normalizedTopRight;var oO=oL.normalizedTopLeft;var oM=oL.normalizedBottomRight;var T=false;var oV=new d9(e.minX,e.minY);var oS=new d9(e.maxX,e.maxY);var oN=new d9(oS.lng,oV.lat);var oT=new d9(oV.lng,oS.lat);var oQ=[oT,oS,oN,oV];for(var oU=0,oP=oQ.length;oU0){this.zoomState=1}else{if(e<0){this.zoomState=-1}}this.lastZoom=i;return this.zoomState}});function ml(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 d9(12069475.280738307,3929271.1724863998);this.iconCache=new a1((c9()||hv.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)}cv.register(function(i){if(i._renderType!=="webgl"){return}var e=i._normalLayerMgr=new ml(i);i.toFormatCoords=function(oL,oO){var oN=[];var oM=e.base;if(oO&&oO.center){oM=m8.convertLL2MC(oO.center)}for(var oK=0;oK0})},_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 oN=Date.now();var oM=e-(oN-i);var oL=this;var oK=arguments;if(T){clearTimeout(T)}if(oM<=0){C.apply(oL,oK);i=Date.now()}else{T=setTimeout(function(){C.apply(oL,oK)},oM)}}},pick:function(oO,oM){if(!this.layers.length){return false}var T=false;var C=false;for(var oL=this.layers.length-1;oL>=0;oL--){var oK=this.layers[oL];if(oK.doRender()&&oK.testEvent(oM)){C=true;if(oK.pick){if(oM==="onmousemove"||oK.hasEvent(oM)){var oN=oK.pick(oO.x,oO.y,oM)}else{continue}if(oN&&oN.dataIndex!==-1){if(oM==="onmousemove"){T=true}if(oK.hasEvent(oM)){oK.dispatcher(oO,oN,oM)}if(!oK.popEvent){break}}else{if(oK.hasEvent(oM)){oK.dispatcher(oO,oN,oM)}}}}}if(oM==="onmousemove"&&C){this.mousePointerThrottle(T)}this.map.dispatchEvent(new ix("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 oN=this.gl;T=T||oN.canvas.width;i=i||oN.canvas.height;var oL=oN.createFramebuffer();var oK=oN.createTexture();oN.bindTexture(oN.TEXTURE_2D,oK);oN.texImage2D(oN.TEXTURE_2D,0,oN.RGBA,T,i,0,oN.RGBA,oN.UNSIGNED_BYTE,null);oN.texParameteri(oN.TEXTURE_2D,oN.TEXTURE_MAG_FILTER,oN.LINEAR);oN.texParameteri(oN.TEXTURE_2D,oN.TEXTURE_MIN_FILTER,oN.LINEAR);oN.texParameteri(oN.TEXTURE_2D,oN.TEXTURE_WRAP_S,oN.CLAMP_TO_EDGE);oN.texParameteri(oN.TEXTURE_2D,oN.TEXTURE_WRAP_T,oN.CLAMP_TO_EDGE);oL.texture=oK;var C=oN.createRenderbuffer();oN.bindRenderbuffer(oN.RENDERBUFFER,C);oN.renderbufferStorage(oN.RENDERBUFFER,oN.DEPTH_STENCIL,T,i);oL.depthBuffer=C;oN.bindFramebuffer(oN.FRAMEBUFFER,oL);oN.framebufferTexture2D(oN.FRAMEBUFFER,oN.COLOR_ATTACHMENT0,oN.TEXTURE_2D,oK,0);oN.framebufferRenderbuffer(oN.FRAMEBUFFER,oN.DEPTH_STENCIL_ATTACHMENT,oN.RENDERBUFFER,C);var oM=oN.checkFramebufferStatus(oN.FRAMEBUFFER);if(oN.FRAMEBUFFER_COMPLETE!==oM){console.log("Frame buffer object is incomplete: "+oM.toString());this._clearBuffer(oN);return}this._clearBuffer(oN);return oL},_clearBuffer:function(e){e.bindFramebuffer(e.FRAMEBUFFER,null);e.bindTexture(e.TEXTURE_2D,null);e.bindRenderbuffer(e.RENDERBUFFER,null)},loadIconImages:function(T,oQ){var oR=T;var oS=oR.length;var oM=this;var C=0;var oP=200;for(var oK=0;oK80*ph){pc=pa=pg[0];pb=o9=pg[1];for(var pf=ph;pfpa){pa=po}if(pm>o9){o9=pm}}pp=Math.max(pa-pc,o9-pb)}C(pk,pd,ph,pc,pb,pp,null,pi);return pd}function o4(pd,pf,o9,pe,pa){var pb;var pc;if(pa===(o8(pd,pf,o9,pe)>0)){for(pb=pf;pb=pf;pb-=pe){pc=oM(pb,pd[pb],pd[pb+1],pc)}}if(pc&&oS(pc,pc.next)){o0(pc);pc=pc.next}return pc}function oW(pc,o9){if(!pc){return pc}if(!o9){o9=pc}var pb=pc;var pa;do{pa=false;if(!pb.steiner&&(oS(pb,pb.next)||o2(pb.prev,pb,pb.next)===0)){o0(pb);pb=o9=pb.prev;if(pb===pb.next){return null}pa=true}else{pb=pb.next}}while(pa||pb!==o9);return o9}function C(pa,pc,pf,pd,o9,pj,pi,pg){if(!pa){return}if(!pi&&pj){oR(pa,pd,o9,pj)}var ph=pa;var pb;var pe;while(pa.prev!==pa.next){pb=pa.prev;pe=pa.next;if(pj?o7(pa,pd,o9,pj):oZ(pa)){pc.push(pb.i/pf+pg);pc.push(pa.i/pf+pg);pc.push(pe.i/pf+pg);o0(pa);pa=pe.next;ph=pe.next;continue}pa=pe;if(pa===ph){if(!pi){C(oW(pa),pc,pf,pd,o9,pj,1,pg)}else{if(pi===1){pa=oV(pa,pc,pf,pg);C(pa,pc,pf,pd,o9,pj,2,pg)}else{if(pi===2){oU(pa,pc,pf,pd,o9,pj,pg)}}}break}}}function oZ(pb){var pa=pb.prev;var o9=pb;var pd=pb.next;if(o2(pa,o9,pd)>=0){return false}var pc=pb.next.next;while(pc!==pb.prev){if(oT(pa.x,pa.y,o9.x,o9.y,pd.x,pd.y,pc.x,pc.y)&&o2(pc.prev,pc,pc.next)>=0){return false}pc=pc.next}return true}function o7(pe,pf,pd,pl){var pi=pe.prev;var ph=pe;var pg=pe.next;if(o2(pi,ph,pg)>=0){return false}var pm=pi.xph.x?(pi.x>pg.x?pi.x:pg.x):(ph.x>pg.x?ph.x:pg.x);var pb=pi.y>ph.y?(pi.y>pg.y?pi.y:pg.y):(ph.y>pg.y?ph.y:pg.y);var pa=e(pm,pj,pf,pd,pl);var pk=e(pc,pb,pf,pd,pl);var o9=pe.nextZ;while(o9&&o9.z<=pk){if(o9!==pe.prev&&o9!==pe.next&&oT(pi.x,pi.y,ph.x,ph.y,pg.x,pg.y,o9.x,o9.y)&&o2(o9.prev,o9,o9.next)>=0){return false}o9=o9.nextZ}o9=pe.prevZ;while(o9&&o9.z>=pa){if(o9!==pe.prev&&o9!==pe.next&&oT(pi.x,pi.y,ph.x,ph.y,pg.x,pg.y,o9.x,o9.y)&&o2(o9.prev,o9,o9.next)>=0){return false}o9=o9.prevZ}return true}function oV(pf,pb,pe,pd){var pc=pf;do{var pa=pc.prev;var o9=pc.next.next;if(!oS(pa,o9)&&i(pa,pc,pc.next,o9)&&o3(pa,o9)&&o3(o9,pa)){pb.push(pa.i/pe+pd);pb.push(pc.i/pe+pd);pb.push(o9.i/pe+pd);o0(pc);o0(pc.next);pc=pf=o9}pc=pc.next}while(pc!==pf);return pc}function oU(o9,pb,pd,pc,pa,pi,pe){var ph=o9;do{var pg=ph.next.next;while(pg!==ph.prev){if(ph.i!==pg.i&&o1(ph,pg)){var pf=oQ(ph,pg);ph=oW(ph,ph.next);pf=oW(pf,pf.next);C(ph,pb,pd,pc,pa,pi,null,pe);C(pf,pb,pd,pc,pa,pi,null,pe);return}pg=pg.next}ph=ph.next}while(ph!==o9)}function oY(pb,pi,pe,pd){var pf=[];var pc;var pg;var o9;var pa;var ph;for(pc=0,pg=pi.length;pc=pa.next.y){var pi=pa.x+(pe-pa.y)*(pa.next.x-pa.x)/(pa.next.y-pa.y);if(pi<=pf&&pi>pc){pc=pi;if(pi===pf){if(pe===pa.y){return pa}if(pe===pa.next.y){return pa.next}}pb=pa.x=pa.x&&pa.x>=pl&&oT(pepb.x))&&o3(pa,o9)){pb=pa;pk=pg}}pa=pa.next}return pb}function oR(pd,o9,pc,pa){var pb=pd;do{if(pb.z===null){pb.z=e(pb.x,pb.y,o9,pc,pa)}pb.prevZ=pb.prev;pb.nextZ=pb.next;pb=pb.next}while(pb!==pd);pb.prevZ.nextZ=null;pb.prevZ=null;oK(pb)}function oK(pf){var pc;var pb;var pa;var pe;var pg;var o9;var ph;var pd;var pi=1;do{pb=pf;pf=null;pg=null;o9=0;while(pb){o9++;pa=pb;ph=0;for(pc=0;pc0||(pd>0&&pa)){if(ph===0){pe=pa;pa=pa.nextZ;pd--}else{if(pd===0||!pa){pe=pb;pb=pb.nextZ;ph--}else{if(pb.z<=pa.z){pe=pb;pb=pb.nextZ;ph--}else{pe=pa;pa=pa.nextZ;pd--}}}if(pg){pg.nextZ=pe}else{pf=pe}pe.prevZ=pg;pg=pe}pb=pa}pg.nextZ=null;pi*=2}while(o9>1);return pf}function e(pa,pd,o9,pc,pb){pa=32767*(pa-o9)/pb;pd=32767*(pd-pc)/pb;pa=(pa|(pa<<8))&16711935;pa=(pa|(pa<<4))&252645135;pa=(pa|(pa<<2))&858993459;pa=(pa|(pa<<1))&1431655765;pd=(pd|(pd<<8))&16711935;pd=(pd|(pd<<4))&252645135;pd=(pd|(pd<<2))&858993459;pd=(pd|(pd<<1))&1431655765;return pa|(pd<<1)}function oN(pb){var pa=pb;var o9=pb;do{if(pa.x=0&&(pd-pb)*(pe-pa)-(pf-pb)*(pc-pa)>=0&&(pf-pb)*(pg-pa)-(o9-pb)*(pe-pa)>=0}function o1(pa,o9){return pa.next.i!==o9.i&&pa.prev.i!==o9.i&&!oX(pa,o9)&&o3(pa,o9)&&o3(o9,pa)&&T(pa,o9)}function o2(pb,pa,o9){return(pa.y-pb.y)*(o9.x-pa.x)-(pa.x-pb.x)*(o9.y-pa.y)}function oS(pa,o9){return pa.x===o9.x&&pa.y===o9.y}function i(pb,o9,pa,pc){if((oS(pb,o9)&&oS(pa,pc))||(oS(pb,pc)&&oS(pa,o9))){return true}return o2(pb,o9,pa)>0!==o2(pb,o9,pc)>0&&o2(pa,pc,pb)>0!==o2(pa,pc,o9)>0}function oX(pa,o9){var pb=pa;do{if(pb.i!==pa.i&&pb.next.i!==pa.i&&pb.i!==o9.i&&pb.next.i!==o9.i&&i(pb,pb.next,pa,o9)){return true}pb=pb.next}while(pb!==pa);return false}function o3(pa,o9){return o2(pa.prev,pa,pa.next)<0?o2(pa,o9,pa.next)>=0&&o2(pa,pa.prev,o9)>=0:o2(pa,o9,pa.prev)<0||o2(pa,pa.next,o9)<0}function T(pb,pa){var pe=pb;var o9=false;var pd=(pb.x+pa.x)/2;var pc=(pb.y+pa.y)/2;do{if(((pe.y>pc)!==(pe.next.y>pc))&&(pd<(pe.next.x-pe.x)*(pc-pe.y)/(pe.next.y-pe.y)+pe.x)){o9=!o9}pe=pe.next}while(pe!==pb);return o9}function oQ(pb,pa){var o9=new o6(pb.i,pb.x,pb.y);var pc=new o6(pa.i,pa.x,pa.y);var pe=pb.next;var pd=pa.prev;pb.next=pa;pa.prev=pb;o9.next=pe;pe.prev=o9;pc.next=o9;o9.prev=pc;pd.next=pc;pc.prev=pd;return pc}function oM(pa,o9,pd,pb){var pc=new o6(pa,o9,pd);if(!pb){pc.prev=pc;pc.next=pc}else{pc.next=pb.next;pc.prev=pb;pb.next.prev=pc;pb.next=pc}return pc}function o0(o9){o9.next.prev=o9.prev;o9.prev.next=o9.next;if(o9.prevZ){o9.prevZ.nextZ=o9.nextZ}if(o9.nextZ){o9.nextZ.prevZ=o9.prevZ}}function o6(pa,o9,pb){this.i=pa;this.x=o9;this.y=pb;this.prev=null;this.next=null;this.z=null;this.prevZ=null;this.nextZ=null;this.steiner=false}oP.deviation=function(pe,pj,pg,pb){var ph=pj&&pj.length;var pd=ph?pj[0]*pg:pe.length;var pa=Math.abs(o8(pe,0,pd,pg));if(ph){for(var pf=0,pi=pj.length;pf0){pb+=pd[pc-1].length;o9.holes.push(pb)}}return o9};return oP})();function eh(i,e){this.id=iW();this.workerPool=i;this.actors=[];this.currentActorIndex=0;this.ready=false;this.init(e)}eh.prototype.init=function(oL){const e=this.workerPool.acquire(this.id);for(var T=0;T"){this.setBusy(false);const oM=this.callbacks[oN];delete this.callbacks[oN];if(oM){if(oK.error){oM(lP(oK.error))}else{oM(null,lP(oK.data))}}}else{var C=this;const i=[];const e=oK.hasCallback?function(oO,oP){C.target.postMessage({id:oN,action:"",sourceMapId:C.mapId,error:oO?nE(oO):null,data:nE(oP,i)},i)}:function(oO){};const oL=lP(oK.data);if(this.parent[oK.action]){this.parent[oK.action](oK.sourceMapId,oL,e)}}};nC.prototype.send=function(i,C,oM,T,oK,oN){if(i==="release"){this.releasePendingData(C,oM);return}if(this.busy){this.taskQueue.push({action:i,data:C,callback:oM,targetMapId:T,mustQueue:oK,callbackMetadata:oN});return}this.setBusy(true);var oL=Math.round((Math.random()*1000000000000000000)).toString(36).substring(0,10);const e=this.mapId+"_"+i+"_"+oL;if(oM){oM.metadata=oN;this.callbacks[e]=oM}const oO=[];this.target.postMessage({id:e,action:i,hasCallback:!!oM,targetMapId:T,mustQueue:oK,sourceMapId:this.mapId,data:nE(C,oO)},oO);return{cancel:function(){if(oM){delete this.callbacks[e]}this.target.postMessage({id:e,action:"",targetMapId:T,sourceMapId:this.mapId})}}};nC.prototype.stop=function(){this.taskQueue.length=0;this.busy=false;this.callbacks={}};nC.prototype.remove=function(){this.taskQueue.length=0;this.busy=false;this.target.removeEventListener("message",this.receive,false)};nC.prototype.releasePendingData=function(e,oM){var C=[];var oK=this.taskQueue;for(var T=oK.length-1;T>=0;T--){var oL=oK[T]["data"];if(!oL||!oL.layerId){break}if(oL.layerId!==e.layerId){continue}if(!e["id_"+oL.x+"_"+oL.y+"_"+oL.z]){oK.splice(T,1);C.push(oL)}}oM(null,C)};var oz;function kG(){if(!oz){oz=new kO()}return oz}function kO(){this.active={}}kO.prototype.acquire=function(i){if(!this.workers){this.workers=[];var C=(window.location.protocol === "http:" ? "http:" : "https:") + "//" + window.location.host + "/bmap-api/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)}}})};eW.prototype._checkIndoorByMove=function(){var C=this._map;var oP=C.getSize();var oU={x:oP.width/2,y:oP.height/2};var oT=Math.max(oP.width,oP.height);var oV=[];for(var oQ in this._indoorData){var e=this._indoorData[oQ].center;var T=C.pointToPixelIn(new cv.Point(e[0],e[1]));var oM=dL(oU,T);oV.push({uid:oQ,distance:oM})}if(oV.length===0){return}oV.sort(function(oW,i){return oW.distance-i.distance});var oL=oV[0];var oR=C.getCenterIn();var oK=false;for(var oO=0;oOoN[0]&&oR.lat>oN[1]&&oR.lng=this._autoEnterZoom){this._checkIndoorByMove()}};eW.prototype.removeData=function(C,oK){if(!this._indoorData[C]){return}var T=this._indoorData[C];for(var e=0;e21){o4=21}if(oX){oV=oR(o0,o1,o4,oX)}else{oV=C(o0,o1,o4,o3)}var oZ=oV.drawId;var oU=oV.style;var o2=oV.styleUpdate;var o5=[];if(!oZ){return o5}for(var oW=0;oW>>0}}function oN(oV,oT){var oU=null;var oW=null;if(oV[oV.length-1]&&oV[oV.length-1] instanceof Array&&oV[oV.length-1][0]==="openmap"){oU=oV[oV.length-1][1]?oV[oV.length-1][1]:null;oW=oV[oV.length-1][2]?oV[oV.length-1][2]:null}return{sid:oT,borderRgba:i(oV[0]),fillRgba:i(oV[1]),borderWidth:oV[2],fillWidth:oV[3],borderCap:oV[4],fillCap:oV[5],haveBorderLine:oV[6],haveBorderTexture:oV[7],haveFillTexture:oV[8],isUseBorderRgba:oV[9],isUseFillRgba:oV[10],borderTexture:oV[11],fillTexture:oV[12],borderTextureType:oV[13],fillTextureType:oV[14],isRealWidth:oV[15],haveArrow:oV[16],needRound:oV[17],realBorderWidth:oV[18],customTextureUrl:oW,hue:i(oU)}}function oK(oV,oT){var oU=null;var oW=null;if(oV[oV.length-1]&&oV[oV.length-1] instanceof Array&&oV[oV.length-1][0]==="openmap"){oU=oV[oV.length-1][1]?oV[oV.length-1][1]:null;oW=oV[oV.length-1][2]?oV[oV.length-1][2]:null}return{sid:oT,fillRgba:i(oV[0]),borderRgba:i(oV[1]),borderWidth:oV[2],borderTexture:oV[3],borderTextureType:oV[4],waterStyle:oV[5],haloStyle:oV[6],textureStyle:oV[7],thickRgba:i(oV[8]),fillTexture:oW,hue:i(oU)}}function oM(oU,oT){return{sid:oT,filter:oU[0],ratio:oU[1],haveBorder:oU[2],borderWidth:oU[3],borderRgba:i(oU[4]),fillTop:i(oU[5]),fillSide:i(oU[6]),polyTexture:oU[7]}}function i(oY){var oX=oY;if(oO[oX]){return oO[oX]}oY=oY>>>0;var oW=(oY)&255;var oV=(oY>>8)&255;var oT=(oY>>16)&255;var oU=(oY>>24)&255;oO[oX]=[oW,oV,oT,oU];return oO[oX]}return{getStyleFromCache:function(o0,oV,oY,oZ,oU,oX,oT){o0=o0||"default";var oW=o0+"-"+oV+"-"+oY+"-"+oZ;if(oX){oW+="-indoor"}if(oU){if(!oS[oW]){oS[oW]=oP(oV,oY,oZ,oU)}return oS[oW]}if(!T[oW]){T[oW]=oP(oV,oY,oZ,oU,oT)}return T[oW]},clearStyleFromCache:function(){T={};oS={}}}})();cv.register(function(i){var e=new lO(i)});function lO(e){e.container.appendChild(this.render());this.bind(e)}lO.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};lO.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";hv.ac(e._ripple,"ripple-playing")});i.addEventListener("hotclick",function(C){if(!C||!C.pixel||!(C.pixel instanceof hV)){return}e._div.style.left=C.pixel.x+"px";e._div.style.top=C.pixel.y+"px";hv.ac(e._ripple,"ripple-playing")});hv.on(e._ripple,"transitionend",function(){hv.rc(e._ripple,"ripple-playing")})};function c7(e){eX.call(this);if(!e){return}this._opts={};this._map=e;this._maxLat=84.6;this._minLat=-80.6;this._maxLatMC=m8.convertLL2MC(new d1(this._maxLat,0)).lat;this._minLatMC=m8.convertLL2MC(new d1(this._minLat,0)).lat}c7.inherits(eX,"ToolbarItem");hv.extend(c7.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 dH(C,i){c7.call(this,C);i=i||{};this._opts=hv.extend(hv.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;ki.load("tools",function(){e._draw()})}dH.inherits(c7,"PolylineTItem");hv.extend(dH.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;CoP){C-=oL;oN-=this._loopOffset}while(Cthis._mc180X){e-=this._mcTSpan}while(ethis._mc180X){i.lng-=this._mcTSpan;e-=this._mcTSpan;oK-=this._mcTSpan}while(i.lng=oQ){var oP=T+oS;if(this.isTileBlank(oP,e,oV)===true){continue}var C="id_"+oP+"_"+oW+"_"+e;if(!oR[C]){oR[C]=true;oT.push([oP,oW,e,0])}}else{if(T<=oM){var oP=T-oS;if(this.isTileBlank(oP,e,oV)===true){continue}var C="id_"+oP+"_"+oW+"_"+e;if(!oR[C]){oR[C]=true;oT.push([oP,oW,e,0])}}}}for(var oN=0,oL=oT.length;oN=0;oN--){var T=oR[oN][0];if(this.isTileBlank(T,e,oV)){oR.splice(oN,1)}}return oR},isTileBlank:function(C,oK,e){var oL=Math.pow(2,oK-3);var i=Math.round(this._validPixels*oL);var T=6*oL*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 hz=new cD();function gJ(){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}gJ.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}};gJ.prototype.deserialize=function(oK){this.setId(oK.id);this.setType(oK.type);this.grid=oK.grid;this.layerName=oK.layerName;this.geojson=oK.geojson;this.setProperties(oK.properties);this.setState(oK.state);this._visible=oK.visible||true;this.renderData=oK.renderData;this.setGeometry(oK.geometry);this.setBox(oK.box);if(this.geojson.geometry&&this.geojson.geometry["type"]==="MultiPolygon"){for(var C=0;C0){return this._state}else{return null}};gJ.prototype.getStyle=function(){return this._style};gJ.prototype.getStyleFunction=function(){return this._styleFunction};gJ.prototype.setType=function(e){return this._type=e};gJ.prototype.setGeometry=function(e){this._geometry=e};gJ.prototype.setStyle=function(e){if(!e||Object.keys(e).length===0){return}for(var i in e){this.set(i,e[i],this._style)}};gJ.prototype.setState=function(e){for(var i in e){this.set(i,e[i],this._state)}};gJ.prototype.setId=function(e){this._id=e};gJ.prototype.setProperties=function(e){for(var i in e){this.set(i,e[i],this._properties)}};gJ.prototype.setBox=function(e){return this._box=e};gJ.prototype.isPointInBox=function(e){return this._pointInBox(e,this._box)};gJ.prototype.getPointGeoJSON=function(T){var oS=this.renderData;if(oS){var oM=oS.active;if(!oS[oM]||!oS[oM]["poi"]){return null}var oR=[];var oO=oS[oM]["poi"];for(var oP=0;oP0){oQ="MultiPolygon"}return{type:"Feature",properties:{},geometry:{type:oQ,coordinates:[oR]}}}}};gJ.prototype._pointInBox=function(e,i){if(i[0]>e[0]||i[1]>e[1]||i[2]oL[oM].bds[0])&&(C.y-oK.yoL[oM].bds[1])){if(e.getTilt()>55){var oN=e.pointToOverlayPixelIn(oL[oM].pt);if(oN.outOfFrustum){continue}}oP=true;break}}}}return oP};gJ.prototype._pixelPnpoly=function(oK,oM){var e=oM.length;var C=0;var oL=false;for(var T=0;T=oM[T].lat)&&(oK.lat=oM[C].lat)&&(oK.lat1){for(var oU=1;oUoV){oQ=Math.sqrt(Math.min(oK,oY))}if((C==null)||(C>oQ)){T=Math.sqrt(oY-oL)/Math.sqrt(oV);oS=Math.sqrt(oK-oL)/Math.sqrt(oV);C=oQ;oR=oU}C=Math.min(C,oQ)}}return{dist:C}};gJ.prototype.isPointInGeometry=function(oO,e){var oP=false;switch(this._type){case iE.POINT:oP=this._pixelPnpoint(oO,this.renderData,e);break;case iE.LINE_STRING:var oN=this._getProximity({lng:oO[0],lat:oO[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===gg.GridModel.GOOGLEWEB){C=Math.max(C/2*fA.gridScaleFromBDMCTo3857,2)}else{C=Math.max(C/2,2)}}if(oN.dist1?[o1]:(o1[0]||[])}var oZ=o0;if(o0.polygonStyle){oZ=o0.polygonStyle;if(o0.polygonStyle instanceof Function){oZ=o0.polygonStyle(oY)||{}}}var oW=new mw(o1,oZ);return oW}function oP(oX,o3,o0){var o1=oX.coordinates;var oV=[];for(var oZ=0;oZoX[0]){oW[0]=oX[0]}if(oW[1]>oX[1]){oW[1]=oX[1]}if(oW[2]=0){continue}const oP=oO[oQ];oL[oQ]=nE(oP,oM)}if(oO instanceof Error){oL.message=oO.message}}if(e!=="Object"){oL["_$name"]=e}return oL}else{if(oO instanceof Function){return null}}throw new Error("不能被序列化")}function lP(oL){if(oL===null||oL===undefined||typeof oL==="boolean"||typeof oL==="number"||typeof oL==="string"||oL instanceof Boolean||oL instanceof Number||oL instanceof String||oL instanceof Date||oL instanceof RegExp||iu(oL)||jg(oL)||ArrayBuffer.isView(oL)||oL instanceof ImageData){return oL}if(Array.isArray(oL)){var e=oL["_$name"];if(e){var T=mX[e]["_class"];if(!T){throw new Error("不能被反序列化")}if(T.deserialize){return T.deserialize(oL)}}const oK=[];for(var C=0;C=oK.minZoom&&oK.map.getZoom()<=oK.maxZoom){if(!oK._onMap){oK.addDataToMap();oK._onMap=true}}else{if(oK._onMap){oK.removeDataFromMap();oK._onMap=false}}};this.map.on("zoomend",this._onZoomEvent);var oK=this;var e=false;var T={x:0,y:0};this._layerMouseEvent=function(oP){if(!oK.map||!oK._listeners||!oK.visible||!oK._onMap){return}if(!oK._listeners.onmousemove||Object.keys(oK._listeners.onmousemove).length===0){return}var oO=oK.pickOverlays(oP);var i;if(oO&&oO.length>0){i=new ix("onmousemove");i.features=oO;oK.map.platform.style.cursor=oK.map.config.overlayMoveCursor;e=true}else{if(!e||!oK._listeners.onmouseout||Object.keys(oK._listeners.onmouseout).length===0){return}oK.map.platform.style.cursor=oK.map.config.defaultCursor;i=new ix("onmouseout");i.features=null;e=false}if(i){i.pointMC=oP.pointMC;i.pixel=oP.pixel;i.latLng=oP.latlng;oK.dispatchEvent(i)}};this._layerClickEvent=function(oQ){if(!oK.map||!oK._listeners||!oK.visible){return}if((!oK._listeners.onclick&&!oK._listeners.dblclick)||(Object.keys(oK._listeners.onclick||{}).length===0&&Object.keys(oK._listeners.dblclick||{}).length===0)){return}var oO={x:oQ.clientX,y:oQ.clientY};if(Math.abs(oO.x-T.x)>oK.clickDistrict||Math.abs(oO.y-T.y)>oK.clickDistrict){return}var oP=oK.pickOverlays(oQ);var i=new ix(oQ.type);i.pointMC=oQ.pointMC;i.pixel=oQ.pixel;i.latLng=oQ.latlng;i.features=oP;oK.dispatchEvent(i)};this._layerMouseDownEvent=function(i){T={x:i.clientX,y:i.clientY}};oM.addEventListener("onmousemove",this._layerMouseEvent);oM.addEventListener("onmouseout",this._layerMouseEvent);oM.addEventListener("onmousedown",this._layerMouseDownEvent);var oL=["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=[]};bk.prototype.setLevel=function(e){if(e>-999&&e<9999){this.level=e;for(var C=0;C(oT+oL)){oS.tileCache.clear();return null}if(oO.source!=="BD09MC"){o6.x=fA.getTilesLoop(o0,o6.x)}if(oP.length===4){var o5=fA.getTileRangeExtent([o0,o6.x,o6.y]);var o7=oR([o5.minX,o5.minY,o5.maxX,o5.maxY]);if(!o7){return null}}var o1="";if(oV){o1=oV;var o3=/[^\{}]*\{(.*)\}[^\}]*/;o1.match(o3);var o2=[];if(RegExp.$1){o2=RegExp.$1.split(",")}var oZ=C(o6.x,o6.y,o0);if(!oZ){return null}o1=o1.replace(/\{(.*)\}/,o2[(o6.x+o6.y)%o2.length]);o1=o1.replace(/\[x\]/gi,T(o6.x,o6.y,o0));o1=o1.replace(/\[y\]/gi,oW(o6.x,o6.y,o0));o1=o1.replace(/\[z\]/gi,oZ);o1=o1.replace(/\[b\]/gi,oU(o6.x,o6.y,o0));o1=o1.replace(/\[w\]/gi,oX(o6.x,o6.y,o0));o1=o1.replace(/\[h\]/gi,e(o6.x,o6.y,o0))}else{return null}return o1};function oR(oZ){if(oP&&oP instanceof Array&&oP.length===4){if((oP[0]<=oZ[2]&&oP[1]<=oZ[3])&&(oP[2]>=oZ[0]&&oP[3]>=oZ[1])){return true}else{return false}}return true}return oS}function cr(e){e=e||{};var i=e.url||"";var oR=e.params||{};var oM=oR.VERSION||"1.3.0";var oL=e.projection||"EPSG:3857";if(oL!=="EPSG:3857"){console.warn("[WMSLayer] 仅支持 EPSG:3857。传入值:"+oL);oL="EPSG:3857"}if(!oR.LAYERS){console.warn("[WMSLayer] params.LAYERS 缺失,WMS 服务通常必填。")}var oN=oM==="1.1.1"?"SRS":"CRS";var oO={SERVICE:"WMS",REQUEST:"GetMap",VERSION:oM,FORMAT:"image/png",TRANSPARENT:"true",STYLES:""};oO[oN]=oL;for(var T in oR){if(oR.hasOwnProperty(T)){oO[T]=oR[T]}}delete oO.BBOX;delete oO.WIDTH;delete oO.HEIGHT;var C=[];for(var oP in oO){if(oO.hasOwnProperty(oP)){var oK=encodeURIComponent(oO[oP]).replace(/%2C/gi,",");C.push(encodeURIComponent(oP)+"="+oK)}}C.push("BBOX=[b]","WIDTH=[w]","HEIGHT=[h]");var oQ=i.indexOf("?")===-1?"?":"&";return{tileUrlTemplate:i+oQ+C.join("&"),transform:{source:"EPSG3857",target:"BD09MC"},projection:oL,version:oM}}function ev(i){if(typeof kU!=="undefined"&&kU.sendMessage){kU.sendMessage("WMSLayer")}i=i||{};var C=i.tileSize||256;var e=cr({url:i.url,params:i.params,projection:i.projection});return new ow({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 f6(e){var e=e||{};var C=e.url||"";var oK=e.params||{};var oO={Service:"WMTS",Request:"GetTile",Version:"1.0.0",Format:"image/png",TileMatrixSet:"GoogleMapsCompatible"};for(var oQ in oO){if(!oK[oQ]&&!oK[oQ.toLowerCase()]){oK[oQ]=oO[oQ]}}var oL=oK.TileMatrix||oK.tilematrix||"[z]";var oP=oK.TileCol||oK.tilecol||"[x]";var oN=oK.TileRow||oK.tilerow||"[y]";delete oK.TileMatrix;delete oK.tilematrix;delete oK.TileCol;delete oK.tilecol;delete oK.TileRow;delete oK.tilerow;var oR=[];for(var oQ in oK){oR.push(oQ+"="+encodeURIComponent(oK[oQ]))}var oM=C.indexOf("?")===-1?"?":"&";var T=C+oM+oR.join("&")+"&TileMatrix="+oL+"&TileCol="+oP+"&TileRow="+oN;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 ow(i)}function le(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 cW(T,i,oN,oM,e){var oL=Math.pow(2,oM)-oN-1;var C=T.replace(/\{z\}/gi,oM).replace(/\{x\}/gi,i).replace(/\{-y\}/gi,oL).replace(/\{reverseY\}/gi,oL).replace(/\{y\}/gi,oN);if(C.indexOf("{s}")!==-1||C.indexOf("{S}")!==-1){var oK=(e&&e.length)?e[Math.abs(i+oN)%e.length]:"";C=C.replace(/\{s\}/gi,oK)}return C}function eM(C){if(typeof kU!=="undefined"&&kU.sendMessage){kU.sendMessage("RasterTileLayer")}C=C||{};var oT=C.url||"";var oN=C.subdomains||[];var oL=typeof console!=="undefined"&&console.warn;if(!oT&&oL){console.warn("[RasterTileLayer] url 必填(字符串模板或 function(x, y, z))。")}if(typeof oT==="string"&&/\{s\}/i.test(oT)&&!oN.length&&oL){console.warn("[RasterTileLayer] url 含 {s} 但未提供 subdomains。")}var i=le(C.projection||"EPSG:3857");var oM={source:i,target:"BD09MC"};var T=C.bounds||[];var oO=C.boundsInWGS84||false;var oK=C.minZoom||0;var oP=C.maxZoom||23;var oR=C.spanLevel||0;var oQ=C.showRegion;if(oQ!=="inside"&&oQ!=="outside"){oQ="inside"}var e=new kT({transform:oM,height:C.height||0,retry:C.retry||false,retryTime:C.retryTime||600,transparentPng:true,dataType:1,spanLevel:oR,tileTypeName:"xyz",cacheSize:C.cacheSize||256,customLayer:true,clipTile:false,opacity:C.opacity||1,boundary:C.boundary||false,showRegion:oQ,useThumbData:C.useThumbData!==false,tileLoadFunction:C.tileLoadFunction});if(C.zIndex){e.zIndex=C.zIndex}if(T.length===4&&oO){T=fA.fromEPSG4326(T)}e.getTilesUrl=function(oU,oW){if(!oU||oW<0||oW<(oK+oR)||oW>(oP+oR)){e.tileCache.clear();return null}if(oM.source!=="BD09MC"){oU.x=fA.getTilesLoop(oW,oU.x)}if(T.length===4){var oV=fA.getTileRangeExtent([oW,oU.x,oU.y]);if(!oS([oV.minX,oV.minY,oV.maxX,oV.maxY])){return null}}if(typeof oT==="function"){return oT(oU.x,oU.y,oW)||null}if(oT){return cW(oT,oU.x,oU.y,oW,oN)}return null};function oS(oU){return(T[0]<=oU[2]&&T[1]<=oU[3]&&T[2]>=oU[0]&&T[3]>=oU[1])}return e}function fm(C){if(typeof kU!=="undefined"&&kU.sendMessage){kU.sendMessage("PixelLayer")}this.src=eR();this._queryList=[];var e=this;ki.load("layer",function(){e._asyncReplay()},true);this.tileMaskUvCache=new a1(64,{clearCallback:function(oM){}});var oL=6;if(C.pixelMap){this.opacity=typeof C.pixelMap.opacity==="number"?C.pixelMap.opacity:1;dA(this.opacity,0,1);if(this.opacity<1){C.useThumbData=false}var oK=C.pixelMap||{};this.colors=oK.colors||["#F9F871","#FFC75F","#FF9671","#FF6F91","#D65DB1","#845EC2"];this.positions=oK.positions||[0,0.2,0.4,0.6,0.8,1];this.domain=oK.domain||[0,255];this.clamp=oK.clamp||this.domain;this.noData=(oK.noData!==undefined)?oK.noData:-99999;this.fomularC=oK.fomularC||"float generateValue(vec4 pixel){return pixel.r * 255.;}";this.fomularJS=oK.fomularJS||function(oM){return oM.r};this.maskPng=oK.maskPng||null;if(this.maskPng){this.loadMaskPng(this.maskPng)}this.maskData=oK.maskData||-1;this.maskCoord=oK.maskCoord||null;this.fHashcode=u({str:this.fomularC});var i=this.canPixelMap();if(i){this.isPixelMap=true;this.setPixelMap()}oL=C.pixelMap.cacheSize||oL}var T=new ow(C);T.ontology=this;this.layer=T;this.cacheSize=oL;this.tileCache=new a1(this.cacheSize,{clearCallback:function(oM){}});this.tileImageDataCache=new a1(this.cacheSize,{clearCallback:function(oM){}})}fm.inherits(hv.BaseClass,"PixelLayer");fm.prototype.isTileLayer=true;hv.extend(fm.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=k0.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 ix("onupdate");this.layer.map.dispatchEvent(e)}},_getInLayer:function(oR){if(!this.map){return null}var oQ=Math.floor(this.map.getZoom());var T=fA.transformBDmcPoint(oR,this.layer.transform);var oN=fA.getTileCoordForXYAndZ_(T[0],T[1],oQ,false);var C=oN.join("-");var e=this.tileCache.getData(C);if(e){return e}var oK=this.layer.zIndex;var oM=this.map._featureMgr.result.bkData;var oO=oM[oK][2];var oS=null;for(var oL=0;oL0){i.zIndex=C.index}var e=this;i.loadTileData=function(){return e._loadTile.apply(e,arguments)};i.ontology=this;this.layer=i;var oK=this;i.addEventListener("ontilesloadstart",function(){oK.dispatchEvent(new ix("ontilesloadstart"))});i.addEventListener("ontilesloadend",function(){oK.dispatchEvent(new ix("ontilesloadend"))})},createTileLayer:function(i){const T=i.tileUrlTemplate||"";const oO=i.xTemplate||function(oV,oX,oW){return oV};const oT=i.yTemplate||function(oV,oX,oW){return oX};const oM=i.zTemplate||function(oV,oX,oW){return oW};const oS=i.bTemplate||function(oV,oY,oX){const oW=m8.tileToBoundRange({col:oV,row:oY,zoom:oX,baseTileSize:256});return oW.MC.sw.lng+","+oW.MC.sw.lat+","+oW.MC.ne.lng+","+oW.MC.ne.lat};var oU=i.extent||[];const oN=i.extentCRSIsWGS84||false;var C=i.minZoom||0;var oQ=i.maxZoom||23;var oR=i.spanLevel||0;var oP=new kT({transparentPng:true,dataType:2,spanLevel:oR,tileTypeName:"web",cacheSize:i.cacheSize||256,customLayer:true,clipTile:false,boundary:false,useThumbData:i.useThumbData||false});if(oU.length===4){if(oN){oU=fA.fromEPSG4326(oU)}var oK=fA.transformPointArr([oU[0],oU[1]],"EPSG3857","BD09MC");var oL=fA.transformPointArr([oU[2],oU[3]],"EPSG3857","BD09MC");oU=[oK[0],oK[1],oL[0],oL[1]]}oP.getTilesUrl=function(o2,oW,o1){if(!o2||oW<0||oW<(C+oR)||oW>(oQ+oR)){oP.tileCache.clear();return null}if(oU.length===4){const o0=m8.tileToBoundRange({col:x,row:y,zoom:z,baseTileSize:256});var o3=e([o0.MC.getMin().lng,o0.MC.getMin().lat,o0.MC.getMax().lng,o0.MC.getMax().lat]);if(!o3){return null}}var oX="";if(T){oX=T;var oZ=/[^\{}]*\{(.*)\}[^\}]*/;oX.match(oZ);var oY=[];if(RegExp.$1){oY=RegExp.$1.split(",")}var oV=oM(o2.x,o2.y,oW);if(!oV){return null}oX=oX.replace(/\{(.*)\}/,oY[(o2.x+o2.y)%oY.length]);oX=oX.replace(/\[x\]/gi,oO(o2.x,o2.y,oW));oX=oX.replace(/\[y\]/gi,oT(o2.x,o2.y,oW));oX=oX.replace(/\[z\]/gi,oM(o2.x,o2.y,oW));oX=oX.replace(/\[b\]/gi,oS(o2.x,o2.y,oW))}else{return null}return oX};function e(oV){if(oU&&oU instanceof Array&&oU.length===4){if((oU[0]<=oV[2]&&oU[1]<=oV[3])&&(oU[2]>=oV[0]&&oU[3]>=oV[1])){return true}else{return false}}return true}return oP},compileExpress:function(i,e){var i=gg.ExpressParse.normalizePropertyExpression(i,e);return i},resolveStyle:function(oL){var T=oL||{};if(T.style){var oK={};if(!T.layers||T.layers.length===0){var oN=gg.LayerTypes.POINT;var i=gg.LayerTypes.LINE;var oM=gg.LayerTypes.FILL;if(T.style[oN]){T.style[oN].type="point"}if(T.style[i]){T.style[i].type="polyline"}if(T.style[oM]){T.style[oM].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,oK)}}this.styleExpress=oK}},_styleFormat:function(oK,e,i,T){var oM={};var oN=eL[oK];if(!oN){return}for(var C in e){if(e.hasOwnProperty(C)){var oL=this.compileExpress(e[C],oN[C]);oM[C]=oL}}T[i]={type:oK,painter:oM}},evaluateContext:function(e,C,T){var i=e+"_"+C.getId();var oK=this._stateCube[i];if(oK){C.setState(oK)}else{C._state={}}return{properties:function(){return C&&C.getProperties()},featureState:T===true?{}:(C&&C.getState())}},evaluates:function(i,T,oK){if(!this.styleExpress||!this.styleExpress.hasOwnProperty(i)){return null}var oM=this.styleExpress[i].painter;var e={};for(var C in oM){if(oM.hasOwnProperty(C)){var oL=oM[C].evaluate(this.evaluateContext(i,T,oK));e[C]=oL}}return e},_updateState:function(C,T,e){if(C instanceof m9&&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(oK,oL,e){var C=JSON.stringify(this._stateCube);if(!(oL&&typeof oL==="object"&&Object.keys(oL).length>0)){return}if(!e){this._stateCube={}}if(oK instanceof Array){for(var T=0;Te){return false}return true}}},_initEvent:function(oM){this.map=oM;if(!this.map.dispatcher){this.map.dispatcher=new eh(kG(),gg)}var oK=this;this.map.dispatcher.broadcast("setLayerStyle",oK.layerOption,function(oO,i){oK.upStyle=true;if(oK.loadModule){oK.doOnceDraw()}});var T=this;var e=false;this._layerMouseEvent=function(oQ){if(!T.map||!T._listeners){return}if(!T._listeners.onmousemove||Object.keys(T._listeners.onmousemove).length===0){return}var i;var oP=oQ.pointMC;var oO=T.pickFeatures(oP,oQ.pixel);if(oO&&oO.length>0){i=new ix("onmousemove");i.value=oO;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 ix("onmouseout");e=false}if(i){i.pointMC=oQ.pointMC;i.pixel=oQ.pixel;i.latLng=oQ.latlng;T.dispatchEvent(i)}};this._layerClickEvent=function(oQ){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 oP=oQ.pointMC;var oO=T.pickFeatures(oP,oQ.pixel);i=new ix(oQ.type);i.pointMC=oP;i.pixel=oQ.pixel;i.latLng=oQ.latlng;i.value=oO;T.dispatchEvent(i)};oM.addEventListener("onmousemove",this._layerMouseEvent);var oL=["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}});gg._generateTexture=function(oM,oL,C){var oK=document.createElement("canvas");var e;var T;if(oL.strokeStyle==="dashed"){e=16;T=e*8}else{if(oL.strokeStyle==="dotted"){e=32;T=e*2}}oK.width=e;oK.height=T;var i=oK.getContext("2d");i.fillStyle=oL.strokeColor;i.globalAlpha=oL.strokeOpacity;var oN=oL.strokeWeight*2;if(oL.strokeStyle==="dashed"){oN=gg._drawDashArrayTexture(i,e,T,oL)}else{if(oL.strokeStyle==="dotted"){oN=gg._drawDottedTexture(i,e,T,oL.strokeWeight)}}if(window.createImageBitmap&&!oL.sync){createImageBitmap(oK,{imageOrientation:"flipY"}).then(function(oO){C(null,{totalDashLen:oN,texture:oO,textureSize:[e,T]})})}else{C(null,{totalDashLen:oN,texture:oK.toDataURL(),textureSize:[e,T]})}};gg._drawDashArrayTexture=function(oP,T,oL,C){var oN=C.dashArray;if(!oN){oP.fillRect(0,0,T,oL/2);return C.strokeWeight*4}else{var oO=0;if(oN.length%2!==0){oN=oN.concat(oN)}for(var oK=0;oK3?oO[3]:255]}}if(typeof oP==="number"){oQ[3]=Math.round(Math.max(0,Math.min(1,oP))*255)}return oQ}var e={};var T=false;for(var i in oM){if(!oM.hasOwnProperty(i)){continue}var C=oM[i]||{};var oK=typeof C.strokeWeight==="number"?C.strokeWeight:2;var oN=typeof C.borderWeight==="number"?C.borderWeight:0;e[i]={borderCap:1,borderRgba:oL(C.borderColor||[0,0,0,255]),borderTexture:"",borderTextureType:null,borderWidth:oN*2,fillCap:0,fillRgba:oL(C.strokeColor,C.strokeOpacity),fillTexture:"",fillTextureType:null,fillWidth:oK*2,haveArrow:null,haveBorderLine:oN>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 ai=function(i){if(typeof kU!=="undefined"&&kU.sendMessage){kU.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=lA.getInstance("web");this._mapCenter={};this._featureMgr=[[],[],[]];this._gridRefs={row:{},col:{}};this.tileCache=new a1(this.cacheSize,{clearCallback:function(C){}});this._queryList=[];var e=this;ki.load("layer",function(){e._asyncReplay()},true)};ai.inherits(eX,"BaiduLayer");hv.extend(ai.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=oK;this.onAdd(T,oK);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(oK){var C=this.zIndex;if(this.map&&this.map._featureMgr){var e=this.map._featureMgr.result.bkData;if(oK==="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(oN){oN=Math.abs(Math.floor(oN))||1;if(!oN||oN===this.zIndex){return}var oK=this.map._featureMgr.result.bkData;var T=this.map.tileMgr.tileLayers;var oP=this.map._normalLayerMgr.layers;function oQ(oV){var oT=null;var oU=[T,oP];for(var oR=0;oR-1){return e}continue}if(oL-1){return e}}if(oO>=0){var e=C(oO*4);if(e>-1){return e}}if(oL>=oN&&oO<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(oN,oM,T){var C=this.gl;var oO=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 oL=gc.create(Float64Array);gc.multiply(oL,this.map._webglPainter.projMatrix,i);this.render(C,oL,{isPickRender:true});var e=new Uint8Array(4*this.pickWidth*this.pickHeight);C.readPixels(oN*oO-Math.floor(this.pickWidth/2),C.canvas.height-oM*oO-Math.floor(this.pickHeight/2),this.pickWidth,this.pickHeight,C.RGBA,C.UNSIGNED_BYTE,e);var oK=this.rgbToIndex(e);if(this.getPickedItem){var oP=this.getPickedItem(oK,T)}this.map._normalLayerMgr.restoreFramebuffer();return oP},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 ix("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(oK,T,C){var i=new ix(C);i.pixel=oK.pixel;i.latLng=oK.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 jZ(i){if(typeof kU!=="undefined"&&kU.sendMessage){kU.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;dQ.call(this,this.options);var C=this;ki.load("visualold",function(){C._onImplReady()},true)}jZ.inherits(dQ,"ThreeLayer");hv.extend(jZ.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 f8(e){e=e||{};dQ.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;ki.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)}f8.inherits(dQ,"FeatureLayer");hv.extend(f8.prototype,{_async:function(){this.loadModule=true;this.resolveStyle();this.parseData()},compileExpress:function(i,e){var i=gg.ExpressParse.normalizePropertyExpression(i,e);return i},resolveStyle:function(){if(!gg.ExpressParse){return}var e=this.style_opt||{};var T=eL[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 oL=T[i];if(e.hasOwnProperty(i)&&oL!==undefined){var oK=this.compileExpress(e[i],oL);C[i]=oK}}this.styleExpress=C}},_updateState:function(C,i,e){if(e){this._set(i,this._stateCube,C)}else{this._stateCube[C]=i}},_set:function(i,oK,C){var T=oK[C]||(oK[C]={});for(var e in i){T[e]=i[e]}},updateState:function(oK,oL,e){var C=JSON.stringify(this._stateCube);if(!(oL&&typeof oL==="object"&&Object.keys(oL).length>0)){return}if(!e){this._stateCube={}}if(oK 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);f8.call(this,i);if(i.nodeShow){var oK=JSON.parse(JSON.stringify(i));oK=Object.assign(oK,{enablePicked:false,autoSelect:false,coorSysMc:true});this.attachNode=new bD(oK)}if(i.nodeStrict){var T=this;ki.load("mvtParse",function(){T.parseData()},true)}}c3.Segment={START_POINT:1,END_POINT:2,BREAK_POINT:3,MIDDLE_POINT:4,1:1,2:2,3:3,4:4};c3.inherits(f8,"LineLayer");hv.extend(c3.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=fV.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={};f8.prototype.onDestroy.call(this);if(this.attachNode){this.attachNode.onDestroy()}},toString:function(){return"LineLayer"},render:function(){}});function f7(i){if(typeof kU!=="undefined"&&kU.sendMessage){kU.sendMessage("FillLayer")}i=i||{};this.type="polygon";var e=K.uiVersionIsGL()?"#142655":fq().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;f8.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 c3(C)}}f7.inherits(f8,"FillLayer");hv.extend(f7.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;f8.prototype.onDestroy.call(this);if(this.attach){this.attach.onDestroy()}},toString:function(){return"FillLayer"},render:function(){}});function bD(i){i=i||{};this.type="point";var e=K.uiVersionIsGL()?{color:"green",strokeColor:"red"}:{color:fq().fillColor,strokeColor:fq().strokeColor};this.style_opt={visibility:true,nodeType:bD.NodeType.SHAPE,shapeType:bD.ShapeType.TRIANGLE,anchor:bD.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;f8.call(this,i);kU.sendMessage("PointShapeLayer")}bD.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};bD.NodeType={ICON:1,SHAPE:2};bD.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};bD.inherits(f8,"PointShapeLayer");bD.hasMask=function(e){if(e===bD.ShapeType.TRIANGLE||e===bD.ShapeType.ARROW){return true}else{return false}};hv.extend(bD.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=[];f8.prototype.onDestroy.call(this)},toString:function(){return"PointShapeLayer"},render:function(){}});function i3(e){e=e||{};this.type="point";this.style_opt={visibility:true,nodeType:i3.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;f8.call(this,e);kU.sendMessage("PointIconLayer")}i3.NodeType={ICON:1,SHAPE:2};i3.inherits(f8,"PointIconLayer");hv.extend(i3.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=[];f8.prototype.onDestroy.call(this)},toString:function(){return"PointIconLayer"},updateVertex:function(){},render:function(){}});function ku(e){this.gl=e;this.cache={};this.currentProgram=null}ku.get=function(e,i){if(!e._visualProgramCache||e._visualProgramCache.gl!==i){e._visualProgramCache=new ku(i)}return e._visualProgramCache};ku._hash=function(T){var C=5381;for(var e=0;e>>0};ku._withLineNumbers=function(oK){var e=String(oK).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 oK=this.gl;var C=oK.createShader(i);oK.shaderSource(C,T);oK.compileShader(C);if(!oK.getShaderParameter(C,oK.COMPILE_STATUS)){var e=oK.getShaderInfoLog(C);oK.deleteShader(C);return{error:e}}return{shader:C}},_create:function(oK,e,oO){var oL=this.gl;var oN={key:oO,vsSource:oK,fsSource:e,program:null,attributes:{},attributeInfo:{},uniforms:{},uniformInfo:{},numAttributes:0,refCount:1,error:null};var oP=this._compileShader(oL.VERTEX_SHADER,oK);var oM=this._compileShader(oL.FRAGMENT_SHADER,e);if(oP.error||oM.error){var i=oP.error?"vertexShader":"fragmentShader";var C=oP.error||oM.error;oP.shader&&oL.deleteShader(oP.shader);oM.shader&&oL.deleteShader(oM.shader);oN.error={type:"compile",message:i+" 编译失败: "+C,source:oP.error?oK:e};console.error("[BMap] VisualProgram "+oN.error.message+"\n"+ku._withLineNumbers(oN.error.source));return oN}var T=oL.createProgram();oL.attachShader(T,oP.shader);oL.attachShader(T,oM.shader);oL.linkProgram(T);oL.deleteShader(oP.shader);oL.deleteShader(oM.shader);if(!oL.getProgramParameter(T,oL.LINK_STATUS)){oN.error={type:"link",message:"链接失败: "+oL.getProgramInfoLog(T),source:oK+"\n// ---- fragment ----\n"+e};oL.deleteProgram(T);console.error("[BMap] VisualProgram "+oN.error.message);return oN}oN.program=T;this._reflect(oN);return oN},_reflect:function(oR){var oL=this.gl;var oK=oR.program;var oO=oL.getProgramParameter(oK,oL.ACTIVE_ATTRIBUTES);oR.numAttributes=oO;for(var T=0;T1}}}});ku.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 h7(){}hv.extend(h7,{normalize:function(oP,oN){oN=oN||"id";var oK=this._toFeatureArray(oP);var C=[];for(var T=0;T-1){return}e.map=this.map;this.layers.push(e);this.sortLayer();if(e.enablePicked){aD.ensure(this.map)}if(this.gl){this._initLayer(e)}this.map.dispatchEvent(new ix("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 ix("onupdate"))},removeAllLayers:function(){for(var e=0;e=0;oK--){var oN=C[oK];var oM=this._pickTarget(oN,e,oO);if(!oM){continue}T.push({target:oN,item:oM});if(oL||!oN.pickThrough){break}}return T},_pickTarget:function(oL,oO,oM){var e=this.map;var oQ=e&&e._visualMgr;var oN=e&&e._webglPainter;if(!oQ||!oQ.gl||!oQ.pickFBO||!oN||!oN.drawVisualPickPass){return null}var T=oQ.gl;var oK=null;oQ.saveFramebuffer();oQ.bindFramebuffer(oQ.pickFBO);oQ.clear();try{if(oN.drawVisualPickPass([oL])){var oP=oL.pickTolerance==null?4:oL.pickTolerance;oK=this._readCandidates(T,oO,oM,oP)}}finally{oQ.restoreFramebuffer()}if(!oK||!oK.length){return null}for(var C=0;CaD.MAX_CANDIDATES?oT.slice(0,aD.MAX_CANDIDATES):oT},_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 nJ(e){e=e||{};bS.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}nJ.inherits(bS,"FeatureVisualLayer");nJ.INSTANCE_SETTERS={opacity:"setOpacity",visible:"setVisible",zIndex:"setZIndex",referCenter:"setRefCenter",renderStage:"setRenderStage",enablePicked:"setEnablePicked"};hv.extend(nJ.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(nJ.INSTANCE_SETTERS[e]){this[nJ.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){aD.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 bp(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={}}hv.extend(bp.prototype,{toString:function(){return"CustomRenderContext"}});function L(e){e=e||{};if(!e.vertexShader||!e.fragmentShader){throw new Error("WebGLCustomLayer 需要 vertexShader 与 fragmentShader")}bS.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:hv.extend({},e.uniforms||{}),attributes:hv.extend({},e.attributes||{}),textures:hv.extend({},e.textures||{}),vertices:e.vertices||null,indices:e.indices||null,draw:e.draw||null};this._renderState=L._normalizeRenderState(e.renderState);this._ctx=new bp(this)}L.inherits(bS,"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];hv.extend(L.prototype,{_getBaseMC:function(){if(this.center){var i=m8.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(oL){if(!oL||!oL.length){return oL}var oK=this._getBaseMC();if(typeof oL[0]==="number"){var oM=m8.convertLL2MC(new d9(oL[0],oL[1]));return[oM.lng-oK[0],oM.lat-oK[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(oL){if(!oL||!oL.length){return oL}var oK=this._getBaseMC();if(typeof oL[0]==="number"){var oM=m8.convertLL2MC(new d9(oL[0],oL[1]));return[oM.lng-oK[0],oM.lat-oK[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 oL=this._isHiddenColor(T.upcomingColor);var e=!i&&T.passedColor!=null;var oM=!oL&&T.upcomingColor!=null;C.hideAll=!T.lineVisible||(i&&oL);C.none=!(i||oL||e||oM);C.color=T.strokeColor;C.start=true;C.disappear=false;if(i){C.disappear=true}else{if(oL){C.start=false;C.disappear=true}else{if(e){C.color=T.passedColor}else{if(oM){C.start=false;C.color=T.upcomingColor}}}}if(C.hideAll){C.none=false;C.start=true;C.disappear=true}var oK=!(i&&oL)&&(i||e)&&(oL||oM);if(oK&&!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 nJ.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){bS.prototype.setVisible.call(this,e);this._syncMovePointVisible&&this._syncMovePointVisible()},toString:function(){return"TrackLine"}});function i8(i){i=i||{};nJ.call(this,i);var e=K.uiVersionIsGL()?"rgba(25, 25, 250, 0.6)":fq().fillColor;var C=K.uiVersionIsGL()?"rgba(250, 250, 25, 1)":fq().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()}i8.inherits(nJ,"PolygonLayer");hv.extend(i8.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(oM){var oK=this._style;var e=typeof oK.strokeWeight==="function"||oK.strokeWeight>0;if(!e){if(this._border){this._border.onDestroy();this._border=null}return false}var oN=!this._border;if(oN){this._border=new gZ({strokeLineJoin:"miter",strokeLineCap:"butt",referCenter:this.center||null})}var oL=["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&&oP.current_city["code"]<=9378){oP.current_city["name"]="台湾省"}if(oP.current_city["code"]>=20000&&oP.current_city["code"]<=20499){oP.current_city["name"]="新加坡"}if(oP.current_city["code"]>=20500&&oP.current_city["code"]<=25999){oP.current_city["name"]="泰国"}if(oP.current_city["code"]>=26000&&oP.current_city["code"]<=29999){oP.current_city["name"]="日本"}if(oP.current_city["code"]>=30000&&oP.current_city["code"]<=30999){oP.current_city["name"]="韩国"}if(oP.current_city["code"]>=31000&&oP.current_city["code"]<=37000){oP.current_city["name"]="亚太"}if(oP.current_city["code"]>=46609&&oP.current_city["code"]<=52505){oP.current_city["name"]="欧洲"}if(oP.current_city["code"]>=39509&&oP.current_city["code"]<=53500){oP.current_city["name"]="南美洲"}if(oP.current_city["code"]>=54000&&oP.current_city["code"]<=70000){oP.current_city["name"]="北美洲"}if(oP.current_city["code"]===54003&&oP.current_city["code"]>=60731&&oP.current_city["code"]<=61123){oP.current_city["name"]="美国"}if(oP.current_city["code"]===54015||oP.current_city["code"]>=57970&&oP.current_city["code"]<=60223){oP.current_city["name"]="加拿大"}if(oP.current_city["code"]===54025||oP.current_city["code"]>=54338&&oP.current_city["code"]<=57374){oP.current_city["name"]="墨西哥"}e.enableRequest=true;if(oP&&oP.current_city){var oO=oP.current_city["name"];var oN=oP.current_city["code"];if(oN!==i.cCode){var oM=new ix("oncitychange");oM.name=oO;oM.code=oN;i.dispatchEvent(oM)}i.cityName=oO;i.cCode=oN;if(!c9()){eO(i)}}},{qt:"cen",b:C.lng+","+C.lat+";"+oK.lng+","+oK.lat,l:oL},"","",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 nj(C){var e={};var i=new oo(e);C.addControl(i);return i}function cA(C){var i={};var e=new nl(i);C.stickySpamCtrl=e;C.addControl(e);return e}function X(i){if(i.temp.copyadded){return}i.temp.copyadded=true;if(!i.cpyCtrl){var T=new mU(2,2);i.config.cpyCtrlOffset=T;if(c9()){T.width=72;T.height=0}var C=new i0({offset:T,printable:true});i.cpyCtrl=C}if(!c9()||i.config.showCopyrightOnMobile){eO(i);i.addEventListener("maptypechange",function(){eO(i)});i.addEventListener("onlanguage_change",function(){eO(i)})}i.addControl(C);var e=new cB();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 mU(4,2))}});if(i.getSize().width>=300&&i.getSize().height>=100){e.show()}else{e.hide();C.setOffset(new mU(4,2))}i.addEventListener("oncopyrightoffsetchange",function(oK){i.logoCtrl.setOffset(oK.target.logo);i.cpyCtrl.setOffset(oK.target.cpy);if(oK.target.cpy){i.config.cpyCtrlOffset=oK.target.cpy}});i.dispatchEvent(new ix("oncopyrightaddend"))}function eO(oZ){if(!oZ.cpyCtrl){var o7=new mU(2,2);if(c9()){o7.width=72;o7.height=0}var o2=new i0({offset:o7,printable:true});oZ.cpyCtrl=o2}var pg=oZ.cityName||"中国";var o0=oZ.getMapTypeId();var o1=["常州市","南昌市","乌鲁木齐市","无锡市","福州市","泉州市","珠海市","贵阳市"];var oT=["北京市","上海市","广州市","深圳市","宁波市","石家庄市","沈阳市","长春市","青岛市","温州市","台州市","金华市","佛山市","中山市","昆明市","南宁市","苏州市","西安市","济南市","郑州市","合肥市","呼和浩特市","杭州市","成都市","武汉市","长沙市","天津市","南京市","重庆市","大连市","东莞市","厦门市"];var oV=["香港特别行政区"];var oO=["台湾省"];var o8=["日本"];var pe=["韩国"];var o3=["泰国"];var o6=["亚太"];var oP=["新加坡"];var pf=["欧洲"];var T=["南美洲"];var pb=["北美洲"];var C=["美国"];var o5=["墨西哥"];var oM=["加拿大"];for(var pc in o1){if(o1[pc]===pg){var oW=true;break}}for(var pc in oT){if(oT[pc]===pg){var oK=true;break}}for(var pc in oV){if(oV[pc]===pg){var pi=true;break}}if(oO[0]===pg){var pa=true}if(oP[0]===pg){var i=true}if(o8[0]===pg){var oS=true}if(pe[0]===pg){var oY=true}if(o3[0]===pg){var oX=true}if(o6[0]===pg){var oN=true}if(pf[0]===pg){var oU=true}if(T[0]===pg){var oR=true}if(pb[0]===pg){var e=true}if(C[0]===pg){var pd=true}if(oM[0]===pg){var o9=true}if(o5[0]===pg){var oL=true}var oQ=K.getGS(oZ.getLanguage());var ph=["© 2026 Baidu - "+oQ+"号 - 甲测资字11111342 - 京ICP证030173号 - Data © "];var o4="rgba(255, 255, 255, 0.701961)";if(oZ.getZoom()<=9){ph.push("百度智图");ph.push(' & OpenStreetMap');ph.push(' & HERE');if(o0===j9||o0===fp){ph.push(' & ESO');o4="rgba(0,0,0,.7)"}}else{if(oS||oY){ph.push('OpenStreetMap')}else{if(i||oX){ph.push('HERE')}else{if(oN){ph.push('HERE');ph.push(' & Mapbox')}else{if(oU){ph.push('OpenStreetMap');ph.push(' & Mapbox')}else{if(oR){ph.push('OpenStreetMap');ph.push(' & Mapbox')}else{if(pd||oL||o9){ph.push('HERE');ph.push(' & Mapbox')}else{if(e){ph.push('OpenStreetMap');ph.push(' & Mapbox')}else{ph.push("百度智图");if(oW){ph.push(' & PalmCity')}if(pi){ph.push(' & MapKing')}if(pa){ph.push(' & HERE');ph.push(' & 樂客LocalKing')}if(o0===j9||o0===fp){o4="rgba(0,0,0,.6)"}}}}}}}}}ph.unshift('');ph.push("");ph=ph.join("");oZ.cpyCtrl.addCopyright({id:1,content:ph})}function oo(e){this["defaultAnchor"]=BMAP_ANCHOR_TOP_RIGHT;this["defaultOffset"]=e.defaultOffset||new mU(90,6);this._cZIndex=9999;this._visible=false}oo.prototype=new jM();oo.prototype.initialize=function(oK){this._map=oK;var T=this;var e=da("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 oL=da("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;"});oL.innerText="确定";oL.addEventListener("click",function(){T.hide()});var C=da("div");var oM=C.style;oM.position="relative";oM.width="100%";oM.height="100%";oM.color="#000";oM.fontSize="14px";oM.wordBreak="break-all";e.appendChild(C);e.appendChild(oL);oK.getContainer().appendChild(e);return e};oo.prototype._setPosition=function(){};oo.prototype.update=function(e){if(!this.isVisible()){this._container.firstChild.innerText=e;this.show()}};function nl(C){jM.call(this);C=C||{};this._opts={};this._opts=hv.extend(this._opts,C);var i=lK();var oK=c0.popup_code;var e="系统于"+i.year+"年"+i.month+"月"+i.day+"日";this._prefixMsg="【"+oK+"】"+e;this["defaultAnchor"]=gv.TOP_RIGHT;var T=c9()?new mU(40,40):new mU(200,40);this["defaultOffset"]=C.defaultOffset||T;this._cZIndex=9999;this._visible=false}nl.inherits(jM,"StickySpam");nl.prototype.initialize=function(oK){this._map=oK;var T=this;var e=this._container=da("div");var i=e.style;i.display="none";i.padding="10px 15px";i.overflow="visible";i.maxWidth=c9()?"250px":"360px";i.background="#fff8ee";i.borderWidth="3px";i.borderStyle="solid";i.borderColor="#e29e32";i.position="relative";var C=da("div");var oL=C.style;oL.position="relative";oL.width="100%";oL.height="100%";oL.color="#e29e32";oL.fontSize="14px";oL.fontWeight="500";oL.wordBreak="break-all";oL.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);oK.getContainer().appendChild(e);return e};nl.prototype.update=function(i){if(!this.isVisible()){var e=this._convertUrlsToLinks(this._prefixMsg+i);this._container.firstChild.innerHTML=e;this.show()}};nl.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 oK=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 fT="carport_auth";var e6="cur";var an="cen";var W="s";var fv="con";var fh="bd";var eA="nb";var kc="bt";var bo="nav";var lL="walk";var iG="gc";var fX="rgc";var Y="dec";var l8="iploc";var jR="bse";var jb="nse";var e2="s";var gH="bsl";var iD="bda";var gB="sa";var bW="nba";var lV="drag";var mV="ext";var nZ="exts";var n6="hip";var kY="ride";var mZ="drct_riding";var on="drct";var dg="ldt";var aU="place";var h2=2;var b4=4;var iP=7;var lW=11;var dv=12;var hp=14;var ew=15;var gm=18;var a2=20;var bV=21;var S=19;var a=23;var mp=26;var a4=28;var jc=31;var hE=35;var l9=44;var b2=45;var aZ=46;var nW=47;var ji=-1;var bZ=0;var cu=1;var m5=2;var fM=3;window.BMAP_POI_TYPE_NORMAL=0;var ef=1;var l0=2;BMapGL.I=hv.I;var cK={};cK.removeHtml=function(e){e=e.replace(/<\/?[^>]*>/g,"");e=e.replace(/[ | ]* /g," ");return e};cK.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;")};cK.parseGeoExtReg2=function(i,e){var C=new RegExp("(((-?\\d+)(\\.\\d+)?),((-?\\d+)(\\.\\d+)?);)(((-?\\d+)(\\.\\d+)?),((-?\\d+)(\\.\\d+)?);){"+e+"}","ig");return i.replace(C,"$1")};var fD=0;var e4=1;var ah=2;cK.unique=function(C){var oL=false;var oK=[];var oM={};for(var T=0,e=C.length;T21){C=21}return C};cK.parseGeo=function(oM,oP){if(typeof oM!="string"||!oM){return}var oR=oM.split("|");var e;var oK;var C;if(oR.length==1){e=di(oM)}else{e=di(oR[2]);oK=di(oR[0]);C=di(oR[1]);if(!oP){return e}}var oN={type:e.geoType};if(oP){switch(oN.type){case ah:var oO=new d9(e.geo[0][0],e.geo[0][1]);var oQ=m8.convertMC2LL(oO);oN.point=oQ;oN.points=[oQ];break;case e4:oN.points=[];var oS=e.geo[0];for(var oL=0,T=oS.length-1;oL0.25&&oT<1){oT=1}else{if(oT>32){oT=32}}}}var oO=o2.split("|");if(oO.length==1){var T=di(oO[0]);return{type:T.type,bound:"",points:T.geo.join(",")}}else{if(oO.length>1){var oU=o2.split(";.=");var oQ=[];var oK=[];var oV=0;var oZ=oU.length;for(var oW=0;oW1){if(oW==0){o1=o1+";"}if(oW>0&&oW0){o0=cK.parseGeoExtReg2(o0,oT)}oK.push(o0)}if(oZ<=1){oK=oK.join(";")}if(oZ==2){var C=oK[0]+";"+oK[1];var oM=C.split(";");var e=[];for(var oW=0;oWe0){e=e0-e}if(oN>e0){oN=e0-oN}T.push(T[C-2]+e);T.push(T[C-1]+oN);return 0}function fu(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}cK.pathToPoints=function(oL){var T=[];if(typeof oL!=="string"){return T}else{var oK=oL.split(";");for(var C=0;Cee.MAX_PAGE_CAPACITY?ee.DEFAULT_PAGE_CAPACITY:e)}else{this._opts.pageCapacity=ee.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=ee.DEFAULT_PAGE_NUM}},getPageNum:function(){return this._opts.pageNum},toString:function(){return"LocalSearch"}});function b5(i){if(typeof kU!=="undefined"&&kU.sendMessage){kU.sendMessage("Geocoder")}this._opts={};this.setOptions(i||{});this._queryList=[];var e=this;ki.load("otherSearch",function(){e._asyncSearch()})}b5.inherits(eX,"Geocoder");hv.extend(b5.prototype,{getPoint:function(e,C,i){kU.sendMessage("Geocoder","getPoint");this._queryList.push({method:"getPoint",arguments:[e,C,i]})},getLocation:function(e,C,i){kU.sendMessage("Geocoder","getLocation");this._queryList.push({method:"getLocation",arguments:[e,C,i]})},setOptions:function(e){hv.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 eG(e){if(typeof kU!=="undefined"&&kU.sendMessage){kU.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;ki.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){kU.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=hh.MAX_PAGE_CAPACITY;return}}if(typeof e!=="number"){this._opts.pageCapacity=hh.MAX_PAGE_CAPACITY;return}if(e>=1&&e<=hh.MAX_PAGE_CAPACITY){this._opts.pageCapacity=Math.round(e)}else{this._opts.pageCapacity=hh.MAX_PAGE_CAPACITY}},toString:function(){return"TransitRoute"},_shortTitle:function(e){return e.replace(/\(.*\)/,"")}});window.BMAP_HIGHLIGHT_STEP=1;window.BMAP_HIGHLIGHT_ROUTE=2;var ek=function(e,T){oa.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;ki.load("route",function(){C._asyncSearch()},true);if(this.init_d){this.init_d()}};ek.ROAD_TYPE=["","roundabout","unknownRoad","mainRoad","highwayConnector","roadSegWithinInter","connectingRoad","parkInnerRoad","serviceInnerRoad","bridge","pedeStreet","serviceRoad","ramp","fullyEnclosedRoad","undefinedTrafficArea","poiConnectorRoad","tunnel","footpath","busOnlyLane","advancedLeftLane",];hv.inherit(ek,oa,"DWRoute");hv.extend(ek.prototype,{search:function(C,e,i){kU.sendMessage(this._className,"search");this._queryList.push({method:"search",arguments:[C,e,i]})}});var mB=function(e,oK){oa.call(this,e,oK);this._overlays=[];this._queryList=[];var T=this;this.map=oK.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=fb.translate("delPoint",this._language);var C=new lx(i,function(oN,oM,oL){T._deleteVia(oL.curNo-1)},60);this._menu.addItem(C);this.map.addContextMenu(this._menu,true);this.map.addEventListener("onlanguage_change",function(oL){C.setText(fb.translate("delPoint",T.map.getLanguage()))})}ki.load("route",function(){T._asyncSearch()},true);if(this.init_d){this.init_d()}};hv.inherit(mB,oa,"LineLayerRoute");hv.extend(mB.prototype,{search:function(C,e,i){kU.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 dY(i,C){ek.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.avoidFerry=C.avoidFerry?1:0;this.QUERY_TYPE=bo;this.RETURN_TYPE=a2;this.ROUTE_TYPE=BMAP_ROUTE_TYPE_DRIVING;kU.sendMessage("DrivingRoute","search")}function iS(e,i){mB.call(this,e,i);i=i||{};this.setPolicy(i.policy);this.alternatives=i.alternatives?1:0;this.avoidFerry=i.avoidFerry?1:0;this.QUERY_TYPE=bo;kU.sendMessage("DrivingRoute","searchLine")}hv.inherit(iS,mB,"DrivingRouteLine");hv.inherit(dY,ek,"DrivingRoute");dY.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}};iS.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 h3(e,i){ek.call(this,e,i);this.QUERY_TYPE=lL;this.RETURN_TYPE=jc;this.ROUTE_TYPE=BMAP_ROUTE_TYPE_WALKING;this._enableDragging=false}hv.inherit(h3,ek,"WalkingRoute");function eT(e,i){ek.call(this,e,i);this.QUERY_TYPE=kY;this.ROUTE_TYPE=BMAP_ROUTE_TYPE_RIDING;this._enableDragging=false}hv.inherit(eT,ek,"RidingRoute");function cH(e,i){eT.call(this,e,i);this.QUERY_TYPE=mZ}hv.inherit(cH,eT,"EBikeRoute");function ak(e,i){mB.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=dg;this.setPolicy(i.policy)}hv.inherit(ak,mB,"TruckRoute");ak.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 bO={web:K.urlProtocol+"//" + window.location.host + "/bmap-api/direction?",android:"bdapp://map/direction?",ios:"baidumap://map/direction?"};function mx(e){this.opts=e||{}}hv.extend(mx.prototype,{routeCall:function(T,e,C){var i=this;ki.load("route",function(){i._asyncSearch(T,e,C)})}});function dB(e,oO){var C=180/Math.pow(2,oO);var T=c9()?2:1;var i=e.width;var oM=e.height;var oP=i/oM>1?oM:i;var oL=C/oP;var oK=Math.floor(oO)+T;var oN=360/(Math.pow(2,oK-2)*2*oL);while(oN>512){oK++;oN=360/(Math.pow(2,oK-2)*2*oL)}if(oK>f.TILE_MAX_ZOOM){oN=oN*Math.pow(2,oK-f.TILE_MAX_ZOOM);oK=f.TILE_MAX_ZOOM}else{if(oK0&&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 k2(){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 dh(C){if(C===false){return false}if(typeof dh._supportWebGL==="boolean"){return dh._supportWebGL}var T=false;if(!window.WebGLRenderingContext){T=false}else{if(lt()&&k2()<5){T=false}else{try{var i=document.createElement("canvas");T=!!(i.getContext("webgl")||i.getContext("experimental-webgl"))}catch(oK){T=false}}}dh._supportWebGL=T;return T}function dF(){if(typeof dF._useThumb==="boolean"){return dF._useThumb}var e=navigator.userAgent;dF._useThumb=!!(d4()||e.indexOf("Chrome")>-1||e.indexOf("SAMSUNG-GT-I9508")>-1);return dF._useThumb}function h1(oO,oM){if(!oO||!oM){return 0}var C=oO.lat;var i=oM.lat;var oS=oO.lng;var oN=oM.lng;var T=6371000;var oP=mn(C);var oL=mn(i);var e=mn(i-C);var oR=mn(oN-oS);var oQ=Math.sin(e/2)*Math.sin(e/2)+Math.cos(oP)*Math.cos(oL)*Math.sin(oR/2)*Math.sin(oR/2);var oK=2*Math.atan2(Math.sqrt(oQ),Math.sqrt(1-oQ));return T*oK}function dx(e){return e-Math.floor(e/360)*360}var hU=[K.urlProtocol+"//" + window.location.host + "/bmap-sv0/",K.urlProtocol+"//" + window.location.host + "/bmap-sv1/"];function nN(e){if(typeof e!=="number"){return K.panoTilePath}return hU[Math.abs(e)%hU.length]}function ol(e){var oL=e.split("//");if(oL.length>=2){var oK=oL[1].split("?");if(oK.length>=1){var oN=oK[0].split("/");var C=1;if(window.urlSplitBeginIndex){C=window.urlSplitBeginIndex}var oM="";for(var T=C;T<=oN.length-1;T++){if(T===oN.length-1){oM+=oN[T]}else{oM+=oN[T]+"/"}}return{host:oK[0],origin:oL[0]+"//"+oN[0],path:"/"+oM}}}return null}function eF(oK,oL){var T=(Math.random()*100000).toFixed(0);var C="_panoCbk"+T;var i=false;cv._rd=cv._rd||{};cv._rd[C]=function(oM){i=true;delete cv._rd[C];oL&&oL(oM)};var e=oK+"&callback="+h6+"._rd."+C;e+=np()(e);jW.load(e,null,function(){if(i){return}i=true;delete cv._rd[C];oL&&oL(undefined)})}function jB(T,e){var C=!!(window._BMapSecurityConfig&&window._BMapSecurityConfig["serviceHost"]);var i=K.apiHost+"/?qt="+T+"&v="+ep();if(!C){i+="&ak="+((typeof hj!=="undefined")?hj:"")}return i+(e||"")}function k3(e){return !!(e&&e.error!==undefined&&e.error===0)}function gT(e){eF(jB("pano_entry"),e)}function iA(e){if(e===undefined){return true}return k3(e)}function n3(){alert("您需要申请全景地图服务使用权限")}var cg=(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;eF(jB("pano_count","&consume="+T),function(oK){if(k3(oK)){return}gT(function(oL){if(!k3(oL)){n3()}})})},5000)}})();function b9(oO,i){var oN="SJvEY5h37ZDh5pHS";var C=1800;var oM=Date.parse(new Date());var T=oM/1000;var oL=(typeof hj!=="undefined")?hj:"";var e=oO+"-"+(T+C)+"-"+oM+"-"+oL+"-"+oN;var oK=md5(e);i=i||{};if(i.isCounter!==false){cg(i.counter||1)}return"auth_key="+(T+C)+"-"+oM+"-"+oL+"-"+oK}function du(i,C){var e=ol(i);if(e){return i+"&"+b9(e.path,C)}return i}function ec(){eX.call(this);this._overlayId="PanoramaOverlay_"+this.hashCode;this._pano=null;this._visible=true}ec.inherits(eX,"PanoramaOverlayBase");hv.extend(ec.prototype,{getOverlayId:function(){return this._overlayId},initialize:function(){},remove:function(){},_setOverlayProperty:function(){}});var mY=0;function f(i,e){if(!(this instanceof f)){return new f(i,e)}if(typeof kU!=="undefined"&&kU.sendMessage){kU.sendMessage("Panorama")}eX.call(this);this._guid=f.getGUID();this._container=f._getContainer(i);var T=null;var oK=null;if(e){if(e instanceof li){oK=e}else{T=e;oK=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=oK;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(oK&&oK.on){oK.on("destroy",function(){C.destroy()})}if(this._opts._lazyLoad!==true){this._load()}}f.inherits(eX,"Panorama");f.MIN_ZINDEX=1200;f.getMinZIndex=function(){return K.apiVersionIsGL()?20:f.MIN_ZINDEX};f.MAX_ZOOM=4;f.MIN_ZOOM=1;f.TILE_MAX_ZOOM=5;f.TILE_MIN_ZOOM=4;f.getGUID=function(){return"pano_"+(mY++)+"_"+(+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)};cv._panoRegister=cv._panoRegister||[];cv.panoRegister=function(e){if(typeof e==="function"){cv._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}};hv.extend(f.prototype,{_load:function(){if(this._loadStarted){return}this._loadStarted=true;var e=this;gT(function(i){if(!iA(i)){n3();return}ki.load("panorama",function(){e._draw()},true)})},addEventListener:function(oL,oK,C){var i=oL.indexOf("on")===0?oL:"on"+oL;var T=f.GL_EVENT_PAYLOADS[i];if(!K.apiVersionIsGL()||!T||typeof oK!=="function"||this._bindingInternal){return eX.prototype.addEventListener.call(this,oL,oK,C)}var e=this;var oM=function(oN){return oK.call(this,T(oN,e))};eX.prototype.addEventListener.call(this,oL,oM,C);oK.hashCode=oM.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 mU(0,0)}return new mU(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:dx(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]=hv.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