From aea8f7c8ca2d17aa94d212daef280c6462d2364b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=BB=B2=E4=B9=88=E4=BA=86?= Date: Mon, 19 Feb 2024 15:28:43 +0800 Subject: [PATCH] map --- index.html | 1 + package.json | 1 + pnpm-lock.yaml | 111 ++++++++++++++++++++++++ public/js/amap.min.js | 3 + src/main.ts | 13 ++- src/views/pms/voltage-sags/overview.vue | 28 ++++++ 6 files changed, 153 insertions(+), 4 deletions(-) create mode 100644 public/js/amap.min.js create mode 100644 src/views/pms/voltage-sags/overview.vue diff --git a/index.html b/index.html index 5d4f2926..50a5fa13 100644 --- a/index.html +++ b/index.html @@ -5,6 +5,7 @@ 电能质量数据监测云平台 +
diff --git a/package.json b/package.json index 0ace7947..abe44ecd 100644 --- a/package.json +++ b/package.json @@ -11,6 +11,7 @@ "dependencies": { "@element-plus/icons-vue": "^2.3.1", "@fortawesome/fontawesome-free": "^6.5.1", + "@vuemap/vue-amap": "^2.1.1", "@vueuse/core": "^10.7.0", "@wangeditor/editor": "^5.1.23", "@wangeditor/editor-for-vue": "^5.1.12", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index f5ec1209..46155a1d 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -7,6 +7,9 @@ dependencies: '@fortawesome/fontawesome-free': specifier: ^6.5.1 version: 6.5.1 + '@vuemap/vue-amap': + specifier: ^2.1.1 + version: 2.1.1(vue@3.3.13) '@vueuse/core': specifier: ^10.7.0 version: 10.7.0(vue@3.3.13) @@ -649,6 +652,18 @@ packages: '@jridgewell/sourcemap-codec': 1.4.15 dev: true + /@math.gl/core@3.6.3: + resolution: {integrity: sha512-jBABmDkj5uuuE0dTDmwwss7Cup5ZwQ6Qb7h1pgvtkEutTrhkcv8SuItQNXmF45494yIHeoGue08NlyeY6wxq2A==} + dependencies: + '@babel/runtime': 7.23.8 + '@math.gl/types': 3.6.3 + gl-matrix: 3.4.3 + dev: false + + /@math.gl/types@3.6.3: + resolution: {integrity: sha512-3uWLVXHY3jQxsXCr/UCNPSc2BG0hNUljhmOBt9l+lNFDp7zHgm0cK2Tw4kj2XfkJy4TgwZTBGwRDQgWEbLbdTA==} + dev: false + /@microsoft/api-extractor-model@7.28.3(@types/node@20.10.5): resolution: {integrity: sha512-wT/kB2oDbdZXITyDh2SQLzaWwTOFbV326fP0pUwNW00WeliARs0qjmXBWmGWardEzp2U3/axkO3Lboqun6vrig==} dependencies: @@ -844,6 +859,24 @@ packages: resolution: {integrity: sha512-VeJbUb0wEKbcwaSlj5n+LscBl9IPgLPkHVGBkh00cztv6X4L/TJXK58LzFuBKX7/GAfiGhIwH67YTLTlzvIzBA==} dev: false + /@turf/helpers@6.5.0: + resolution: {integrity: sha512-VbI1dV5bLFzohYYdgqwikdMVpe7pJ9X3E+dlr425wa2/sMJqYDhTO++ec38/pcPvPE6oD9WEEeU3Xu3gza+VPw==} + dev: false + + /@turf/intersect@6.5.0: + resolution: {integrity: sha512-2legGJeKrfFkzntcd4GouPugoqPUjexPZnOvfez+3SfIMrHvulw8qV8u7pfVyn2Yqs53yoVCEjS5sEpvQ5YRQg==} + dependencies: + '@turf/helpers': 6.5.0 + '@turf/invariant': 6.5.0 + polygon-clipping: 0.15.7 + dev: false + + /@turf/invariant@6.5.0: + resolution: {integrity: sha512-Wv8PRNCtPD31UVbdJE/KVAWKe7l6US+lJItRR/HOEW3eh+U/JwRCSUl/KZ7bmjM/C+zLNoreM2TU6OoLACs4eg==} + dependencies: + '@turf/helpers': 6.5.0 + dev: false + /@types/argparse@1.0.38: resolution: {integrity: sha512-ebDJ9b0e702Yr7pWgB0jzm+CX4Srzz8RcXtLJDJB+BSccqMa36uyH/zUsSYao5+BD1ytv3k3rPYCq4mAE1hsXA==} dev: false @@ -1080,6 +1113,50 @@ packages: /@vue/shared@3.3.13: resolution: {integrity: sha512-/zYUwiHD8j7gKx2argXEMCUXVST6q/21DFU0sTfNX0URJroCe3b1UF6vLJ3lQDfLNIiiRl2ONp7Nh5UVWS6QnA==, tarball: https://registry.npmmirror.com/@vue/shared/-/shared-3.3.13.tgz} + /@vuemap/amap-jsapi-loader@1.0.4: + resolution: {integrity: sha512-s5fFHrsNkjYMovEmUJ5S23jpDtElTanDN2HdCt/amOD245a8wWVcTPjl06YEHXtxf6Ewm+z29wQByOCn209Hxg==} + dev: false + + /@vuemap/amap-jsapi-types@0.0.16: + resolution: {integrity: sha512-1B1H2IS8sT2RDubbpEY+K8j11Gb7PZY5Bo0cszRkF8Nw+9HNqpbUNeqkQ6+rxLkwIedcSkOsFDy/IyzXCUXqVw==} + dev: false + + /@vuemap/amap-jsapi-types@0.0.17: + resolution: {integrity: sha512-FHI8OMWxJWbgyuQ0tKclvurQIVHRexMIYAOwZ/z9+G7aHHK5EFhKM13siLczNNAgXdJ2dctPEghCdlhcByl3Ag==} + dev: false + + /@vuemap/amap-xyz-layer@0.0.10: + resolution: {integrity: sha512-NHAGN57EFn2Xpktwx6+fqlVHmu8MvG4gl9fQJT2LepAJSmgFG+o+YtOoJFXwdT8BOg8W5evJNE+CZC0833zZpA==} + engines: {node: '>= 16'} + dependencies: + '@math.gl/core': 3.6.3 + earcut: 2.2.4 + gl-matrix: 3.4.3 + dev: false + + /@vuemap/district-cluster@0.0.11: + resolution: {integrity: sha512-SY01gFe8uhP5FKjzyTe0x2yL2K5VmwD5UKlEUU4e09UUZphXCj2Ci7iunX0L29nWINkBjdfxu8dXzhIcx9T3ug==} + engines: {node: '>= 16'} + dependencies: + '@turf/helpers': 6.5.0 + '@turf/intersect': 6.5.0 + '@vuemap/amap-jsapi-types': 0.0.16 + topojson-client: 3.1.0 + dev: false + + /@vuemap/vue-amap@2.1.1(vue@3.3.13): + resolution: {integrity: sha512-340nZxN7jgl9ff1phBnVPoPumzZPA03S6bf3KPhn1ybschw7gm2RNX+h0kFC+sOmFxyjRJULh2g1a2tdiQtHsA==} + peerDependencies: + vue: '3' + dependencies: + '@vuemap/amap-jsapi-loader': 1.0.4 + '@vuemap/amap-jsapi-types': 0.0.17 + '@vuemap/amap-xyz-layer': 0.0.10 + '@vuemap/district-cluster': 0.0.11 + lodash-es: 4.17.21 + vue: 3.3.13(typescript@5.3.3) + dev: false + /@vueuse/core@10.7.0(vue@3.3.13): resolution: {integrity: sha512-4EUDESCHtwu44ZWK3Gc/hZUVhVo/ysvdtwocB5vcauSV4B7NiGY5972WnsojB3vRNdxvAt7kzJWE2h9h7C9d5w==, tarball: https://registry.npmmirror.com/@vueuse/core/-/core-10.7.0.tgz} dependencies: @@ -1451,6 +1528,10 @@ packages: delayed-stream: 1.0.0 dev: false + /commander@2.20.3: + resolution: {integrity: sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==} + dev: false + /commander@9.5.0: resolution: {integrity: sha512-KRs7WVDKg86PWiuAqhDrAQnTXZKraVcCc6vFdL14qrZ/DcWwuRo7VoiYXalXO7S5GKpqYiVEwCbgFDfxNHKJBQ==} engines: {node: ^12.20.0 || >=14} @@ -1522,6 +1603,10 @@ packages: ssr-window: 3.0.0 dev: false + /earcut@2.2.4: + resolution: {integrity: sha512-/pjZsA1b4RPHbeWZQn66SWS8nZZWLQQ23oE3Eam7aroEFGEvwKAsJfZ9ytiEMycfzXWpca4FA9QIOehf7PocBQ==} + dev: false + /echarts@4.9.0: resolution: {integrity: sha512-+ugizgtJ+KmsJyyDPxaw2Br5FqzuBnyOWwcxPKO6y0gc5caYcfnEUIlNStx02necw8jmKmTafmpHhGo4XDtEIA==} dependencies: @@ -1707,6 +1792,10 @@ packages: engines: {node: '>=6.9.0'} dev: true + /gl-matrix@3.4.3: + resolution: {integrity: sha512-wcCp8vu8FT22BnvKVPjXa/ICBWRq/zjFfdofZy1WSpQZpphblv12/bOQLBC1rMM7SGOFS9ltVmKOHil5+Ml7gA==} + dev: false + /glob-parent@5.1.2: resolution: {integrity: sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==, tarball: https://registry.npmmirror.com/glob-parent/-/glob-parent-5.1.2.tgz} engines: {node: '>= 6'} @@ -2027,6 +2116,13 @@ packages: vue-demi: 0.14.6(vue@3.3.13) dev: false + /polygon-clipping@0.15.7: + resolution: {integrity: sha512-nhfdr83ECBg6xtqOAJab1tbksbBAOMUltN60bU+llHVOL0e5Onm1WpAXXWXVB39L8AJFssoIhEVuy/S90MmotA==} + dependencies: + robust-predicates: 3.0.2 + splaytree: 3.1.2 + dev: false + /postcss@8.4.32: resolution: {integrity: sha512-D/kj5JNu6oo2EIy+XL/26JEDTlIbB8hw85G8StOE6L74RQAVVP5rej6wxCNqyMbR4RkPfqvezVbPw81Ngd6Kcw==, tarball: https://registry.npmmirror.com/postcss/-/postcss-8.4.32.tgz} engines: {node: ^10 || ^12 || >=14} @@ -2079,6 +2175,10 @@ packages: supports-preserve-symlinks-flag: 1.0.0 dev: false + /robust-predicates@3.0.2: + resolution: {integrity: sha512-IXgzBWvWQwE6PrDI05OvmXUIruQTcoMDzRsOd5CDvHCVLcLHMTSYvOK5Cm46kWqlV3yAbuSpBZdJ5oP5OUoStg==} + dev: false + /rollup@4.9.1: resolution: {integrity: sha512-pgPO9DWzLoW/vIhlSoDByCzcpX92bKEorbgXuZrqxByte3JFk2xSW2JEeAcyLc9Ru9pqcNNW+Ob7ntsk2oT/Xw==, tarball: https://registry.npmmirror.com/rollup/-/rollup-4.9.1.tgz} engines: {node: '>=18.0.0', npm: '>=8.0.0'} @@ -2162,6 +2262,10 @@ packages: engines: {node: '>=0.10.0'} dev: false + /splaytree@3.1.2: + resolution: {integrity: sha512-4OM2BJgC5UzrhVnnJA4BkHKGtjXNzzUfpQjCO8I05xYPsfS/VuQDwjCGGMi8rYQilHEV4j8NBqTFbls/PZEE7A==} + dev: false + /sprintf-js@1.0.3: resolution: {integrity: sha512-D9cPgkvLlV3t3IzL0D0YLvGA9Ahk4PcvVwUbN0dSGr1aP0Nrt4AEnTUbuGvquEC0mA64Gqt1fzirlRs5ibXx8g==} dev: false @@ -2216,6 +2320,13 @@ packages: dependencies: is-number: 7.0.0 + /topojson-client@3.1.0: + resolution: {integrity: sha512-605uxS6bcYxGXw9qi62XyrV6Q3xwbndjachmNxu8HWTtVPxZfEJN9fd/SZS1Q54Sn2y0TMyMxFj/cJINqGHrKw==} + hasBin: true + dependencies: + commander: 2.20.3 + dev: false + /tslib@2.3.0: resolution: {integrity: sha512-N82ooyxVNm6h1riLCoyS9e3fuJ3AMG2zIZs2Gd1ATcSFjSA23Q0fzjjZeh0jbJvWVDZ0cJT8yaNNaaXHzueNjg==, tarball: https://registry.npmmirror.com/tslib/-/tslib-2.3.0.tgz} dev: false diff --git a/public/js/amap.min.js b/public/js/amap.min.js new file mode 100644 index 00000000..cb2cd661 --- /dev/null +++ b/public/js/amap.min.js @@ -0,0 +1,3 @@ +(function(config){!function(global,factory){"object"==typeof exports&&"undefined"!=typeof module?module.exports=factory():"function"==typeof define&&define.amd?define(factory):(global=global||self).AMap=factory()}(this,function(){"use strict";var shared,worker,AMap;function define(_,chunk){var sharedChunk,workerBundleString;shared?worker?(workerBundleString='var sharedChunk = {key:"'+config[0]+'",db:"'+(config[14]||"")+'",nebulaVersion:"'+(config[15]||"")+'",movingDraw:'+Boolean(window.movingDraw)+',host:"'+config[2]+'",}; ('+shared+")(sharedChunk); ("+worker+")(sharedChunk);",sharedChunk={key:config[0],movingDraw:window.movingDraw},shared(sharedChunk),sharedChunk=chunk(sharedChunk),workerBundleString="undefined"!=typeof URL?window.URL.createObjectURL(new Blob([workerBundleString],{type:"text/javascript"})):"",(AMap=sharedChunk(config)).getConfig().workerUrl=workerBundleString):worker=chunk:shared=chunk}define(["exports"],function(exports){var extend=function(t){for(var r,n,i=Array.prototype.slice.call(arguments,1),a=0,o=i.length;a=HOT_COUNT)return arguments[0]}else n=0;return r.apply(void 0,arguments)}}function constant(t){return function(){return t}}var defineProperty=function(){try{var t=getNative(Object,"defineProperty");return t({},"",{}),t}catch(t){}}(),baseSetToString=defineProperty?function(t,e){return defineProperty(t,"toString",{configurable:!0,enumerable:!1,value:constant(e),writable:!0})}:identity,setToString=shortOut(baseSetToString);function arrayEach(t,e){for(var r=-1,n=null==t?0:t.length;++r>16)/255,((65280&t)>>8)/255,(255&t)/255,1]},Xj:function(t,e){for(var r=[],n=(e=void 0===e?{}:e).qw,i=e.Aw,a=e.complete,o=0,s=t;o=zoomRange[1]&&(t[1]=r),t[0]<=zoomRange[0]&&(t[0]=e),t},toString:function(t,e){void 0===e&&(e=4);var r="";if(t)for(var n=0,i=t;n=LocalZoom?c:[0,0])[0],c=s[1],i.wu(t+u,e+c,r,o)):"relative"===n?a.H(t,e):a._u(t,e)},r0:function(t,e,r,n,i){var a,o,s,u,c,f;if(void 0===t&&(t=0),void 0===e&&(e=0),void 0===r&&(r=0),i)return c=i.viewState,u=i.size,a=i.transform,o=i.view,s=i.viewMode,f=i.centerCoord,i=void 0===(i=i.positionType)?"relative":i,"2D"===s?(s={center:c.centerCoord,rotation:c.rotation,size:u},c=(u=c.optimalZoom>=LocalZoom?f:[0,0])[0],f=u[1],a.wu(t+c,e+f,n,s)):"relative"===i?o.H(t,e,r):o._u(t,e,r)},kz:function(t,e,r,n){if(void 0===t&&(t=[]),n=(n=void 0===n?{}:n).centerCoord,e=i&&t[1]<=a):(i=Math.min(e[0],r[0]),a=Math.max(e[0],r[0]),r=(r[1]-e[1])/(r[0]-e[0])*(t[0]-e[0])+e[1],Math.abs(r-t[1])=i&&t[0]<=a)},closestOnSegment:function(t,e){var r,n=t[0],t=t[1],i=e[0],e=e[1],a=i[0],i=i[1],o=e[0],s=o-a,u=(e=e[1])-i,t=(n=0==s&&0==u?0:(s*(n-a)+u*(t-i))/(s*s+u*u||0))<=0?(r=a,i):1<=n?(r=o,e):(r=a+n*s,i+n*u);return[r,t]},isClockwise:function(t){for(var e,r,n=t.length,i=0,a=t[n-1],o=a[0],s=a[1],u=0;u(r[1]-e[1])*(t[0]-e[0])},i=function(t,e,r,n){var i=[t[0]-e[0],t[1]-e[1]],a=[r[0]-n[0],r[1]-n[1]],t=t[0]*e[1]-t[1]*e[0],e=r[0]*n[1]-r[1]*n[0],r=1/(i[0]*a[1]-i[1]*a[0]);return[(t*a[0]-e*i[0])*r,(t*a[1]-e*i[1])*r]},a=t,o=e[e.length-2],s=0,u=e.length-1;s=33306690738754716e-32*o)?s:-function(t,e,r,n,i,a,o){var s,u,c,f,h,l,d,v,g,p,y=t-i,m=r-i,b=e-a,T=n-a,A=y*T,x=$*y,M=x-(x-y),S=y-M,w=(k[0]=(d=S*(c=T-(u=(x=$*T)-(x-T)))-(A-M*u-S*u-M*c))-((f=d-(g=(S=b-(M=(x=$*b)-(x-b)))*(c=m-(u=(x=$*m)-(x-m)))-((v=b*m)-M*u-S*u-M*c)))+(s=d-f))+(s-g),k[1]=(l=A-((h=A+f)-(s=h-A))+(f-s))-((f=l-v)+(s=l-f))+(s-v),k[2]=h-((p=h+f)-(s=p-h))+(f-s),k[3]=p,function(e){for(var r=e[0],n=1;n<4;n++)r+=e[n];return r}(k)),P=22204460492503146e-32*o;return P<=w||P<=-w||(t=t-(y+(s=t-y))+(s-i),r=r-(m+(s=r-m))+(s-i),i=e-(b+(s=e-b))+(s-a),e=n-(T+(s=n-T))+(s-a),0==t&&0==i&&0==r&&0==e)||(P=11093356479670487e-47*o+33306690738754706e-32*Math.abs(w))<=(w+=y*e+T*t-(b*r+m*i))||P<=-w?w:(E[0]=(d=(S=t-(M=(x=$*t)-(x-t)))*(c=T-(u=(x=$*T)-(x-T)))-((A=t*T)-M*u-S*u-M*c))-((f=d-(g=(S=i-(M=(x=$*i)-(x-i)))*(c=m-(u=(x=$*m)-(x-m)))-((v=i*m)-M*u-S*u-M*c)))+(s=d-f))+(s-g),E[1]=(l=A-((h=A+f)-(s=h-A))+(f-s))-((f=l-v)+(s=l-f))+(s-v),E[2]=h-((p=h+f)-(s=p-h))+(f-s),E[3]=p,n=I(4,k,4,E,L),E[0]=(d=(S=y-(M=(x=$*y)-(x-y)))*(c=e-(u=(x=$*e)-(x-e)))-((A=y*e)-M*u-S*u-M*c))-((f=d-(g=(S=b-(M=(x=$*b)-(x-b)))*(c=r-(u=(x=$*r)-(x-r)))-((v=b*r)-M*u-S*u-M*c)))+(s=d-f))+(s-g),E[1]=(l=A-((h=A+f)-(s=h-A))+(f-s))-((f=l-v)+(s=l-f))+(s-v),E[2]=h-((p=h+f)-(s=p-h))+(f-s),E[3]=p,a=I(n,L,4,E,O),E[0]=(d=(S=t-(M=(x=$*t)-(x-t)))*(c=e-(u=(x=$*e)-(x-e)))-((A=t*e)-M*u-S*u-M*c))-((f=d-(g=(S=i-(M=(x=$*i)-(x-i)))*(c=r-(u=(x=$*r)-(x-r)))-((v=i*r)-M*u-S*u-M*c)))+(s=d-f))+(s-g),E[1]=(l=A-((h=A+f)-(s=h-A))+(f-s))-((f=l-v)+(s=l-f))+(s-v),E[2]=h-((p=h+f)-(s=p-h))+(f-s),E[3]=p,o=I(a,O,4,E,_),_[o-1])}(n,t,i,e,a,r,o);return 0n[0]?1:r[0]n[1]?1:-1:(n=e,e=r,(r=t).left===n.left?0===i(e,r.IP.point,n.IP.point)?!r._P&&n._P?1:-1:r.FP(n.IP.point)?-1:1:r.left?1:-1)}function g(t,e,r){var n=new l(e,!1,t,t._P),e=new l(e,!0,t.IP,t._P);v(t.point,t.IP.point)&&console.warn("what is that, a collapsed segment?",t),n.UP=e.UP=t.UP,0e.UP?1:-1):1===m(t,e)?1:-1)}function h(t,e){return tu[2]||s[2]o||n===C&&l.point[0]>e[2])break;l.left?(c=u=i.Xc(l),u=u!==(s=i.MP())?i.NM(u):null,c=i.next(c),y(l,f=u?u.key:null,n),c&&2===T(l,c.key,t)&&(y(l,f,n),y(l,c.key,n)),u&&2===T(u.key,l,t)&&(y(f,(h=(h=u)!==s?i.NM(h):null)?h.key:null,n),y(l,f,n))):(l=l.IP,c=u=i.find(l),u&&c&&(u=u!==s?i.NM(u):null,c=i.next(c),i.remove(l),c)&&u&&T(u.key,c.key,t))}return a}(c,s,u,r)),h=[],l=0;l>1],s=n-1,u=i+1;;){for(;a(e[++s],o)<0;);for(;0>1)-1;0<=r;r--)this.zP(r)}).prototype={push:function(t){this.data.push(t),this.length++,this.El(this.length-1)},pop:function(){var t;if(0!==this.length)return t=this.data[0],this.length--,0>1,a=e[i];if(0<=r(n,a))break;e[t]=a,t=i}e[t]=n},zP:function(t){for(var e=this.data,r=this.compare,n=this.length>>1,i=e[t];tt[1]!=c>t[1]&&t[0]<(u-o)*(t[1]-s)/(c-s)+o&&(n=!n)}return n}return n},e.prototype.isPointInBbox=function(t,e){for(var r=1/0,n=1/0,i=-1/0,a=-1/0,o=0;or&&t[0]n&&t[1](c[1]-o[1])*(t[0]-o[0])},n=function(){var t=[o[0]-c[0],o[1]-c[1]],e=[h[0]-a[0],h[1]-a[1]],r=o[0]*c[1]-o[1]*c[0],n=h[0]*a[1]-h[1]*a[0],i=1/(t[0]*e[1]-t[1]*e[0]);return[(r*e[0]-n*t[0])*i,(r*e[1]-n*t[1])*i]},i=t=this.makesureAntiClockwise(t),o=(e=this.makesureClockwise(e))[e.length-1],s=0,u=e.length;s>=0),n},createObjectURL:function(t,e){void 0===e&&(e="text/javascript; charset=utf-8");var r=null;try{r=(globalInstance.URL||globalInstance.webkitURL).createObjectURL(new Blob([t],{type:e}))}catch(t){r=null}return r},revokeObjectURL:function(t){try{(globalInstance.URL||globalInstance.webkitURL).revokeObjectURL(t)}catch(t){}},Og:function(t){for(var e={},r=0,n=t.length;re.length&&(o=e.length);for(var s=a;s>24&255)/255,(t>>16&255)/255,(t>>8&255)/255,(255&t)/255]},isEmpty:function(t){for(var e in t)if(t.hasOwnProperty(e))return!1;return!0},Wg:function(t,e){return 0<=e&&t.splice(e,1),t},startsWith:function(t,e){return t.startsWith?t.startsWith(e):t.substr(0,e.length)===e},deleteItemFromArray:function(t,e){return e=v.indexOf(t,e),v.Wg(t,e)},deleteItemFromArrayByIndex:function(t,e){return v.Wg(t,e)},filter:function(t,r,n){var i=[];return v.Cg(t,function(t,e){r.call(n,t,e)&&i.push(t)}),i},indexOf:function(t,e){if(t&&t.length){if(t.indexOf)return t.indexOf(e);for(var r=0;r=e[0]&&t<=e[1]},kD:function(t,e,r){return void 0===r&&(r=!1),t=(t=void 0===t?"":t).split(",")[0]||"",!r&&t&&e&&TagMap[e]||"all"},VF:function(t,e,r){return!(r=void 0!==r&&r)&&t&&e&&TagMap[e]||"all"},LD:function(t,e){return!(!t||!e)&&(t=this.iN(t),this.iN(e)<=t)},SD:function(t){var e;switch(t=void 0===t?"all":t){case"lite":e=0;break;case"left":e=1;break;default:e=2}return e},pW:function(t){var e;switch(t=void 0===t?2:t){case 0:e=exports.zB.LITE;break;case 1:e=exports.zB.LEFT;break;default:e=exports.zB.ALL}return e},iN:function(t){var e=0;switch(t){case"lite":e=0;break;case"left":e=1;break;case"all":e=2}return e},loadBaxia:function(){return new Promise(function(t,e){var r,n;window||e({code:"0",I8t:"霸下加载失败"}),window.__AMap_web_baxia__?t({code:"2",I8t:"霸下已加载,无需重复加载"}):(window.__AMap_web_baxia__=!0,r=document.body||document.head,(n=document.createElement("script")).type="text/javascript",n.src="//g.alicdn.com/??AWSC/AWSC/awsc.js,sd/baxia-entry/baxiaCommon.js",n.onerror=function(t){window.__AMap_web_baxia__=!1,e({code:"0",I8t:"霸下加载失败"})},n.onload=function(){t({code:"1",I8t:"霸下加载成功"})},r.appendChild(n))})},getMarkUrl:function(){return"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAQAAAAEABAMAAACuXLVVAAAAGFBMVEUAAABOVWNOVWVNVWJOVWNNVV9OVWNOVWT0TI68AAAACHRSTlMAIwkPFQQbHt8aTjEAAAVJSURBVHja7MGBAAAAAICg/akXqQIAAAAAAAAAYHbqXrlNIArD8MvCipbD8tOCoyQtZCzSQpKx2sX2xC1IdtSyiSLffpyZ3AKoCE9zyvNW32q1Wq1Wq9VqtVqt/lPvKq7H8jDKxNUEUShZE3ElFj8OvrK5VkATobNnd60A1UnLXrKyvUaAqh4l206cnN2k4cDigqj/ud8MMB5V3rcsSxcoc2P6zz8qRF5qV7AkfesitpLWjUiLGBPIogFbJ5eYWrYu/xK0KkutloTF+KPITiVQPxr7sGcTGwLjEstCNtmurMigvPzai9hwyigHXwbmd4O6s36MdxwFysTLdid0MWqx+BXzc43kVif3nWRj4UukX+8NUH8wLEFvRQzg/p6+DZ5jynwC+m8tC9g6OT6m76A73hv6CW3QIpeBoGAJ9XG030UKyop8LylceDK3PwZm58eqAChf5Vy29Ie95N8MdP5C++NNYWKhkfPNIRwIJR8LEpR7+s0i6kp3BrrdnXKXiMDYvuIVlWhm93AH5OjPMlDfGNWdY4KUcPiYg2Vuai85BPHWyfNA/zkTKRKClCDqX5idaiT/UkApkhRAKO6T154IIlTF/AKRceKEestANRVBWvNxqm04MTtVgH8sglQn8NXqRmRAxf0oB2eXWH1vwLIpfBPE/zbwQwRJ+FyEv5idP+Ad9oYno5NwAuRc4MdwAjTz840qRQ5oVzn1vqkYAZVAbZmftiiR8VxWsBm6W5GWrkDtc7hnfltX+SLHrvIq4NbJuYBy10juWMC78e2hGie61Gt5GMX9BvAk/2ots3t7mI0FBOn2NfNa6my3iQA2iWUBWuQnZQu+yEvdVdyDHwNL7F7QPrzwKZzwJlB5E22kAFAJS7D8Yb/eldMGwiiO/9GNlk+rSytxS4uMZVqJxFa7IDtutcaOW+Tg8PoJSV5BotHvBfbM7MyePc8ib+CEeOG8ILJDV+65iOiBFVQSJAuwFEuRhrOrLPmXYEoPHHWaRkaBGxuJczAEY38jCd3TuGtGTW3i8Ad1KVF+BgznrOnl3bPVbRtQLsrNjW/IolZTajg/imj6MJdoC7/S8vEkr+zJ/v65iUY/X+jBzMTbfaXZlzs5LeafXALsGizl0r154cZf91VsVnC28z9h7qFMGE/gic7NjEzQSzk8ZQ2W1EZUXUALTkj3ls/x9tGHdDVvT4n25O4wi5wAOwCXHhjPvxMFIwnymSnGm+abP19nxSikczXgBracFhE4eW2i6ug6E3Xi3Uq6L50nsluDF1rBzERQV/F274TYvl8aRffcoDZy0OnWlz8n31+G/oNMFW4UOl813atF2k+N7UzW++pS/rkc0iKAX/Tii0jurAMYNXcSmJkeFdHMfESwoGtzgGW+1OOm1GTHHze1kcSbmHibKnpQ6noLh13hTJYvtKFVSdtghzONpelB+i4KTMyjyIsdqDbOx0csRQ+m/3c24MU7kQS3iaby5k3gJ93bxNDG1QSgLL/l0gCG+sP0M7I38QrW2vatB8VpFCIBkCXwSvdGr2ez4gmw4ssl6DJwg/IFdiv64Jgoz/ZVgHsrojRY6t1Wjnzg9RVgM01FEoy8S5zArsm+hCx9+mJKSd8yzW2ya6so4VlnbQGavrTt56ZIV0CZFplsceRMnxbfRVbOCiw1Probhffh0qc7UenMHGE3cUJI6Nvr4lTFDyFum1iKa1jKQS8VngLFNaTF3EQBbsGVjCS62QvX4/mX4tdcjR3LIdFcjxsnXFfOYDAYDAaDwWAwGAwGg9/twYEAAAAAgCB/60GuAAAAAAAAAOAnLYvrtEzzqQMAAAAASUVORK5CYII="}};function h(t){var e=+new Date,r=Math.max(0,(Browser.android?50:20)-(e-a));return a=e+r,globalInstance.setTimeout(t,50)}function l(t){globalInstance.clearTimeout(t)}function d(t){for(var e,r=["webkit","moz","o","ms"],n=0;ns[0]&&e[1]this.AU.uf&&(this.AU.ff(e),this.TU.ff(e)),0<=ua.indexOf("Gecko/")||0<=ua.indexOf("Windows"));this.wU=Math.round(t/2*(e?1.2:1))},t.prototype.RU=function(t){var e=this.SU(t,ControlChars),t=this.SU(t,ZeroWidthChars);return e||t},t.prototype.SU=function(t,e){for(var r=0,n=e;r=i[0]&&t<=i[1])return!0}},t}();function expandTypeArray(t){f.ff(t),d.ff(t),z.ff(t),v.ff(t)}function edt(t,e,r){f.uf=t.ja&&e.Ea>=t.Fa}function createNode(t){return{children:t,height:1,Zc:!0,ja:1/0,Fa:1/0,Oa:-1/0,Ea:-1/0}}function multiSelect(t,e,r,n,i){for(var a,o=[e,r];o.length;)(r=o.pop())-(e=o.pop())<=n||(quickselect(t,a=e+Math.ceil((r-e)/n/2)*n,e,r,i),o.push(e,a,a,r))}function getModule(){return M=M||{nS:function(clsName,clsText){try{eval(clsText)}catch(e){throw e}},eS:{iS:"1699967635311",BY:!Browser.DW&&config[13]}},M}rbush.prototype={all:function(){return this.qc(this.data,[])},search:function(t){var e=this.data,r=[],n=this.Yc;if(intersects(t,e))for(var i,a,o,s,u=[];e;){for(i=0,a=e.children.length;ithis.Bc;)this.af(i,e),e--;this.sf(r,i,e)},af:function(t,e){var r=t[e],n=r.children.length,i=this.Wc,i=(this.rf(r,i,n),this.hf(r,i,n));(n=createNode(r.children.splice(i,r.children.length-i))).height=r.height,n.Zc=r.Zc,calcBBox(r,this.Yc),calcBBox(n,this.Yc),e?t[e-1].children.push(n):this.Jc(r,n)},Jc:function(t,e){this.data=createNode([t,e]),this.data.height=t.height+1,this.data.Zc=!1,calcBBox(this.data,this.Yc)},hf:function(t,e,r){for(var n,i,a,o,s,u=o=1/0,c=e;c<=r-e;c++)i=intersectionArea(a=distBBox(t,0,c,this.Yc),n=distBBox(t,c,r,this.Yc)),a=bboxArea(a)+bboxArea(n),ithis.yM&&(this.yM=Math.max(t,Math.floor(this.yM*RESIZE_MULTIPLIER),DEFAULT_CAPACITY),t=this.wM,this.arrayBuffer=new ArrayBuffer(this.yM*this.constructor.Rb),this.mM(),t)&&this.wM.set(t)},t}(),FillArray=function(e){function t(){var t=e.call(this)||this;return t.pM=!1,t.resize(0),t}return __extends(t,e),t.prototype.kb=function(t,e){var r=this.length;this.resize(this.length+1),this.MM(r,t,e)},t.prototype.MM=function(t,e,r){this.Mb[t*=2]=e,this.Mb[1+t]=r},t.prototype.mM=function(){this.wM=new Uint8Array(this.arrayBuffer),this.Mb=new Float32Array(this.arrayBuffer)},t.Rb=8,t}(StructArray),FillExtrusionArray=function(e){function t(){var t=e.call(this)||this;return t.pM=!1,t.resize(0),t}return __extends(t,e),t.prototype.kb=function(t,e,r,n,i,a){var o=this.length;this.resize(o+1),this.MM(o,t,e,r,n,i,a)},t.prototype.MM=function(t,e,r,n,i,a,o){var s=8*t,e=(this.Mb[s]=e,this.Mb[1+s]=r,this.Mb[2+s]=n,this.Mb[3+s]=i,this.Mb[4+s]=a[0],this.Mb[5+s]=a[1],this.Mb[6+s]=a[2],16*t);this.jM[14+e]=o[0],this.jM[15+e]=o[1]},t.prototype.mM=function(){this.wM=new Uint8Array(this.arrayBuffer),this.Mb=new Float32Array(this.arrayBuffer),this.jM=new Uint16Array(this.arrayBuffer)},t.Rb=32,t}(StructArray),LinesIndexArray=function(e){function t(){var t=e.call(this)||this;return t.length=0,t.resize(0),t}return __extends(t,e),t.prototype.kb=function(t,e){var r=this.length;this.resize(this.length+1),this.MM(r,t,e)},t.prototype.MM=function(t,e,r){this.jM[t*=2]=e,this.jM[1+t]=r},t.prototype.mM=function(){this.wM=new Uint8Array(this.arrayBuffer),this.jM=new Uint16Array(this.arrayBuffer)},t.Rb=4,t}(StructArray),LinesIndexArrayUint=function(e){function t(){var t=e.call(this)||this;return t.length=0,t.resize(0),t}return __extends(t,e),t.prototype.kb=function(t,e){var r=this.length;this.resize(this.length+1),this.MM(r,t,e)},t.prototype.MM=function(t,e,r){this.UI[t*=2]=e,this.UI[1+t]=r},t.prototype.mM=function(){this.wM=new Uint8Array(this.arrayBuffer),this.UI=new Uint32Array(this.arrayBuffer)},t.Rb=8,t}(StructArray),LineArrayBuffer=function(e){function t(){var t=e.call(this)||this;return t.resize(0),t}return __extends(t,e),t.prototype.kb=function(t,e,r,n){var i=this.length;this.resize(i+1),this.MM(i,t,e,r,n)},t.prototype.MM=function(t,e,r,n,i){t*=this.constructor.Rb/4,this.Mb[t]=e[0],this.Mb[1+t]=e[1],this.Mb[2+t]=r[0],this.Mb[3+t]=r[1],this.Mb[4+t]=n,this.Mb[5+t]=i[0],this.Mb[6+t]=i[1]},t.prototype.mM=function(){this.wM=new Uint8Array(this.arrayBuffer),this.Mb=new Float32Array(this.arrayBuffer)},t.Rb=28,t}(StructArray),TriangleIndexArray=function(e){function t(){var t=e.call(this)||this;return t.resize(0),t}return __extends(t,e),t.prototype.kb=function(t,e,r){var n=this.length;this.resize(n+1),this.MM(n,t,e,r)},t.prototype.MM=function(t,e,r,n){this.jM[t*=3]=e,this.jM[1+t]=r,this.jM[2+t]=n},t.prototype.mM=function(){this.wM=new Uint8Array(this.arrayBuffer),this.jM=new Uint16Array(this.arrayBuffer)},t.Rb=6,t}(StructArray),TriangleIndexArrayUint=function(e){function t(){var t=e.call(this)||this;return t.resize(0),t}return __extends(t,e),t.prototype.kb=function(t,e,r){var n=this.length;this.resize(n+1),this.MM(n,t,e,r)},t.prototype.MM=function(t,e,r,n){this.UI[t*=3]=e,this.UI[1+t]=r,this.UI[2+t]=n},t.prototype.mM=function(){this.wM=new Uint8Array(this.arrayBuffer),this.UI=new Uint32Array(this.arrayBuffer)},t.Rb=12,t}(StructArray),SymbolArray=function(e){function t(){var t=e.call(this)||this;return t.pM=!1,t.resize(0),t}return __extends(t,e),t.prototype.kb=function(t,e,r){var n=this.length;this.resize(this.length+1),this.MM(n,t,e,r)},t.prototype.MM=function(t,e,r,n){var t=13*t,e=(this.Mb[t]=e,this.Mb[1+t]=r,n.color),r=n.borderColor,i=n.radius,a=n.borderWidth;this.Mb[2+t]=i,this.Mb[3+t]=a,this.Mb[4+t]=e[0],this.Mb[5+t]=e[1],this.Mb[6+t]=e[2],this.Mb[7+t]=e[3],this.Mb[8+t]=r[0],this.Mb[9+t]=r[1],this.Mb[10+t]=r[2],this.Mb[11+t]=r[3],this.Mb[12+t]=+(n.visible&&n.filter)},t.prototype.mM=function(){this.wM=new Uint8Array(this.arrayBuffer),this.Mb=new Float32Array(this.arrayBuffer)},t.Rb=52,t}(StructArray),SimpleSymbolArray=function(e){function t(){var t=e.call(this)||this;return t.pM=!1,t.resize(0),t}return __extends(t,e),t.prototype.kb=function(t,e){var r=this.length;this.resize(this.length+1),this.MM(r,t,e)},t.prototype.MM=function(t,e,r){this.Mb[t*=2]=e,this.Mb[1+t]=r},t.prototype.mM=function(){this.wM=new Uint8Array(this.arrayBuffer),this.Mb=new Float32Array(this.arrayBuffer)},t.Rb=4,t}(StructArray),SmartArrayBuffer=function(){function t(t,e,r,n){void 0===n&&(n="ARRAY_BUFFER"),this.AM=t,this.kM=r,this.type=n,t&&(this.buffer="ARRAY_BUFFER"===n?t.fe(e,r,"DYNAMIC_DRAW"):t.ve(e),this.uf=e.byteLength,this.byteLength=e.byteLength)}return t.prototype.update=function(t){var e,r,n;0!==t.length&&this.AM&&(e="ARRAY_BUFFER"===this.type,r=this.AM.gl,n=(e?this.AM.de:this.AM.me).current,(e?this.AM.de:this.AM.me).set(this.buffer),this.uf80*r){for(var l=n=t[0],d=i=t[1],v=r;v=c&&d.x<=h&&d.y>=f&&d.y<=l&&pointInTriangle(n,o,i,s,a,u,d.x,d.y)&&0<=area(d.NM,d,d.next))return;d=d.next}return 1}}function isEarHashed(t,e,r,n){var i=t.NM,a=t,o=t.next;if(!(0<=area(i,a,o))){for(var s=i.x,u=a.x,c=o.x,f=i.y,h=a.y,l=o.y,d=s=y&&T&&T.z<=m;){if(b.x>=d&&b.x<=g&&b.y>=v&&b.y<=p&&b!==i&&b!==o&&pointInTriangle(s,f,u,h,c,l,b.x,b.y)&&0<=area(b.NM,b,b.next))return;if(b=b.DM,T.x>=d&&T.x<=g&&T.y>=v&&T.y<=p&&T!==i&&T!==o&&pointInTriangle(s,f,u,h,c,l,T.x,T.y)&&0<=area(T.NM,T,T.next))return;T=T.RM}for(;b&&b.z>=y;){if(b.x>=d&&b.x<=g&&b.y>=v&&b.y<=p&&b!==i&&b!==o&&pointInTriangle(s,f,u,h,c,l,b.x,b.y)&&0<=area(b.NM,b,b.next))return;b=b.DM}for(;T&&T.z<=m;){if(T.x>=d&&T.x<=g&&T.y>=v&&T.y<=p&&T!==i&&T!==o&&pointInTriangle(s,f,u,h,c,l,T.x,T.y)&&0<=area(T.NM,T,T.next))return;T=T.RM}return 1}}function cureLocalIntersections(t,e,r){var n=t;do{var i=n.NM,a=n.next.next}while(!equals$2(i,a)&&intersects$1(i,n,n.next,a)&&locallyInside(i,a)&&locallyInside(a,i)&&(e.push(i.i/r|0),e.push(n.i/r|0),e.push(a.i/r|0),removeNode(n),removeNode(n.next),n=t=a),(n=n.next)!==t);return filterPoints(n)}function splitEarcut(t,e,r,n,i,a){var o=t;do{for(var s,u=o.next.next;u!==o.NM;){if(o.i!==u.i&&isValidDiagonal(o,u))return s=splitPolygon(o,u),o=filterPoints(o,o.next),s=filterPoints(s,s.next),earcutLinked(o,e,r,n,i,a,0),earcutLinked(s,e,r,n,i,a,0);u=u.next}}while((o=o.next)!==t)}function eliminateHoles(t,e,r,n){for(var i,a=[],o=0,s=e.length;o=n.next.y&&n.next.y!==n.y){var s=n.x+(a-n.y)*(n.next.x-n.x)/(n.next.y-n.y);if(s<=i&&o=n.x&&n.x>=f&&i!==n.x&&pointInTriangle(ar.x||n.x===r.x&§orContainsSector(r,n)))&&(r=n,l=u),(n=n.next)!==c;);return r}function sectorContainsSector(t,e){return area(t.NM,t,e.NM)<0&&area(e.next,t,t.next)<0}function indexCurve(t,e,r,n){for(var i=t;0===i.z&&(i.z=zOrder(i.x,i.y,e,r,n)),i.DM=i.NM,i.RM=i.next,(i=i.next)!==t;);i.DM.RM=null,i.DM=null,sortLinked(i)}function sortLinked(t){var e,r,n,i,a,o,s,u,c=1;do{for(r=t,a=t=null,o=0;r;){for(o++,n=r,e=s=0;e=Math.min(t.x,r.x)&&e.y<=Math.max(t.y,r.y)&&e.y>=Math.min(t.y,r.y)}function sign(t){return 0a!=r.next.y>a&&r.next.y!==r.y&&i<(r.next.x-r.x)*(a-r.y)/(r.next.y-r.y)+r.x&&(n=!n),(r=r.next)!==t;);return n}function splitPolygon(t,e){var r=new Node(t.i,t.x,t.y),n=new Node(e.i,e.x,e.y),i=t.next,a=e.NM;return(t.next=e).NM=t,(r.next=i).NM=r,(n.next=r).NM=n,(a.next=n).NM=a,n}function insertNode(t,e,r,n){return t=new Node(t,e,r),n?(t.next=n.next,(t.NM=n).next.NM=t,n.next=t):(t.NM=t).next=t,t}function removeNode(t){t.next.NM=t.NM,t.NM.next=t.next,t.DM&&(t.DM.RM=t.RM),t.RM&&(t.RM.DM=t.DM)}function Node(t,e,r){this.i=t,this.x=e,this.y=r,this.NM=null,this.next=null,this.z=0,this.DM=null,this.RM=null,this.LM=!1}function signedArea(t,e,r,n){for(var i=0,a=e,o=r-n;a>3),i--,1===n||2===n)a+=e.lA(),o+=e.lA(),1===n&&(u&&0>3),i--,1===n||2===n)(a+=e.lA())>3,e=1==n?t.aw():2==n?t.pA():3==n?t.yA():4==n?t.mA():5==n?t.ow():6==n?t.lA():7==n?t.vw():null;return e}VectorTileLayer.prototype.Gw=function(t){if(t<0||t>=this.Cw.length)throw new Error("feature index out of bounds");return this.fA.pos=this.Cw[t],t=this.fA.ow()+this.fA.pos,new VectorTileFeature(this.fA,t,this.extent,this.cA,this.vA)};var VectorTile$1=function(t,e){this.type="vector",this.layers=t.nw(readTile,{},e)};function readTile(t,e,r){3===t&&(t=new VectorTileLayer(r,r.ow()+r.pos)).length&&(e[t.name]=t)}VectorTile$1.Wb=function(t){return t},VectorTile$1.Gb=function(t){return t},VectorTile$1.prototype.nG=function(t){this.type=t};var SHIFT_LEFT_32=4294967296,SHIFT_RIGHT_32=1/SHIFT_LEFT_32,Pbf=function(){function n(t){this.gA=ArrayBuffer.isView&&ArrayBuffer.isView(t)?t:new Uint8Array(t||0),this.pos=0,this.type=0,this.length=this.gA.length}return n.prototype.destroy=function(){this.gA=new Uint8Array(0)},n.prototype.nw=function(t,e,r){for(r=r||this.length;this.pos>3,a=this.pos;this.type=7&n,t(i,e,this),this.pos===a&&this.wA(n)}return e},n.prototype.MA=function(t,e){return this.nw(t,e,this.ow()+this.pos)},n.prototype.jA=function(){var t=readUInt32(this.gA,this.pos);return this.pos+=4,t},n.prototype.AA=function(){var t=readInt32(this.gA,this.pos);return this.pos+=4,t},n.prototype.kA=function(){var t=readUInt32(this.gA,this.pos)+readUInt32(this.gA,this.pos+4)*SHIFT_LEFT_32;return this.pos+=8,t},n.prototype.OA=function(){var t=readUInt32(this.gA,this.pos)+readInt32(this.gA,this.pos+4)*SHIFT_LEFT_32;return this.pos+=8,t},n.prototype.pA=function(){var t=this.xA(this.gA,this.pos,!0,23,4);return this.pos+=4,t},n.prototype.yA=function(){var t=this.xA(this.gA,this.pos,!0,52,8);return this.pos+=8,t},n.prototype.ow=function(t){var e=this.gA,r=e[this.pos++],n=127&r;return r<128||(n|=(127&(r=e[this.pos++]))<<7,r<128)||(n|=(127&(r=e[this.pos++]))<<14,r<128)||(n|=(127&(r=e[this.pos++]))<<21,r<128)?n:readVarintRemainder(n|=(15&e[this.pos])<<28,t,this)},n.prototype.mA=function(){return this.ow(!0)},n.prototype.lA=function(){var t=this.ow();return t%2==1?(t+1)/-2:t/2},n.prototype.vw=function(){return Boolean(this.ow())},n.prototype.aw=function(){var t=this.ow()+this.pos,e=readUtf8(this.gA,this.pos,t);return this.pos=t,e},n.prototype.mw=function(){var t=this.ow()+this.pos,e=this.gA.subarray(this.pos,t);return this.pos=t,e},n.prototype.tw=function(t,e){var r=readPackedEnd(this);for(t=t||[];this.pos>>=7)|(127>>=7)|(127>>7&127))},n.prototype.VA=function(t){this.BA(t<0?2*-t-1:2*t)},n.prototype.$A=function(t){this.BA(Boolean(t))},n.prototype.YA=function(t){t=String(t),this.zA(4*t.length),this.pos++;var e=this.pos;this.pos=writeUtf8(this.gA,t,this.pos),128<=(t=this.pos-e)&&makeRoomForExtraLength(e,t,this),this.pos=e-1,this.BA(t),this.pos+=t},n.prototype.KA=function(t){this.zA(4),this.XA(this.gA,t,this.pos,!0,23,4),this.pos+=4},n.prototype.JA=function(t){this.zA(8),this.XA(this.gA,t,this.pos,!0,52,8),this.pos+=8},n.prototype.ZA=function(t){var e=t.length;this.BA(e),this.zA(e);for(var r=0;r>1,f=-7,h=r?i-1:0,l=r?-1:1,i=t[e+h];for(h+=l,a=i&(1<<-f)-1,i>>=-f,f+=s;0>=-f,f+=n;0>1,h=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,l=n?0:a-1,d=n?1:-1,a=e<0||0===e&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(s=isNaN(e)?1:0,o=c):(o=Math.floor(Math.log(e)/Math.LN2),e*(n=Math.pow(2,-o))<1&&(o--,n*=2),2<=(e+=1<=o+f?h/n:h*Math.pow(2,1-f))*n&&(o++,n/=2),c<=o+f?(s=0,o=c):1<=o+f?(s=(e*n-1)*Math.pow(2,i),o+=f):(s=e*Math.pow(2,f-1)*Math.pow(2,i),o=0));8<=i;t[r+l]=255&s,l+=d,s/=256,i-=8);for(o=o<>4;if(i<128)return toNum(t,a,e);if(a|=(127&(i=n[r.pos++]))<<3,i<128)return toNum(t,a,e);if(a|=(127&(i=n[r.pos++]))<<10,i<128)return toNum(t,a,e);if(a|=(127&(i=n[r.pos++]))<<17,i<128)return toNum(t,a,e);if(a|=(127&(i=n[r.pos++]))<<24,i<128)return toNum(t,a,e);if(a|=(1&(i=n[r.pos++]))<<31,i<128)return toNum(t,a,e);throw new Error("Expected varint not more than 10 bytes")}function readPackedEnd(t){return t.type===Pbf.DA?t.ow()+t.pos:t.pos+1}function toNum(t,e,r){return r?4294967296*e+(t>>>0):4294967296*(e>>>0)+(t>>>0)}function writeBigVarint(t,e){var r,n;if(0<=t?(r=t%4294967296|0,n=t/4294967296|0):(n=~(-t/4294967296),4294967295^(r=~(-t%4294967296))?r=r+1|0:n=n+1|(r=0)),0x10000000000000000<=t||t<-0x10000000000000000)throw new Error("Given varint doesn't fit into 10 bytes");e.zA(10),writeBigVarintLow(r,n,e),writeBigVarintHigh(n,e)}function writeBigVarintLow(t,e,r){r.gA[r.pos++]=127&t|128,t>>>=7,r.gA[r.pos++]=127&t|128,t>>>=7,r.gA[r.pos++]=127&t|128,t>>>=7,r.gA[r.pos++]=127&t|128,r.gA[r.pos]=127&(t>>>=7)}function writeBigVarintHigh(t,e){var r=(7&t)<<4;e.gA[e.pos++]|=r|((t>>>=3)?128:0),t&&(e.gA[e.pos++]=127&t|((t>>>=7)?128:0),t)&&(e.gA[e.pos++]=127&t|((t>>>=7)?128:0),t)&&(e.gA[e.pos++]=127&t|((t>>>=7)?128:0),t)&&(e.gA[e.pos++]=127&t|((t>>>=7)?128:0),t)&&(e.gA[e.pos++]=127&t)}function makeRoomForExtraLength(t,e,r){var n=e<=16383?1:e<=2097151?2:e<=268435455?3:Math.ceil(Math.log(e)/(7*Math.LN2));r.zA(n);for(var i=r.pos-1;t<=i;i--)r.gA[i+n]=r.gA[i]}function writePackedVarint(t,e){for(var r=0;r>>8,t[r+2]=e>>>16,t[r+3]=e>>>24}function readInt32(t,e){return(t[e]|t[e+1]<<8|t[e+2]<<16)+(t[e+3]<<24)}function readUtf8(t,e,r){for(var n="",i=e;i>>10&1023|55296),o=56320|1023&o),n+=String.fromCharCode(o),i+=s}return n}function writeUtf8(t,e,r){for(var n=0,i=void 0,a=void 0;n>6|192:(i<65536?t[r++]=i>>12|224:(t[r++]=i>>18|240,t[r++]=i>>12&63|128),t[r++]=i>>6&63|128),t[r++]=63&i|128)}return r}var StyleOptionsBuilding=function(){this.hideWithoutStyle=!1,this.areas=[]},VectorTileSegements=function(){function t(){this.jc=[],this.VM=0}return t.prototype.add=function(t,e,r,n,i){VTLineSegement.getKey(t,e,i,n)!==(this.WM?this.WM.getKey():"-1")&&(this.VM+=this.WM?this.WM.length:0,this.WM=new VTLineSegement(t,e,this.VM,n,i),this.jc.push(this.WM)),this.WM.add(r)},t}(),VTLineSegement=function(){function t(t,e,r,n,i){this.mainkey=t,this.subkey=e,this.offset=r,this.minzoom=n,this.maxzoom=i,this.length=0}return t.getKey=function(t,e,r,n){return t+":"+e+":"+r+":"+n},t.prototype.add=function(t){this.length+=t},t.prototype.getKey=function(){return this.mainkey+":"+this.subkey+":"+this.maxzoom+":"+this.minzoom},t}(),MapboxSegements=function(){function t(){this.jc=[],this.GM=-1,this.HM=-1,this.VM=0}return t.prototype.add=function(t,e){MBLineSegement.getKey(t),this.WM&&this.WM.getKey(),this.GM=t,this.VM+=this.WM?this.WM.length:0,this.WM=new MBLineSegement(t,this.VM),this.jc.push(this.WM),this.WM.add(e)},t}(),MBLineSegement=function(){function t(t,e){this.style=t,this.offset=e,this.length=0}return t.getKey=function(t){return""+t},t.prototype.add=function(t){this.length+=t},t.prototype.getKey=function(){return""+this.style},t}(),ImageDataWraperType,ImageDataWraper=(function(t){t.base64="base64",t.arraybuffer="arraybuffer",t.bitmap="bitmap",t.empty="empty"}(ImageDataWraperType=ImageDataWraperType||{}),function(){function t(t,e,r){this.hash=t,this.IV=!1,"string"!=typeof e?r&&r.imageBitmap?(this.type=ImageDataWraperType.bitmap,this.status="success",this.data=e):(t=new Blob([e],{type:"image/png"}),(r=URLObject.createObjectURL(t))?(this.data=r,this.type=ImageDataWraperType.arraybuffer,this.status="success"):(this.data="",this.type=ImageDataWraperType.arraybuffer,this.status="error")):(this.data=e,this.type=ImageDataWraperType.base64,this.status="success")}return t.AV=function(t){return createImageBitmap(new Blob([new Uint8Array(t)]))},t.Wb=function(t){var e={data:t.data,type:t.type,status:t.status,IV:t.IV,hash:t.hash};return t.transform(),e},t.prototype.transform=function(){this.IV=!0,this.type===ImageDataWraperType.bitmap&&(this.data="")},t.prototype.destroy=function(){"destroyed"!==this.status&&(this.type===ImageDataWraperType.arraybuffer&&URLObject.revokeObjectURL(this.data),this.data="",this.status="destroyed")},t.prototype.IZ=function(t){var e;this.type===ImageDataWraperType.bitmap?t(this.data):((e=new Image).crossOrigin="",e.onload=function(){t(e)},e.src=this.data)},t}()),EmptyImageDataWraper=new ImageDataWraper("",""),CircleBucket=(EmptyImageDataWraper.type=ImageDataWraperType.empty,function(){function t(){this._b=new SymbolArray,this.uploaded=!1}return t.prototype.wb=function(t,e){var r=this._b.length;return this._b.kb(t[0],t[1],e),this._b.length-r},t.prototype.upload=function(t){this.uploaded||(this.destroy(),this.uploaded=!0,this.zs=t.fe(this._b.Mb,SymbolArray.Rb))},t.prototype.destroy=function(){this.uploaded=!1,this.zs&&this.zs.context&&(this.zs.context.deleteBuffer(this.zs),delete this.zs)},t.prototype.reset=function(){this._b=new SymbolArray,this.uploaded=!1},t}()),SimpleCircleBucket=function(){function t(){this._b=new SimpleSymbolArray,this.uploaded=!1}return t.prototype.wb=function(t){var e=this._b.length;return this._b.kb(t[0],t[1]),this._b.length-e},t.prototype.upload=function(t){this.uploaded||(this.destroy(),this.uploaded=!0,this.zs=t.fe(this._b.Mb,SimpleSymbolArray.Rb))},t.prototype.destroy=function(){this.uploaded=!1,this.zs&&this.zs.context&&(this.zs.context.deleteBuffer(this.zs),delete this.zs)},t.prototype.reset=function(){this._b=new SimpleSymbolArray,this.uploaded=!1},t}(),DistrictLayerStyle=function(){this["stroke-width"]="",this["coastline-stroke"]="",this["nation-stroke"]="",this["province-stroke"]="",this["city-stroke"]="",this["county-stroke"]="",this.fill=""},registry={};function register(t,e,r){void 0===r&&(r={}),Object.defineProperty(e,"yk",{value:t,writable:!1}),registry[t]={mk:e,gk:r.gk||[],wk:r.wk||[]}}function serialize(t,e){if(null==t||"boolean"==typeof t||"number"==typeof t||"string"==typeof t||t instanceof Boolean||t instanceof Number||t instanceof String||t instanceof Date||t instanceof RegExp)return t;if(t instanceof ArrayBuffer)return e&&e.push(t),t;if(Browser.imageBitmap&&t instanceof ImageBitmap)return e&&e.indexOf(t)<0&&e.push(t),t;if(ArrayBuffer.isView(t))return o=t,e&&e.push(o.buffer),o;if(t instanceof ImageData)return e&&e.push(t.data.buffer),t;if(Array.isArray(t)){for(var r=[],n=0,i=t;n=t[n]&&ee[2]&&(r|=2),t[1]e[3]&&(r|=8),r}function bboxClip(t,e){var r=getGeom(t),n=r.type,i="Feature"===t.type?t.properties:{},a=r.coordinates;switch(n){case"LineString":case"MultiLineString":var o=[];return(a="LineString"===n?[a]:a).forEach(function(t){lineclip(t,e,o)}),1===o.length?lineString(o[0],i):multiLineString(o,i);case"Polygon":return polygon(clipPolygon(a,e),i);case"MultiPolygon":return multiPolygon(a.map(function(t){return clipPolygon(t,e)}),i);default:throw new Error("geometry "+n+" not supported")}}function clipPolygon(t,e){for(var r=[],n=0,i=t;n>a;return[(r=r>>a)-(a=getTileSWCoord(i,e))[0],n-a[1]]}var cache={};function lnglat2WGSCoord2(t){var e,r;return cache[t]||(r=33-t,e=degree2Coord(180)/(1<",id:String(a),key:e.ya}),a&&delete i.pI[a]}}},t.prototype.gI=function(t){var n,e,i=this;Browser.DW&&"destroy"===t.data.type&&self.close();var a=(t=t.data).id;t.yI&&this.dI!==t.yI||(""===t.type?(e=this.pI[t.id],delete this.pI[t.id],e&&e("")):""===t.type?(e=this.pI[t.id],delete this.pI[t.id],e&&t.error?e(deserialize(t.error)):e&&e(null,deserialize(t.data))):void 0!==t.id&&this.parent[t.type]&&(n=function(t,e){delete i.pI[a];var r=[],e=serialize(e,r);i.target.postMessage({mI:i.dI,type:"",id:String(a),error:t?serialize(t):null,data:e},r),n=void 0},this.pI[t.id]=null,e=this.parent[t.type](t.mI,deserialize(t.data),n))&&null===this.pI[t.id]&&(this.pI[t.id]=e.cancel))},t.prototype.remove=function(){this.target.removeEventListener("message",this.gI,!1)},t}(),TaskPool=function(){function t(){this.listener={},this.SN={}}return t.prototype.nS=function(r,t){var n=this;return this.SN[r]=!0,this.listener[r]||(this.listener[r]=[]),t(function(t,e){n.$N(r,t,e)})},t.prototype.cancel=function(t){delete this.SN[t]},t.prototype.has=function(t){return Boolean(this.SN[t])},t.prototype.GN=function(t){return this.listener[t]&&0>4]+h[15&o])}return t.join("")}}),u={16:10,24:12,32:14},p=[1,2,4,8,16,32,64,128,27,54,108,216,171,77,154,47,94,188,99,198,151,53,106,212,179,125,250,239,197,145],d=[99,124,119,123,242,107,111,197,48,1,103,43,254,215,171,118,202,130,201,125,250,89,71,240,173,212,162,175,156,164,114,192,183,253,147,38,54,63,247,204,52,165,229,241,113,216,49,21,4,199,35,195,24,150,5,154,7,18,128,226,235,39,178,117,9,131,44,26,27,110,90,160,82,59,214,179,41,227,47,132,83,209,0,237,32,252,177,91,106,203,190,57,74,76,88,207,208,239,170,251,67,77,51,133,69,249,2,127,80,60,159,168,81,163,64,143,146,157,56,245,188,182,218,33,16,255,243,210,205,12,19,236,95,151,68,23,196,167,126,61,100,93,25,115,96,129,79,220,34,42,144,136,70,238,184,20,222,94,11,219,224,50,58,10,73,6,36,92,194,211,172,98,145,149,228,121,231,200,55,109,141,213,78,169,108,86,244,234,101,122,174,8,186,120,37,46,28,166,180,198,232,221,116,31,75,189,139,138,112,62,181,102,72,3,246,14,97,53,87,185,134,193,29,158,225,248,152,17,105,217,142,148,155,30,135,233,206,85,40,223,140,161,137,13,191,230,66,104,65,153,45,15,176,84,187,22],f=[82,9,106,213,48,54,165,56,191,64,163,158,129,243,215,251,124,227,57,130,155,47,255,135,52,142,67,68,196,222,233,203,84,123,148,50,166,194,35,61,238,76,149,11,66,250,195,78,8,46,161,102,40,217,36,178,118,91,162,73,109,139,209,37,114,248,246,100,134,104,152,22,212,164,92,204,93,101,182,146,108,112,72,80,253,237,185,218,94,21,70,87,167,141,157,132,144,216,171,0,140,188,211,10,247,228,88,5,184,179,69,6,208,44,30,143,202,63,15,2,193,175,189,3,1,19,138,107,58,145,17,65,79,103,220,234,151,242,207,206,240,180,230,115,150,172,116,34,231,173,53,133,226,249,55,232,28,117,223,110,71,241,26,113,29,41,197,137,111,183,98,14,170,24,190,27,252,86,62,75,198,210,121,32,154,219,192,254,120,205,90,244,31,221,168,51,136,7,199,49,177,18,16,89,39,128,236,95,96,81,127,169,25,181,74,13,45,229,122,159,147,201,156,239,160,224,59,77,174,42,245,176,200,235,187,60,131,83,153,97,23,43,4,126,186,119,214,38,225,105,20,99,85,33,12,125],x=[3328402341,4168907908,4000806809,4135287693,4294111757,3597364157,3731845041,2445657428,1613770832,33620227,3462883241,1445669757,3892248089,3050821474,1303096294,3967186586,2412431941,528646813,2311702848,4202528135,4026202645,2992200171,2387036105,4226871307,1101901292,3017069671,1604494077,1169141738,597466303,1403299063,3832705686,2613100635,1974974402,3791519004,1033081774,1277568618,1815492186,2118074177,4126668546,2211236943,1748251740,1369810420,3521504564,4193382664,3799085459,2883115123,1647391059,706024767,134480908,2512897874,1176707941,2646852446,806885416,932615841,168101135,798661301,235341577,605164086,461406363,3756188221,3454790438,1311188841,2142417613,3933566367,302582043,495158174,1479289972,874125870,907746093,3698224818,3025820398,1537253627,2756858614,1983593293,3084310113,2108928974,1378429307,3722699582,1580150641,327451799,2790478837,3117535592,0,3253595436,1075847264,3825007647,2041688520,3059440621,3563743934,2378943302,1740553945,1916352843,2487896798,2555137236,2958579944,2244988746,3151024235,3320835882,1336584933,3992714006,2252555205,2588757463,1714631509,293963156,2319795663,3925473552,67240454,4269768577,2689618160,2017213508,631218106,1269344483,2723238387,1571005438,2151694528,93294474,1066570413,563977660,1882732616,4059428100,1673313503,2008463041,2950355573,1109467491,537923632,3858759450,4260623118,3218264685,2177748300,403442708,638784309,3287084079,3193921505,899127202,2286175436,773265209,2479146071,1437050866,4236148354,2050833735,3362022572,3126681063,840505643,3866325909,3227541664,427917720,2655997905,2749160575,1143087718,1412049534,999329963,193497219,2353415882,3354324521,1807268051,672404540,2816401017,3160301282,369822493,2916866934,3688947771,1681011286,1949973070,336202270,2454276571,201721354,1210328172,3093060836,2680341085,3184776046,1135389935,3294782118,965841320,831886756,3554993207,4068047243,3588745010,2345191491,1849112409,3664604599,26054028,2983581028,2622377682,1235855840,3630984372,2891339514,4092916743,3488279077,3395642799,4101667470,1202630377,268961816,1874508501,4034427016,1243948399,1546530418,941366308,1470539505,1941222599,2546386513,3421038627,2715671932,3899946140,1042226977,2521517021,1639824860,227249030,260737669,3765465232,2084453954,1907733956,3429263018,2420656344,100860677,4160157185,470683154,3261161891,1781871967,2924959737,1773779408,394692241,2579611992,974986535,664706745,3655459128,3958962195,731420851,571543859,3530123707,2849626480,126783113,865375399,765172662,1008606754,361203602,3387549984,2278477385,2857719295,1344809080,2782912378,59542671,1503764984,160008576,437062935,1707065306,3622233649,2218934982,3496503480,2185314755,697932208,1512910199,504303377,2075177163,2824099068,1841019862,739644986],y=[2781242211,2230877308,2582542199,2381740923,234877682,3184946027,2984144751,1418839493,1348481072,50462977,2848876391,2102799147,434634494,1656084439,3863849899,2599188086,1167051466,2636087938,1082771913,2281340285,368048890,3954334041,3381544775,201060592,3963727277,1739838676,4250903202,3930435503,3206782108,4149453988,2531553906,1536934080,3262494647,484572669,2923271059,1783375398,1517041206,1098792767,49674231,1334037708,1550332980,4098991525,886171109,150598129,2481090929,1940642008,1398944049,1059722517,201851908,1385547719,1699095331,1587397571,674240536,2704774806,252314885,3039795866,151914247,908333586,2602270848,1038082786,651029483,1766729511,3447698098,2682942837,454166793,2652734339,1951935532,775166490,758520603,3000790638,4004797018,4217086112,4137964114,1299594043,1639438038,3464344499,2068982057,1054729187,1901997871,2534638724,4121318227,1757008337,0,750906861,1614815264,535035132,3363418545,3988151131,3201591914,1183697867,3647454910,1265776953,3734260298,3566750796,3903871064,1250283471,1807470800,717615087,3847203498,384695291,3313910595,3617213773,1432761139,2484176261,3481945413,283769337,100925954,2180939647,4037038160,1148730428,3123027871,3813386408,4087501137,4267549603,3229630528,2315620239,2906624658,3156319645,1215313976,82966005,3747855548,3245848246,1974459098,1665278241,807407632,451280895,251524083,1841287890,1283575245,337120268,891687699,801369324,3787349855,2721421207,3431482436,959321879,1469301956,4065699751,2197585534,1199193405,2898814052,3887750493,724703513,2514908019,2696962144,2551808385,3516813135,2141445340,1715741218,2119445034,2872807568,2198571144,3398190662,700968686,3547052216,1009259540,2041044702,3803995742,487983883,1991105499,1004265696,1449407026,1316239930,504629770,3683797321,168560134,1816667172,3837287516,1570751170,1857934291,4014189740,2797888098,2822345105,2754712981,936633572,2347923833,852879335,1133234376,1500395319,3084545389,2348912013,1689376213,3533459022,3762923945,3034082412,4205598294,133428468,634383082,2949277029,2398386810,3913789102,403703816,3580869306,2297460856,1867130149,1918643758,607656988,4049053350,3346248884,1368901318,600565992,2090982877,2632479860,557719327,3717614411,3697393085,2249034635,2232388234,2430627952,1115438654,3295786421,2865522278,3633334344,84280067,33027830,303828494,2747425121,1600795957,4188952407,3496589753,2434238086,1486471617,658119965,3106381470,953803233,334231800,3005978776,857870609,3151128937,1890179545,2298973838,2805175444,3056442267,574365214,2450884487,550103529,1233637070,4289353045,2018519080,2057691103,2399374476,4166623649,2148108681,387583245,3664101311,836232934,3330556482,3100665960,3280093505,2955516313,2002398509,287182607,3413881008,4238890068,3597515707,975967766],c=[1671808611,2089089148,2006576759,2072901243,4061003762,1807603307,1873927791,3310653893,810573872,16974337,1739181671,729634347,4263110654,3613570519,2883997099,1989864566,3393556426,2191335298,3376449993,2106063485,4195741690,1508618841,1204391495,4027317232,2917941677,3563566036,2734514082,2951366063,2629772188,2767672228,1922491506,3227229120,3082974647,4246528509,2477669779,644500518,911895606,1061256767,4144166391,3427763148,878471220,2784252325,3845444069,4043897329,1905517169,3631459288,827548209,356461077,67897348,3344078279,593839651,3277757891,405286936,2527147926,84871685,2595565466,118033927,305538066,2157648768,3795705826,3945188843,661212711,2999812018,1973414517,152769033,2208177539,745822252,439235610,455947803,1857215598,1525593178,2700827552,1391895634,994932283,3596728278,3016654259,695947817,3812548067,795958831,2224493444,1408607827,3513301457,0,3979133421,543178784,4229948412,2982705585,1542305371,1790891114,3410398667,3201918910,961245753,1256100938,1289001036,1491644504,3477767631,3496721360,4012557807,2867154858,4212583931,1137018435,1305975373,861234739,2241073541,1171229253,4178635257,33948674,2139225727,1357946960,1011120188,2679776671,2833468328,1374921297,2751356323,1086357568,2408187279,2460827538,2646352285,944271416,4110742005,3168756668,3066132406,3665145818,560153121,271589392,4279952895,4077846003,3530407890,3444343245,202643468,322250259,3962553324,1608629855,2543990167,1154254916,389623319,3294073796,2817676711,2122513534,1028094525,1689045092,1575467613,422261273,1939203699,1621147744,2174228865,1339137615,3699352540,577127458,712922154,2427141008,2290289544,1187679302,3995715566,3100863416,339486740,3732514782,1591917662,186455563,3681988059,3762019296,844522546,978220090,169743370,1239126601,101321734,611076132,1558493276,3260915650,3547250131,2901361580,1655096418,2443721105,2510565781,3828863972,2039214713,3878868455,3359869896,928607799,1840765549,2374762893,3580146133,1322425422,2850048425,1823791212,1459268694,4094161908,3928346602,1706019429,2056189050,2934523822,135794696,3134549946,2022240376,628050469,779246638,472135708,2800834470,3032970164,3327236038,3894660072,3715932637,1956440180,522272287,1272813131,3185336765,2340818315,2323976074,1888542832,1044544574,3049550261,1722469478,1222152264,50660867,4127324150,236067854,1638122081,895445557,1475980887,3117443513,2257655686,3243809217,489110045,2662934430,3778599393,4162055160,2561878936,288563729,1773916777,3648039385,2391345038,2493985684,2612407707,505560094,2274497927,3911240169,3460925390,1442818645,678973480,3749357023,2358182796,2717407649,2306869641,219617805,3218761151,3862026214,1120306242,1756942440,1103331905,2578459033,762796589,252780047,2966125488,1425844308,3151392187,372911126],v=[1667474886,2088535288,2004326894,2071694838,4075949567,1802223062,1869591006,3318043793,808472672,16843522,1734846926,724270422,4278065639,3621216949,2880169549,1987484396,3402253711,2189597983,3385409673,2105378810,4210693615,1499065266,1195886990,4042263547,2913856577,3570689971,2728590687,2947541573,2627518243,2762274643,1920112356,3233831835,3082273397,4261223649,2475929149,640051788,909531756,1061110142,4160160501,3435941763,875846760,2779116625,3857003729,4059105529,1903268834,3638064043,825316194,353713962,67374088,3351728789,589522246,3284360861,404236336,2526454071,84217610,2593830191,117901582,303183396,2155911963,3806477791,3958056653,656894286,2998062463,1970642922,151591698,2206440989,741110872,437923380,454765878,1852748508,1515908788,2694904667,1381168804,993742198,3604373943,3014905469,690584402,3823320797,791638366,2223281939,1398011302,3520161977,0,3991743681,538992704,4244381667,2981218425,1532751286,1785380564,3419096717,3200178535,960056178,1246420628,1280103576,1482221744,3486468741,3503319995,4025428677,2863326543,4227536621,1128514950,1296947098,859002214,2240123921,1162203018,4193849577,33687044,2139062782,1347481760,1010582648,2678045221,2829640523,1364325282,2745433693,1077985408,2408548869,2459086143,2644360225,943212656,4126475505,3166494563,3065430391,3671750063,555836226,269496352,4294908645,4092792573,3537006015,3452783745,202118168,320025894,3974901699,1600119230,2543297077,1145359496,387397934,3301201811,2812801621,2122220284,1027426170,1684319432,1566435258,421079858,1936954854,1616945344,2172753945,1330631070,3705438115,572679748,707427924,2425400123,2290647819,1179044492,4008585671,3099120491,336870440,3739122087,1583276732,185277718,3688593069,3772791771,842159716,976899700,168435220,1229577106,101059084,606366792,1549591736,3267517855,3553849021,2897014595,1650632388,2442242105,2509612081,3840161747,2038008818,3890688725,3368567691,926374254,1835907034,2374863873,3587531953,1313788572,2846482505,1819063512,1448540844,4109633523,3941213647,1701162954,2054852340,2930698567,134748176,3132806511,2021165296,623210314,774795868,471606328,2795958615,3031746419,3334885783,3907527627,3722280097,1953799400,522133822,1263263126,3183336545,2341176845,2324333839,1886425312,1044267644,3048588401,1718004428,1212733584,50529542,4143317495,235803164,1633788866,892690282,1465383342,3115962473,2256965911,3250673817,488449850,2661202215,3789633753,4177007595,2560144171,286339874,1768537042,3654906025,2391705863,2492770099,2610673197,505291324,2273808917,3924369609,3469625735,1431699370,673740880,3755965093,2358021891,2711746649,2307489801,218961690,3217021541,3873845719,1111672452,1751693520,1094828930,2576986153,757954394,252645662,2964376443,1414855848,3149649517,370555436],g=[1374988112,2118214995,437757123,975658646,1001089995,530400753,2902087851,1273168787,540080725,2910219766,2295101073,4110568485,1340463100,3307916247,641025152,3043140495,3736164937,632953703,1172967064,1576976609,3274667266,2169303058,2370213795,1809054150,59727847,361929877,3211623147,2505202138,3569255213,1484005843,1239443753,2395588676,1975683434,4102977912,2572697195,666464733,3202437046,4035489047,3374361702,2110667444,1675577880,3843699074,2538681184,1649639237,2976151520,3144396420,4269907996,4178062228,1883793496,2403728665,2497604743,1383856311,2876494627,1917518562,3810496343,1716890410,3001755655,800440835,2261089178,3543599269,807962610,599762354,33778362,3977675356,2328828971,2809771154,4077384432,1315562145,1708848333,101039829,3509871135,3299278474,875451293,2733856160,92987698,2767645557,193195065,1080094634,1584504582,3178106961,1042385657,2531067453,3711829422,1306967366,2438237621,1908694277,67556463,1615861247,429456164,3602770327,2302690252,1742315127,2968011453,126454664,3877198648,2043211483,2709260871,2084704233,4169408201,0,159417987,841739592,504459436,1817866830,4245618683,260388950,1034867998,908933415,168810852,1750902305,2606453969,607530554,202008497,2472011535,3035535058,463180190,2160117071,1641816226,1517767529,470948374,3801332234,3231722213,1008918595,303765277,235474187,4069246893,766945465,337553864,1475418501,2943682380,4003061179,2743034109,4144047775,1551037884,1147550661,1543208500,2336434550,3408119516,3069049960,3102011747,3610369226,1113818384,328671808,2227573024,2236228733,3535486456,2935566865,3341394285,496906059,3702665459,226906860,2009195472,733156972,2842737049,294930682,1206477858,2835123396,2700099354,1451044056,573804783,2269728455,3644379585,2362090238,2564033334,2801107407,2776292904,3669462566,1068351396,742039012,1350078989,1784663195,1417561698,4136440770,2430122216,775550814,2193862645,2673705150,1775276924,1876241833,3475313331,3366754619,270040487,3902563182,3678124923,3441850377,1851332852,3969562369,2203032232,3868552805,2868897406,566021896,4011190502,3135740889,1248802510,3936291284,699432150,832877231,708780849,3332740144,899835584,1951317047,4236429990,3767586992,866637845,4043610186,1106041591,2144161806,395441711,1984812685,1139781709,3433712980,3835036895,2664543715,1282050075,3240894392,1181045119,2640243204,25965917,4203181171,4211818798,3009879386,2463879762,3910161971,1842759443,2597806476,933301370,1509430414,3943906441,3467192302,3076639029,3776767469,2051518780,2631065433,1441952575,404016761,1942435775,1408749034,1610459739,3745345300,2017778566,3400528769,3110650942,941896748,3265478751,371049330,3168937228,675039627,4279080257,967311729,135050206,3635733660,1683407248,2076935265,3576870512,1215061108,3501741890],w=[1347548327,1400783205,3273267108,2520393566,3409685355,4045380933,2880240216,2471224067,1428173050,4138563181,2441661558,636813900,4233094615,3620022987,2149987652,2411029155,1239331162,1730525723,2554718734,3781033664,46346101,310463728,2743944855,3328955385,3875770207,2501218972,3955191162,3667219033,768917123,3545789473,692707433,1150208456,1786102409,2029293177,1805211710,3710368113,3065962831,401639597,1724457132,3028143674,409198410,2196052529,1620529459,1164071807,3769721975,2226875310,486441376,2499348523,1483753576,428819965,2274680428,3075636216,598438867,3799141122,1474502543,711349675,129166120,53458370,2592523643,2782082824,4063242375,2988687269,3120694122,1559041666,730517276,2460449204,4042459122,2706270690,3446004468,3573941694,533804130,2328143614,2637442643,2695033685,839224033,1973745387,957055980,2856345839,106852767,1371368976,4181598602,1033297158,2933734917,1179510461,3046200461,91341917,1862534868,4284502037,605657339,2547432937,3431546947,2003294622,3182487618,2282195339,954669403,3682191598,1201765386,3917234703,3388507166,0,2198438022,1211247597,2887651696,1315723890,4227665663,1443857720,507358933,657861945,1678381017,560487590,3516619604,975451694,2970356327,261314535,3535072918,2652609425,1333838021,2724322336,1767536459,370938394,182621114,3854606378,1128014560,487725847,185469197,2918353863,3106780840,3356761769,2237133081,1286567175,3152976349,4255350624,2683765030,3160175349,3309594171,878443390,1988838185,3704300486,1756818940,1673061617,3403100636,272786309,1075025698,545572369,2105887268,4174560061,296679730,1841768865,1260232239,4091327024,3960309330,3497509347,1814803222,2578018489,4195456072,575138148,3299409036,446754879,3629546796,4011996048,3347532110,3252238545,4270639778,915985419,3483825537,681933534,651868046,2755636671,3828103837,223377554,2607439820,1649704518,3270937875,3901806776,1580087799,4118987695,3198115200,2087309459,2842678573,3016697106,1003007129,2802849917,1860738147,2077965243,164439672,4100872472,32283319,2827177882,1709610350,2125135846,136428751,3874428392,3652904859,3460984630,3572145929,3593056380,2939266226,824852259,818324884,3224740454,930369212,2801566410,2967507152,355706840,1257309336,4148292826,243256656,790073846,2373340630,1296297904,1422699085,3756299780,3818836405,457992840,3099667487,2135319889,77422314,1560382517,1945798516,788204353,1521706781,1385356242,870912086,325965383,2358957921,2050466060,2388260884,2313884476,4006521127,901210569,3990953189,1014646705,1503449823,1062597235,2031621326,3212035895,3931371469,1533017514,350174575,2256028891,2177544179,1052338372,741876788,1606591296,1914052035,213705253,2334669897,1107234197,1899603969,3725069491,2631447780,2422494913,1635502980,1893020342,1950903388,1120974935],b=[2807058932,1699970625,2764249623,1586903591,1808481195,1173430173,1487645946,59984867,4199882800,1844882806,1989249228,1277555970,3623636965,3419915562,1149249077,2744104290,1514790577,459744698,244860394,3235995134,1963115311,4027744588,2544078150,4190530515,1608975247,2627016082,2062270317,1507497298,2200818878,567498868,1764313568,3359936201,2305455554,2037970062,1047239e3,1910319033,1337376481,2904027272,2892417312,984907214,1243112415,830661914,861968209,2135253587,2011214180,2927934315,2686254721,731183368,1750626376,4246310725,1820824798,4172763771,3542330227,48394827,2404901663,2871682645,671593195,3254988725,2073724613,145085239,2280796200,2779915199,1790575107,2187128086,472615631,3029510009,4075877127,3802222185,4107101658,3201631749,1646252340,4270507174,1402811438,1436590835,3778151818,3950355702,3963161475,4020912224,2667994737,273792366,2331590177,104699613,95345982,3175501286,2377486676,1560637892,3564045318,369057872,4213447064,3919042237,1137477952,2658625497,1119727848,2340947849,1530455833,4007360968,172466556,266959938,516552836,0,2256734592,3980931627,1890328081,1917742170,4294704398,945164165,3575528878,958871085,3647212047,2787207260,1423022939,775562294,1739656202,3876557655,2530391278,2443058075,3310321856,547512796,1265195639,437656594,3121275539,719700128,3762502690,387781147,218828297,3350065803,2830708150,2848461854,428169201,122466165,3720081049,1627235199,648017665,4122762354,1002783846,2117360635,695634755,3336358691,4234721005,4049844452,3704280881,2232435299,574624663,287343814,612205898,1039717051,840019705,2708326185,793451934,821288114,1391201670,3822090177,376187827,3113855344,1224348052,1679968233,2361698556,1058709744,752375421,2431590963,1321699145,3519142200,2734591178,188127444,2177869557,3727205754,2384911031,3215212461,2648976442,2450346104,3432737375,1180849278,331544205,3102249176,4150144569,2952102595,2159976285,2474404304,766078933,313773861,2570832044,2108100632,1668212892,3145456443,2013908262,418672217,3070356634,2594734927,1852171925,3867060991,3473416636,3907448597,2614737639,919489135,164948639,2094410160,2997825956,590424639,2486224549,1723872674,3157750862,3399941250,3501252752,3625268135,2555048196,3673637356,1343127501,4130281361,3599595085,2957853679,1297403050,81781910,3051593425,2283490410,532201772,1367295589,3926170974,895287692,1953757831,1093597963,492483431,3528626907,1446242576,1192455638,1636604631,209336225,344873464,1015671571,669961897,3375740769,3857572124,2973530695,3747192018,1933530610,3464042516,935293895,3454686199,2858115069,1863638845,3683022916,4085369519,3292445032,875313188,1080017571,3279033885,621591778,1233856572,2504130317,24197544,3017672716,3835484340,3247465558,2220981195,3060847922,1551124588,1463996600],R=[4104605777,1097159550,396673818,660510266,2875968315,2638606623,4200115116,3808662347,821712160,1986918061,3430322568,38544885,3856137295,718002117,893681702,1654886325,2975484382,3122358053,3926825029,4274053469,796197571,1290801793,1184342925,3556361835,2405426947,2459735317,1836772287,1381620373,3196267988,1948373848,3764988233,3385345166,3263785589,2390325492,1480485785,3111247143,3780097726,2293045232,548169417,3459953789,3746175075,439452389,1362321559,1400849762,1685577905,1806599355,2174754046,137073913,1214797936,1174215055,3731654548,2079897426,1943217067,1258480242,529487843,1437280870,3945269170,3049390895,3313212038,923313619,679998e3,3215307299,57326082,377642221,3474729866,2041877159,133361907,1776460110,3673476453,96392454,878845905,2801699524,777231668,4082475170,2330014213,4142626212,2213296395,1626319424,1906247262,1846563261,562755902,3708173718,1040559837,3871163981,1418573201,3294430577,114585348,1343618912,2566595609,3186202582,1078185097,3651041127,3896688048,2307622919,425408743,3371096953,2081048481,1108339068,2216610296,0,2156299017,736970802,292596766,1517440620,251657213,2235061775,2933202493,758720310,265905162,1554391400,1532285339,908999204,174567692,1474760595,4002861748,2610011675,3234156416,3693126241,2001430874,303699484,2478443234,2687165888,585122620,454499602,151849742,2345119218,3064510765,514443284,4044981591,1963412655,2581445614,2137062819,19308535,1928707164,1715193156,4219352155,1126790795,600235211,3992742070,3841024952,836553431,1669664834,2535604243,3323011204,1243905413,3141400786,4180808110,698445255,2653899549,2989552604,2253581325,3252932727,3004591147,1891211689,2487810577,3915653703,4237083816,4030667424,2100090966,865136418,1229899655,953270745,3399679628,3557504664,4118925222,2061379749,3079546586,2915017791,983426092,2022837584,1607244650,2118541908,2366882550,3635996816,972512814,3283088770,1568718495,3499326569,3576539503,621982671,2895723464,410887952,2623762152,1002142683,645401037,1494807662,2595684844,1335535747,2507040230,4293295786,3167684641,367585007,3885750714,1865862730,2668221674,2960971305,2763173681,1059270954,2777952454,2724642869,1320957812,2194319100,2429595872,2815956275,77089521,3973773121,3444575871,2448830231,1305906550,4021308739,2857194700,2516901860,3518358430,1787304780,740276417,1699839814,1592394909,2352307457,2272556026,188821243,1729977011,3687994002,274084841,3594982253,3613494426,2701949495,4162096729,322734571,2837966542,1640576439,484830689,1202797690,3537852828,4067639125,349075736,3342319475,4157467219,4255800159,1030690015,1155237496,2951971274,1757691577,607398968,2738905026,499347990,3794078908,1011452712,227885567,2818666809,213114376,3034881240,1455525988,3414450555,850817237,1817998408,3092726480],m=[0,235474187,470948374,303765277,941896748,908933415,607530554,708780849,1883793496,2118214995,1817866830,1649639237,1215061108,1181045119,1417561698,1517767529,3767586992,4003061179,4236429990,4069246893,3635733660,3602770327,3299278474,3400528769,2430122216,2664543715,2362090238,2193862645,2835123396,2801107407,3035535058,3135740889,3678124923,3576870512,3341394285,3374361702,3810496343,3977675356,4279080257,4043610186,2876494627,2776292904,3076639029,3110650942,2472011535,2640243204,2403728665,2169303058,1001089995,899835584,666464733,699432150,59727847,226906860,530400753,294930682,1273168787,1172967064,1475418501,1509430414,1942435775,2110667444,1876241833,1641816226,2910219766,2743034109,2976151520,3211623147,2505202138,2606453969,2302690252,2269728455,3711829422,3543599269,3240894392,3475313331,3843699074,3943906441,4178062228,4144047775,1306967366,1139781709,1374988112,1610459739,1975683434,2076935265,1775276924,1742315127,1034867998,866637845,566021896,800440835,92987698,193195065,429456164,395441711,1984812685,2017778566,1784663195,1683407248,1315562145,1080094634,1383856311,1551037884,101039829,135050206,437757123,337553864,1042385657,807962610,573804783,742039012,2531067453,2564033334,2328828971,2227573024,2935566865,2700099354,3001755655,3168937228,3868552805,3902563182,4203181171,4102977912,3736164937,3501741890,3265478751,3433712980,1106041591,1340463100,1576976609,1408749034,2043211483,2009195472,1708848333,1809054150,832877231,1068351396,766945465,599762354,159417987,126454664,361929877,463180190,2709260871,2943682380,3178106961,3009879386,2572697195,2538681184,2236228733,2336434550,3509871135,3745345300,3441850377,3274667266,3910161971,3877198648,4110568485,4211818798,2597806476,2497604743,2261089178,2295101073,2733856160,2902087851,3202437046,2968011453,3936291284,3835036895,4136440770,4169408201,3535486456,3702665459,3467192302,3231722213,2051518780,1951317047,1716890410,1750902305,1113818384,1282050075,1584504582,1350078989,168810852,67556463,371049330,404016761,841739592,1008918595,775550814,540080725,3969562369,3801332234,4035489047,4269907996,3569255213,3669462566,3366754619,3332740144,2631065433,2463879762,2160117071,2395588676,2767645557,2868897406,3102011747,3069049960,202008497,33778362,270040487,504459436,875451293,975658646,675039627,641025152,2084704233,1917518562,1615861247,1851332852,1147550661,1248802510,1484005843,1451044056,933301370,967311729,733156972,632953703,260388950,25965917,328671808,496906059,1206477858,1239443753,1543208500,1441952575,2144161806,1908694277,1675577880,1842759443,3610369226,3644379585,3408119516,3307916247,4011190502,3776767469,4077384432,4245618683,2809771154,2842737049,3144396420,3043140495,2673705150,2438237621,2203032232,2370213795],k=[0,185469197,370938394,487725847,741876788,657861945,975451694,824852259,1483753576,1400783205,1315723890,1164071807,1950903388,2135319889,1649704518,1767536459,2967507152,3152976349,2801566410,2918353863,2631447780,2547432937,2328143614,2177544179,3901806776,3818836405,4270639778,4118987695,3299409036,3483825537,3535072918,3652904859,2077965243,1893020342,1841768865,1724457132,1474502543,1559041666,1107234197,1257309336,598438867,681933534,901210569,1052338372,261314535,77422314,428819965,310463728,3409685355,3224740454,3710368113,3593056380,3875770207,3960309330,4045380933,4195456072,2471224067,2554718734,2237133081,2388260884,3212035895,3028143674,2842678573,2724322336,4138563181,4255350624,3769721975,3955191162,3667219033,3516619604,3431546947,3347532110,2933734917,2782082824,3099667487,3016697106,2196052529,2313884476,2499348523,2683765030,1179510461,1296297904,1347548327,1533017514,1786102409,1635502980,2087309459,2003294622,507358933,355706840,136428751,53458370,839224033,957055980,605657339,790073846,2373340630,2256028891,2607439820,2422494913,2706270690,2856345839,3075636216,3160175349,3573941694,3725069491,3273267108,3356761769,4181598602,4063242375,4011996048,3828103837,1033297158,915985419,730517276,545572369,296679730,446754879,129166120,213705253,1709610350,1860738147,1945798516,2029293177,1239331162,1120974935,1606591296,1422699085,4148292826,4233094615,3781033664,3931371469,3682191598,3497509347,3446004468,3328955385,2939266226,2755636671,3106780840,2988687269,2198438022,2282195339,2501218972,2652609425,1201765386,1286567175,1371368976,1521706781,1805211710,1620529459,2105887268,1988838185,533804130,350174575,164439672,46346101,870912086,954669403,636813900,788204353,2358957921,2274680428,2592523643,2441661558,2695033685,2880240216,3065962831,3182487618,3572145929,3756299780,3270937875,3388507166,4174560061,4091327024,4006521127,3854606378,1014646705,930369212,711349675,560487590,272786309,457992840,106852767,223377554,1678381017,1862534868,1914052035,2031621326,1211247597,1128014560,1580087799,1428173050,32283319,182621114,401639597,486441376,768917123,651868046,1003007129,818324884,1503449823,1385356242,1333838021,1150208456,1973745387,2125135846,1673061617,1756818940,2970356327,3120694122,2802849917,2887651696,2637442643,2520393566,2334669897,2149987652,3917234703,3799141122,4284502037,4100872472,3309594171,3460984630,3545789473,3629546796,2050466060,1899603969,1814803222,1730525723,1443857720,1560382517,1075025698,1260232239,575138148,692707433,878443390,1062597235,243256656,91341917,409198410,325965383,3403100636,3252238545,3704300486,3620022987,3874428392,3990953189,4042459122,4227665663,2460449204,2578018489,2226875310,2411029155,3198115200,3046200461,2827177882,2743944855],_=[0,218828297,437656594,387781147,875313188,958871085,775562294,590424639,1750626376,1699970625,1917742170,2135253587,1551124588,1367295589,1180849278,1265195639,3501252752,3720081049,3399941250,3350065803,3835484340,3919042237,4270507174,4085369519,3102249176,3051593425,2734591178,2952102595,2361698556,2177869557,2530391278,2614737639,3145456443,3060847922,2708326185,2892417312,2404901663,2187128086,2504130317,2555048196,3542330227,3727205754,3375740769,3292445032,3876557655,3926170974,4246310725,4027744588,1808481195,1723872674,1910319033,2094410160,1608975247,1391201670,1173430173,1224348052,59984867,244860394,428169201,344873464,935293895,984907214,766078933,547512796,1844882806,1627235199,2011214180,2062270317,1507497298,1423022939,1137477952,1321699145,95345982,145085239,532201772,313773861,830661914,1015671571,731183368,648017665,3175501286,2957853679,2807058932,2858115069,2305455554,2220981195,2474404304,2658625497,3575528878,3625268135,3473416636,3254988725,3778151818,3963161475,4213447064,4130281361,3599595085,3683022916,3432737375,3247465558,3802222185,4020912224,4172763771,4122762354,3201631749,3017672716,2764249623,2848461854,2331590177,2280796200,2431590963,2648976442,104699613,188127444,472615631,287343814,840019705,1058709744,671593195,621591778,1852171925,1668212892,1953757831,2037970062,1514790577,1463996600,1080017571,1297403050,3673637356,3623636965,3235995134,3454686199,4007360968,3822090177,4107101658,4190530515,2997825956,3215212461,2830708150,2779915199,2256734592,2340947849,2627016082,2443058075,172466556,122466165,273792366,492483431,1047239e3,861968209,612205898,695634755,1646252340,1863638845,2013908262,1963115311,1446242576,1530455833,1277555970,1093597963,1636604631,1820824798,2073724613,1989249228,1436590835,1487645946,1337376481,1119727848,164948639,81781910,331544205,516552836,1039717051,821288114,669961897,719700128,2973530695,3157750862,2871682645,2787207260,2232435299,2283490410,2667994737,2450346104,3647212047,3564045318,3279033885,3464042516,3980931627,3762502690,4150144569,4199882800,3070356634,3121275539,2904027272,2686254721,2200818878,2384911031,2570832044,2486224549,3747192018,3528626907,3310321856,3359936201,3950355702,3867060991,4049844452,4234721005,1739656202,1790575107,2108100632,1890328081,1402811438,1586903591,1233856572,1149249077,266959938,48394827,369057872,418672217,1002783846,919489135,567498868,752375421,209336225,24197544,376187827,459744698,945164165,895287692,574624663,793451934,1679968233,1764313568,2117360635,1933530610,1343127501,1560637892,1243112415,1192455638,3704280881,3519142200,3336358691,3419915562,3907448597,3857572124,4075877127,4294704398,3029510009,3113855344,2927934315,2744104290,2159976285,2377486676,2594734927,2544078150],S=[0,151849742,303699484,454499602,607398968,758720310,908999204,1059270954,1214797936,1097159550,1517440620,1400849762,1817998408,1699839814,2118541908,2001430874,2429595872,2581445614,2194319100,2345119218,3034881240,3186202582,2801699524,2951971274,3635996816,3518358430,3399679628,3283088770,4237083816,4118925222,4002861748,3885750714,1002142683,850817237,698445255,548169417,529487843,377642221,227885567,77089521,1943217067,2061379749,1640576439,1757691577,1474760595,1592394909,1174215055,1290801793,2875968315,2724642869,3111247143,2960971305,2405426947,2253581325,2638606623,2487810577,3808662347,3926825029,4044981591,4162096729,3342319475,3459953789,3576539503,3693126241,1986918061,2137062819,1685577905,1836772287,1381620373,1532285339,1078185097,1229899655,1040559837,923313619,740276417,621982671,439452389,322734571,137073913,19308535,3871163981,4021308739,4104605777,4255800159,3263785589,3414450555,3499326569,3651041127,2933202493,2815956275,3167684641,3049390895,2330014213,2213296395,2566595609,2448830231,1305906550,1155237496,1607244650,1455525988,1776460110,1626319424,2079897426,1928707164,96392454,213114376,396673818,514443284,562755902,679998e3,865136418,983426092,3708173718,3557504664,3474729866,3323011204,4180808110,4030667424,3945269170,3794078908,2507040230,2623762152,2272556026,2390325492,2975484382,3092726480,2738905026,2857194700,3973773121,3856137295,4274053469,4157467219,3371096953,3252932727,3673476453,3556361835,2763173681,2915017791,3064510765,3215307299,2156299017,2307622919,2459735317,2610011675,2081048481,1963412655,1846563261,1729977011,1480485785,1362321559,1243905413,1126790795,878845905,1030690015,645401037,796197571,274084841,425408743,38544885,188821243,3613494426,3731654548,3313212038,3430322568,4082475170,4200115116,3780097726,3896688048,2668221674,2516901860,2366882550,2216610296,3141400786,2989552604,2837966542,2687165888,1202797690,1320957812,1437280870,1554391400,1669664834,1787304780,1906247262,2022837584,265905162,114585348,499347990,349075736,736970802,585122620,972512814,821712160,2595684844,2478443234,2293045232,2174754046,3196267988,3079546586,2895723464,2777952454,3537852828,3687994002,3234156416,3385345166,4142626212,4293295786,3841024952,3992742070,174567692,57326082,410887952,292596766,777231668,660510266,1011452712,893681702,1108339068,1258480242,1343618912,1494807662,1715193156,1865862730,1948373848,2100090966,2701949495,2818666809,3004591147,3122358053,2235061775,2352307457,2535604243,2653899549,3915653703,3764988233,4219352155,4067639125,3444575871,3294430577,3746175075,3594982253,836553431,953270745,600235211,718002117,367585007,484830689,133361907,251657213,2041877159,1891211689,1806599355,1654886325,1568718495,1418573201,1335535747,1184342925];function I(i){for(var t=[],e=0;e>2][t%4]=r[t],this.nAA[i-e][t%4]=r[t];for(var n,l=0,a=h;a>16&255]<<24^d[n>>8&255]<<16^d[255&n]<<8^d[n>>24&255]^p[l]<<24,l+=1,8!=h)for(t=1;t>8&255]<<8^d[n>>16&255]<<16^d[n>>24&255]<<24,t=h/2+1;t>2][f=a%4]=r[t],this.nAA[i-s][f]=r[t++],a++}for(var s=1;s>24&255]^k[n>>16&255]^_[n>>8&255]^S[255&n]},A.prototype.encrypt=function(i){if(16!=i.length)throw new Error("invalid plaintext size (must be 16 bytes)");for(var t=this.aAA.length-1,e=[0,0,0,0],o=I(i),h=0;h<4;h++)o[h]^=this.aAA[0][h];for(var r=1;r>24&255]^y[o[(h+1)%4]>>16&255]^c[o[(h+2)%4]>>8&255]^v[255&o[(h+3)%4]]^this.aAA[r][h];o=e.slice()}for(var n,l=a(16),h=0;h<4;h++)n=this.aAA[t][h],l[4*h]=255&(d[o[h]>>24&255]^n>>24),l[4*h+1]=255&(d[o[(h+1)%4]>>16&255]^n>>16),l[4*h+2]=255&(d[o[(h+2)%4]>>8&255]^n>>8),l[4*h+3]=255&(d[255&o[(h+3)%4]]^n);return l},A.prototype.decrypt=function(i){if(16!=i.length)throw new Error("invalid ciphertext size (must be 16 bytes)");for(var t=this.nAA.length-1,e=[0,0,0,0],o=I(i),h=0;h<4;h++)o[h]^=this.nAA[0][h];for(var r=1;r>24&255]^w[o[(h+3)%4]>>16&255]^b[o[(h+2)%4]>>8&255]^R[255&o[(h+1)%4]]^this.nAA[r][h];o=e.slice()}for(var n,l=a(16),h=0;h<4;h++)n=this.nAA[t][h],l[4*h]=255&(f[o[h]>>24&255]^n>>24),l[4*h+1]=255&(f[o[(h+3)%4]>>16&255]^n>>16),l[4*h+2]=255&(f[o[(h+2)%4]>>8&255]^n>>8),l[4*h+3]=255&(f[255&o[(h+1)%4]]^n);return l},C.prototype.encrypt=function(i){if((i=r(i)).length%16!=0)throw new Error("invalid plaintext size (must be multiple of 16 bytes)");for(var t=a(i.length),e=a(16),o=0;oNumber.MAX_SAFE_INTEGER)throw new Error("integer value out of safe range");for(var t=15;0<=t;--t)this.g2t[t]=i%256,i=parseInt(i/256)},T.prototype.CAA=function(i){if(16!=(i=r(i,!0)).length)throw new Error("invalid counter bytes size (must be 16 bytes)");this.g2t=i},T.prototype.lAA=function(){for(var i=15;0<=i;i--){if(255!==this.g2t[i]){this.g2t[i]++;break}this.g2t[i]=0}},z.prototype.decrypt=z.prototype.encrypt=function(i){for(var t=r(i,!0),e=0;e=polyfill.Ra&&(h[0]-=c[0],h[1]-=c[1]),i.path[t]=h[0],i.path[t+1]=h[1]}break;case"region":for(var r=i.path,n=0;n=polyfill.Ra&&(h[0]-=c[0],h[1]-=c[1]),l[t]=h[0],l[t+1]=h[1];r[n]=l}break;case"building":for(r=i.path,i.oW=[],n=0;n=polyfill.Ra&&(h[0]-=c[0],h[1]-=c[1]),l[t]=h[0],l[t+1]=h[1];r[n]=l,i.oW[n]=a}break;case"poilabel":case"roadName":if(i.pos&&(a=polyfill.XY(u,s.resolution,i.pos[0],i.pos[1]),i.pos=y.project(a[0],a[1])),i.path)if(i.shield)a=polyfill.XY(u,s.resolution,i.path[0],i.path[1]),h=y.project(a[0],a[1]),v>=polyfill.Ra&&(h[0]-=c[0],h[1]-=c[1]),i.path[0]=h[0],i.path[1]=h[1];else for(t=0;t=polyfill.Ra&&(h[0]-=c[0],h[1]-=c[1]),i.path[t]=h[0],i.path[t+1]=h[1]}i.du=s.resolution,i.Fp=s.mainkey,i.Ep=s.subkey,i.zIndex=x.parent.vn.Lw(s.mainkey,s.subkey),i.lineCap=f[0],i.RQ=f[1],i.gw={z:u.z,y:u.y,x:u.x},p.push(i)})}),"poilabel"!==d?x.Tw(p):x.Na(p),"poilabel"===d?(i=u.z+"-"+u.x+"-"+u.y,o[d]?o[d][i]?o[d][i].push.apply(o[d][i],p):o[d][i]=p:(o[d]={},o[d][i]=p)):o[d]?o[d].push.apply(o[d],p):o[d]=p}),o.Mw=c,o},h.prototype.A0=function(i,t){return i.minzoom-t.minzoom||i.maxzoom-t.maxzoom},h.prototype.Tw=function(i){return i.sort(function(i,t){return i.zIndex-t.zIndex}),i},h.prototype.Na=function(i){return i.sort(function(i,t){return i.rank-t.rank}),i},h.prototype.xw=function(i,t){var e=i.data,o=new polyfill._w;if(e.Uc=o,!e.$c){e.$c=new polyfill.J_,e.road=e.road||[];var h=i.Mw.slice(0);if(i.zo.z<=polyfill.za&&(h[0]=0,h[1]=0),e.road.push({name:"",rank:1,maxzoom:polyfill.zoomRange[1],minzoom:polyfill.zoomRange[0],path:[i.Ro[0]-h[0],i.Ro[1]-h[1],i.Ro[2]-h[0],i.Ro[1]-h[1],i.Ro[2]-h[0],i.Ro[3]-h[1],i.Ro[0]-h[0],i.Ro[3]-h[1],i.Ro[0]-h[0],i.Ro[1]-h[1]],Fp:-2,Ep:-2,shield:"",shieldType:0,du:13,lineCap:"butt",RQ:"butt"}),e.road)for(var r=0,n=e.road;r KEY异常,错误信息:"+i.info)):e(null,i)}).catch(function(i){"AbortError"!==i.name&&e(i.message||"unknown error")}),{cancel:function(){o.abort()}}):r=i.send("request",t,function(i,t){i?(""===i&&r&&r.cancel&&r.cancel(),r=void 0,e(i)):(r=void 0,e(null,t))})}var DistrictSourceWorker=function(){function DistrictSourceWorker(i){this.parent=i,this.fW={}}return DistrictSourceWorker.prototype.bw=function(i,t,e,o,h){var r=this,n=new XMLHttpRequest;return n.onreadystatechange=function(){var i;4!==n.readyState||200!==n.status&&204!==n.status||(i=new polyfill.tW(new polyfill.pw(new Uint8Array(n.response))),i=r.Ow(i,{x:t.x,y:t.y,z:t.z,projectionId:e,tileSize:o}),h(null,polyfill.Ln({zo:t},i)))},n.open("GET",i,!0),n.responseType="arraybuffer",n.send(),{cancel:function(){n.abort()}}},DistrictSourceWorker.prototype.Ow=function(s,i){var e=i.x,o=i.y,h=i.z,r=i.tileSize,n=i.projectionId,i=(s.z=h,s.x=e,s.y=o,polyfill.ProjectionManager.getProjection(n).getResolution(h)),l=(s.Ro=polyfill.$Q(e,o,h,i,r),s.zS=polyfill.lcs.getLocalByCoord([s.Ro[0],s.Ro[1]]),polyfill.ProjectionManager.getProjection(n).getResolution(h));return polyfill.vx(s.layers,function(a){var i=a.Cw,t=(a.Ah=[],a.scale=l*r/a.extent,polyfill.V[n].Xs(r*e,r*o,h));a.ox=t[0],a.oy=t[1],polyfill.forEach(i,function(i,t){if((i=a.Gw(t)).Dw(),a.Ah.push(i),i.lines&&0=h[h.length-1][0])return this.HU(i,h[h.length-1][1],e);for(var r=1,n=h.length;rh[r-1][0]&&e<=h[r][0]){var l=this.HU(i,h[r-1][1],e),a=this.HU(i,h[r][1],e);if(l instanceof Array){for(var s=new Array(l.length),f=0;ft){e=i.stops[o][1];break}e=i.stops[h-1][1]}else if("interpolate"===i[0]){for(var r=i.slice(3),n=[],l=0;lt){e=n[o][1];break}e=n[h-1][1]}}return e}},Tr:function(i,t){if(i){var e=void 0;if(i.stops)for(var o=0,h=i.stops.length;ot){e=i.stops[o][1];break}e=i.stops[h-1][1]}else e=i;return e}},Ir:function(i,t){var e;if(void 0===i)return 0;if("function"==typeof i)return i(t);if("number"!=typeof i){if(i.stops)e=this.Sr(i.base||1,i.stops,t);else if("interpolate"===i[0]){for(var o=i.slice(3),h=[],r=0;rt||void 0!==h.maxzoom&&h.maxzoom","<",">=","<=","in","!in"],i[0])||"object"==typeof i&&i.stops},KU:function(i,t){if(i&&i.length){if(i.indexOf)return i.indexOf(t);for(var e=0;et||(o=Math.max(o,u.zIndex),s=(a=u.paint)["line-color"],r=this.HU(e,s,t),n=this.HU(e,a["line-width"],t),s=void 0===a["line-opacity"]?1:a["line-opacity"],l=this.HU(e,s,t)):"fill"!==i[h].type||u.minzoom&&u.minzoom>t||(o=Math.max(o,u.zIndex),s=(a=u.paint)["fill-color"],f=this.HU(e,s,t))}return{zIndex:o,fillColor:f,fillOpacity:1,strokeWeight:n,strokeColor:r,strokeOpacity:l}},Xr:function(i,t,e){var o,h,r,n,l,a,s,f,u,p,d,x,y=(i=i[0]).paint,c=i.layout;if("symbol"===i.type)return o=this.HU(e,y["text-color"],t),h=this.HU(e,y["text-halo-color"],t),a=this.HU(e,y["text-halo-width"],t),r=void 0===y["icon-opacity"]?1:y["icon-opacity"],r=this.HU(e,r,t),y=void 0===y["text-opacity"]?1:y["text-opacity"],y=this.HU(e,y,t),n=l=void 0,0===a&&(h=""),c["icon-image"]&&(l=this.HU(e,c["icon-image"],t),a=this.kr[l])&&r&&(a.height,n=[-a.width/2,-a.height/2,a.width,a.height,a.x,a.y,a.width,a.height]),a=this.HU(e,c["icon-rotation-alignment"],t),s=c["text-max-width"],f=this.HU(e,c["text-anchor"]||"center",t),(u=this.HU(e,c["text-font"],t)||"Microsoft YaHei")instanceof Array&&(u=u.join(" ")),p=c["text-offset"]?this.HU(e,c["text-offset"],t):[0,0],d=this.HU(e,c["text-size"],t),x="",y&&c["text-field"]&&(x=this.HU(e,c["text-field"]||"{name}",t)),{zIndex:i.zIndex,Jr:a,Kr:o||"black",Qr:h,th:(i.minzoom||1)+.5,ih:(i.maxzoom||20)+.5,eh:r,nh:l,qU:n,oh:s,textAnchor:f,ah:u,sh:p,rh:d,name:x}},lh:function(i,t,e){var o=[],h=this.Pr(i,t,e);return h&&(h.type="line",o.push(h)),(h=this.uh(i,t,e)).length&&o.push.apply(o,h),o},uh:function(i,t,e){for(var o=[],h=0;h=o[o.length-1][0])return this.HU(i,o[o.length-1][1],e);for(h=1,r=o.length;h"===t[0]?this.HU(i,t[1],e)>this.HU(i,t[2],e):"<"===t[0]?this.HU(i,t[1],e)="===t[0]?this.HU(i,t[1],e)>=this.HU(i,t[2],e):"<="===t[0]?this.HU(i,t[1],e)<=this.HU(i,t[2],e):"in"===t[0]?-1t[1].zIndex?1:-1}),i.polygons=e,i.Dh=o,delete i.layers},Ph:function(i){i.type,i.lines},jh:function(i,t,e,o){this.mh=3;var h,r=t.vt,n=(r.labels=[],[]);for(h in r.layers)if(r.layers.hasOwnProperty(h)){var l=r.layers[h],a=l.Ah;n.push(h);for(var s=0,f=a.length;sthis.layers.length&&(this.layers=n),o(null,{vt:r})}},MapboxStyle=function(){function i(i){var t=null,e="";i&&((i=i.KG)&&i.styles&&(t=JSON.parse(i.styles).layers),i)&&i.vectorMapForeign&&(e=i.vectorMapForeign),mbStyle.Rr(t,e)}return i.prototype.getMapboxStyle=function(){return mbStyle},i}(),MapboxSourceWorker=function(){function i(i){this.parent=i,this.id="mapbox",this.sQ={},this.yQ={},this.kQ={}}return i.prototype.YE=function(i){var t=polyfill.Util.getOptimalZoom(this.WW);i(this.sQ,{ZL:this.WW,optimalZoom:t,cb:function(){}}),this.sQ={}},i.prototype.bw=function(i,h,r,n,t,e,l){var a=this,s=new XMLHttpRequest;return s.onreadystatechange=function(){var i,t,e,o;4===s.readyState&&200===s.status&&(o=new polyfill.pw(new Uint8Array(s.response)),(o=new polyfill.tW(o)).nG("mapbox"),i=h.z,t=h.x,e=h.y,o.data={},o=a.Ow(o,{x:h.x,y:h.y,z:h.z,projectionId:r,tileSize:n}),a.wQ(o),o.zo=new polyfill.ca(i,t,e),a.FQ(o),delete o.road,l(null,polyfill.Ln({zo:h},o)))},s.open("GET",i,!0),s.responseType="arraybuffer",s.send(),{cancel:function(){s.abort()}}},i.prototype.wQ=function(i){i.stencil={};var t=new polyfill.fQ,i=(i.stencil.Oc=t,i.stencil.Dc=new polyfill.K_,i.stencil.Dc.Nx(i.MQ));t.add({},i)},i.prototype.Ow=function(e,i){var o=i.x,h=i.y,s=i.z,r=i.tileSize,f=i.projectionId;e.z=s,e.x=o,e.y=h;for(var i=polyfill.ProjectionManager.getProjection(f).getResolution(s),i=polyfill.$Q(o,h,s,i,r),n=(e.Ro=i,e.MQ=[i[0],i[1],i[2],i[1],i[2],i[3],i[0],i[3]],e.zS=polyfill.lcs.getLocalByCoord([e.Ro[0],e.Ro[1]]),e.localCoord=e.zS,Object.keys(e.layers)),t=0;tt.style.zIndex?1:-1}),o.sort(function(i,t){return i.style&&t.style&&i.style.zIndex>t.style.zIndex?1:-1}),i.polygons=o,i.Dh=h,i.data.poilabel=((n={})[i.z+","+i.x+","+i.y]=r,n),delete i.layers},i.prototype.startsWith=function(i,t){return i.startsWith?i.startsWith(t):i.substr(0,t.length)===t},i.prototype.argbHex2Rgba=function(i){for(var t=[],e=0,o=i.length;e=this.data.length?polyfill.vY.finish:polyfill.vY.pause},eb:!1,nb:!0}),i.prototype.hQ=function(i,t){if(i)for(var e=this.SQ(i)||[],o=0,h=e=new LabelFormatMap$1[i.type]({vn:this.vn}).DQ(e,{zoom:t});o=this.PS&&(this.FS=0),this.BS=this.FS}},z.TS.prototype.NS=function(){this.flush(),this.ES=null},z.TS.prototype.US=function(i){this.NS(),this.ES=i},z.TS.prototype.init=function(i){i||(this.BS=0,this.FS=0)},z.TS.prototype.WS=function(i,t){var e=this.FS-i-1;for(e<0&&(e+=this.PS);t--;)e>=this.PS&&(e=0),this.OS[this.FS++]=this.OS[e++],this.FS>=this.PS&&this.flush()},z.TS.prototype.GS=function(i){this.OS[this.FS++]=i,this.FS>=this.PS&&this.flush()},z.TS.prototype.HS=function(i){return(i=this.FS-i-1)<0&&(i+=this.PS),this.OS[i]},z.VS=function(){},z.VS.prototype.US=function(i){this.ES=i},z.VS.prototype.NS=function(){this.ES=null},z.VS.prototype.init=function(){var i=5;for(this.ZS=0,this.YS=-1;i--;)this.ZS=this.ZS<<8|this.ES.JS()},z.VS.prototype.XS=function(i){for(var t,e=0,o=i;o--;)this.YS>>>=1,t=this.ZS-this.YS>>>31,this.ZS-=this.YS&t-1,e=e<<1|1-t,0==(4278190080&this.YS)&&(this.ZS=this.ZS<<8|this.ES.JS(),this.YS<<=8);return e},z.VS.prototype.qS=function(i,t){var e=i[t],o=(this.YS>>>11)*e;return(2147483648^this.ZS)<(2147483648^o)?(this.YS=o,i[t]+=2048-e>>>5,0==(4278190080&this.YS)&&(this.ZS=this.ZS<<8|this.ES.JS(),this.YS<<=8),0):(this.YS-=o,this.ZS-=o,i[t]-=e>>>5,0==(4278190080&this.YS)&&(this.ZS=this.ZS<<8|this.ES.JS(),this.YS<<=8),1)},z.QS=function(i,t){for(;t--;)i[t]=1024},z.KS=function(i){this.tR=[],this.iR=i},z.KS.prototype.init=function(){z.QS(this.tR,1<>7&1,t<<=1,h=h<<1|(o=i.qS(this.uR,(1+e<<8)+h)),e!==o){for(;h<256;)h=h<<1|i.qS(this.uR,h);break}}while(h<256);return 255&h},z.pR=function(){},z.pR.prototype.create=function(i,t){var e;if(!this.vR||this.mR!==t||this.yR!==i)for(this.yR=i,this.xR=(1<>>8-this.mR)]},z.gR=function(){this.wR=new z.TS,this._R=new z.VS,this.kR=[],this.MR=[],this.SR=[],this.RR=[],this.zR=[],this.CR=[],this.AR=[],this.IR=[],this.$R=new z.KS(4),this.LR=new z.oR,this.DR=new z.oR,this.TR=new z.pR,this.PR=-1,this.OR=-1,this.AR[0]=new z.KS(6),this.AR[1]=new z.KS(6),this.AR[2]=new z.KS(6),this.AR[3]=new z.KS(6)},z.gR.prototype.FR=function(i){return!(i<0||(this.PR!==i&&(this.PR=i,this.OR=Math.max(this.PR,1),this.wR.create(Math.max(this.OR,4096))),0))},z.gR.prototype.BR=function(i,t,e){var o=1<>1)-1),r<14)a+=z.nR(this.IR,a-r-1,this._R,n);else if((a=(a+=this._R.XS(n-4)<<4)+this.$R.eR(this._R))<0){if(-1===a)break;return!1}}else a=r;if(p<=a||a>=this.OR)return!1;this.wR.WS(a,o),p+=o,d=this.wR.HS(0)}return this.wR.flush(),this.wR.NS(),this._R.NS(),!0},z.gR.prototype.ER=function(i){var t;return!(i.size<5||(t=i.JS(),!this.BR(t%9,(t=~~(t/9))%5,~~(t/5))))&&(t=i.JS(),t=(t=(t|=i.JS()<<8)|i.JS()<<16)+16777216*i.JS(),this.FR(t))},z.NR=function(i,t){var e,o=new z.gR;if(!o.ER(i))throw new Error("Incorrect stream properties");if(e=i.JS(),e=((e|=i.JS()<<8)|i.JS()<<16)+16777216*i.JS(),i.JS(),i.JS(),i.JS(),i.JS(),o.decode(i,t,e))return!0;throw new Error("Error in data stream")},1e-9);function ji(i,t,e){for(var o,a,h=i.subarray(t,e),r=0,n="",l=0,r=0;r>>7==0?("0"!==(o=String.fromCharCode(h[r])).charCodeAt(0).toString(16)&&(n+=o),r+=1):252==(252&a)?(l=(3&h[r])<<30,l=(l=(l=(l=(l|=(63&h[r+1])<<24)|(63&h[r+2])<<18)|(63&h[r+3])<<12)|(63&h[r+4])<<6)|63&h[r+5],n+=String.fromCharCode(l),r+=6):248==(248&a)?(l=(7&h[r])<<24,l=(l=(l=(l|=(63&h[r+1])<<18)|(63&h[r+2])<<12)|(63&h[r+3])<<6)|63&h[r+4],n+=String.fromCharCode(l),r+=5):240==(240&a)?(l=(15&h[r])<<18,l=(l=(l|=(63&h[r+1])<<12)|(63&h[r+2])<<6)|63&h[r+3],n+=String.fromCharCode(l),r+=4):224==(224&a)?(l=(31&h[r])<<12,l=(l|=(63&h[r+1])<<6)|63&h[r+2],n+=String.fromCharCode(l),r+=3):192==(192&a)?(l=(63&h[r])<<6,l|=63&h[r+1],n+=String.fromCharCode(l),r+=2):("0"!==(o=String.fromCharCode(h[r])).charCodeAt(0).toString(16)&&(n+=o),r+=1);return n.trim()}var o=new RegExp("^[+\\-]?[0-1]*[.]?[0-1]*$","gi");function Vi(i,t){i=i.toString(),t=t.toString(),i=new Array(32-i.length+1).join("0")+i,t=new Array(32-t.length+1).join("0")+t;var e=o;return e.lastIndex=0,(t=(t+i).toString().match(e))?(i=-1===t[i=0].indexOf(".")?parseInt(t,2):i).toString(36).toUpperCase():"error"}i.getUnifyJson=function(i){var t=[];if(i instanceof ArrayBuffer){var e=new DataView(i),o=0,h=e.getInt16(o+=4,!1);o+=2;try{for(;0e[2]||t[3]>e[3])&&(i[0]=t[0]-e[0],i[1]=t[1]-e[1],i[2]=t[2]-e[2],i[3]=t[3]-e[3],i[0]<0&&0=this.xt[1]||(s=0,n=function(){h+=16;var t=o+a.h(h/r);t>=e.xt[1]||(e.bt(i,t),o+1<=t&&(_.Util.cancelAnimFrame(s),e.lt=!1,e.R="enabled",e.tt(),e.N()),(e.lt||h<400)&&(s=_.Util.requestAnimFrame(n)))},s=_.Util.requestAnimFrame(n))},i.prototype.gt=function(t){var i,n,s=w.mousePos(this.j,t,this._map);s[0]-this.$[0]==0&&s[1]-this.$[1]==0||(this.yt=-1,this.ct<2?this.ct=0:this.rt&&(this.lt=!0,this.wt=!0,this.ft.disable(),s=t.changedTouches.length,i=this._map.getView(),n=this._map.getView().getStatus().zoom-(t.changedTouches[s-1].clientY-this.pt[1])/100,i.setOptions({zoom:n}),this.pt=[t.changedTouches[s-1].clientX,t.changedTouches[s-1].clientY]))},i.prototype.N=function(){this.wt&&2<=this.ct&&(this.ft.enable(),this.tt(),this.lt=!1,this.wt=!1)},i.prototype.bt=function(t,i){var n,s,e,r=this._map.getView(),o=(h=r.getStatus()).center,a=h.zoom,u=h.rotation,h=h.projectionId;this._map.getStatus().zoomEnable&&(t=w.mousePos(this.j,t,this._map),e=[this.j.clientWidth/2,this.j.clientHeight/2],s=this._t(e,t),n=Math.atan((t[1]-e[1])/(t[0]-e[0])),u=-u/180*Math.PI+n,n=[-Math.cos(u)*s,Math.sin(u)*s],t[0]-e[0]<0&&(n[0]=-n[0],n[1]=-n[1]),u=_.V[h].nt(n[0],n[1],a),s=_.V[h].nt(n[0],n[1],i),e=Math.pow(2,i-a),r.setOptions({kt:{pos:t,Mt:i,Rt:s,zt:u,scale:e,center:_.set(_.create(),o[0],o[1])}}),this.G("zooming"))},i.prototype.tt=function(t){t&&0!==t.button||(this.S(),this.C(),this.G("zoomend"))},i.prototype.S=function(){this.j.removeEventListener("dblclick",this.St),this.j.removeEventListener("touchmove",this.dt)},i.prototype.C=function(){delete this.$,delete this.U,delete this.U},i.prototype._t=function(t,i){var n=i[0]-t[0],i=i[1]-t[1];return Math.sqrt(n*n+i*i)},i.prototype.G=function(t,i){this._map.getBindHandler().fireEvent(t,i)};var $=i;function i(t,i){this.lt=!1,this.wt=!1,this.rt=!0,this.xt=_.zoomRange,this.yt=0,this.ct=0,this.pt=[0,0],this._map=i,this.j=t,this.R="disabled",this.St=this.ut.bind(this),this.dt=this.gt.bind(this)}it.prototype.isEnabled=function(){return"disabled"!==this.R},it.prototype.isActive=function(){return"active"===this.R},it.prototype.enable=function(){this.isEnabled()||(this.R="enabled")},it.prototype.disable=function(){if(this.isEnabled())switch(w.removeClass(this.j,"mapboxgl-touch-drag-pan"),this.R){case"active":this.R="disabled",this.S(),this.G("zoomstart");break;case"pending":this.R="disabled",this.S();break;default:this.R="disabled"}},it.prototype.ht=function(){return!!this.lt},it.prototype.P=function(t){2===t.touches.length&&(t.stopPropagation(),this.G("zoomstart"),this.$=[{clientX:t.touches[0].clientX,clientY:t.touches[0].clientY,pageX:t.touches[0].pageX,pageY:t.touches[0].pageY},{clientX:t.touches[1].clientX,clientY:t.touches[1].clientY,pageX:t.touches[1].pageX,pageY:t.touches[1].pageY}],this.B=this.$,t=this._map.getView(),this.zY=t.getStatus(),this.j.addEventListener("touchmove",this.T),this.j.addEventListener("touchend",this.At))},it.prototype.Z=function(t){var i,n,s,e,r,h,o,a,u,c,f,l,d,v,p,m,y,b,g,M,k;t.touches.length<2||(this.G("touchmove"),this._map.getStatus().touchZoom&&this.isEnabled()&&(this.lt=!0,i=-this.CF(t),s=(c=(n=this._map.getView()).getStatus()).rotation,e=c.center,r=c.zoom,g=c.projectionId,g=void 0===(h=c.Tt)?g:h,h=c.pitch,o=(c=this._map.getStatus()).rotateEnable,a=c.zoomEnable,u=c.pitchEnable,c=c.touchZoomCenter,f=this.MW.CY,d=l=!1,y=this.It(this.B[0],this.B[1]),p=this.It(t.touches[0],t.touches[1]),v=this.Dt(this.$[0],this.$[1]),k=this.Dt(t.touches[0],t.touches[1]),p=r+(p-y)/180,y=[((y=_.Pt(w.mousePos(this.j,this.$[0],this._map),w.mousePos(this.j,this.$[1],this._map)))[0]+y[2])/2,(y[1]+y[3])/2],b=[this.j.clientWidth/2,this.j.clientHeight/2],m=this.jt(b,y),M=Math.atan((y[1]-b[1])/(y[0]-b[0])),M=s*Math.PI/180+M,M=[-Math.cos(M)*m,Math.sin(M)*m],y[0]-b[0]<0&&(M[0]=-M[0],M[1]=-M[1]),m=_.V[g].nt(M[0],M[1],r),y=_.V[g].nt(M[0],M[1],p),b=Math.pow(2,p-r),g=this.zY.rotation+(k-v),10nt?1/450:.01,h=2/(1+Math.exp(-Math.abs(this.$t*h))),this.$t<0&&0!==h&&(h=1/h),r=this.Yt(n),r=Math.min(this._map.getZooms()[1],Math.max(2,this.Vt(r*h))),h=w.mousePos(this.j,t,this._map),t=[this.j.clientWidth/2,this.j.clientHeight/2],u=this._t(t,h),o=Math.atan((h[1]-t[1])/(h[0]-t[0])),a=-a/180*Math.PI+o,o=[-Math.cos(a)*u,Math.sin(a)*u],h[0]-t[0]<0&&(o[0]=-o[0],o[1]=-o[1]),a=_.V[e].nt(o[0],o[1],n),u=_.V[e].nt(o[0],o[1],r),t=Math.pow(2,r-n),this._map.XT(o),i.setOptions({kt:{pos:h,Mt:r,Rt:u,zt:a,scale:t,center:_.set(_.create(),s[0],s[1])}}),this.$t=0)},et.prototype.Yt=function(t){return Math.pow(2,t)},et.prototype.Vt=function(t){return Math.log(t)/Math.LN2},et.prototype._t=function(t,i){var n=i[0]-t[0],i=i[1]-t[1];return Math.sqrt(n*n+i*i)},et.prototype.C=function(){delete this.q,delete this.$,delete this.U,delete this.B},et.prototype.G=function(t,i){this._map.getBindHandler().fireEvent(t,i)},et);function et(t,i){this._map=i,this.j=t,this.R="disabled",this.Wt="wheel",this.$t=0}ht.prototype.isEnabled=function(){return"disabled"!==this.R},ht.prototype.isActive=function(){return"active"===this.R},ht.prototype.enable=function(){this.isEnabled()||(this.R="enabled")},ht.prototype.disable=function(){if(this.isEnabled()){switch(this.R){case"active":this.S(),this.C();break;case"pending":this.S()}this.R="disabled"}},ht.prototype.L=function(t){this.A&&clearInterval(this.A),(2===t.button||t.ctrlKey&&0===t.button)&&(this.j.addEventListener("mousemove",this.T,{passive:!0}),this.j.addEventListener("mouseup",this.I),this.j.addEventListener("mouseleave",this.I),this.D(t))},ht.prototype.D=function(t){this.$=this.U=this.B=w.mousePos(this.j,t,this._map),this.W=[[Date.now(),this.$]],this.R="active"},ht.prototype.Z=function(t){var i,n,s;this.W.length<2&&"active"===this.R&&this.G("dragstart",t),this.G("dragging",t),this.isEnabled()&&(n=w.mousePos(this.j,t,this._map),this.q=t,this.B=_.set(_.create(),n[0],n[1]),this.Y(),this.W.push([Date.now(),this.B]),this.W.length<2||("active"===this.R&&(this.R="pending"),"disabled"!==this.R&&(i=(n=(t=this._map.getView()).getStatus()).rotation,n=n.pitch,s=[this.B[0]-this.W[this.W.length-2][1][0],this.B[1]-this.W[this.W.length-2][1][1]],(!this._map.getStatus().pitchEnable||Math.abs(s[0])>Math.abs(s[1]))&&(s[1]=0),(!this._map.getStatus().rotateEnable||Math.abs(s[0])this.j.clientHeight/2?i-=s[0]/10:i+=s[0]/10),n-=s[1]/this._map.getZooms()[1]*2,t.setOptions({rotation:i,pitch:n}))))},ht.prototype.tt=function(t){switch(this.R){case"active":this.R="enabled",this.C();break;case"pending":this.R="enabled",this.G("dragend",t);break;default:this.G("dragend",t)}this.S()},ht.prototype.S=function(){this.j.removeEventListener("mousemove",this.T),this.j.removeEventListener("mouseup",this.I),this.j.removeEventListener("mouseleave",this.I)},ht.prototype.C=function(){delete this.q,delete this.$,delete this.U,delete this.B},ht.prototype.Y=function(){for(var t=this.W,i=Date.now();0this.Bo&&this.MN()),this},e.prototype.shift=function(){var t=this.Wo;if(t)return this.Wo[h]?(this.Wo=this.Wo[h],this.Wo[o]=void 0):(this.Wo=void 0,this.Zo=void 0),t[h]=t[o]=void 0,t.value.destroy(),this.qo.delete(t.key),--this.size,[t.key,t.value]},e.prototype.find=function(t){return(t=this.qo.get(t))?t.value:void 0},e.prototype.has=function(t){return this.qo.has(t)},e.prototype.delete=function(t){if(t=this.qo.get(t))return this.qo.delete(t.key),t[h]&&t[o]?(t[o][h]=t[h],t[h][o]=t[o]):t[h]?(t[h][o]=void 0,this.Wo=t[h]):t[o]?(t[o][h]=void 0,this.Zo=t[o]):this.Wo=this.Zo=void 0,this.size--,t.value},e.prototype.clear=function(){this.Wo=this.Zo=void 0,this.size=0,this.qo.clear()},e.prototype.AN=function(t){return"loaded"!==t.value.status||(t=t.value.stamp)&&this.wN&&t===this.wN},e.prototype.QF=function(t){this.wN=t},e.prototype.MN=function(){if(this.Wo&&this.Zo)for(var t=this.Wo,i=this.Zo.key;t&&i&&t.key!==i;){if(this.AN(t))this.Go(t);else if(this.shift(),this.size<=this.Bo)return;t=this.Wo}},e);function e(t,i){this.entries=i,"number"!=typeof(this.Bo=t)&&(i=t,t=0),this.size=0,this.Bo=t,this.Wo=this.Zo=void 0,this.qo=new("undefined"!=typeof Map?Map:lt),i&&(this.assign(i),t<1)&&(this.Bo=this.size)}var vt=function(t,i){this.key=t,this.value=i,this[h]=void 0,this[o]=void 0},pt=(mt.prototype.next=function(){var t=this.Yo;return t?(this.Yo=t[h],{done:!1,value:t.key}):{done:!0,value:void 0}},mt);function mt(t){this.Vo=t}bt.prototype.next=function(){var t=this.Yo;return t?(this.Yo=t[h],{done:!1,value:t.value}):{done:!0,value:void 0}};var yt=bt;function bt(t){this.Vo=t}gt=s,_.Ei(kt,gt),kt.prototype.shift=function(){var t=this.Wo;if(t)return this.Wo[h]?(this.Wo=this.Wo[h],this.Wo[o]=void 0):(this.Wo=void 0,this.Zo=void 0),t[h]=t[o]=void 0,this.qo.delete(t.key),this.emit("delete",{key:t.key}),--this.size,[t.key,t.value]},kt.prototype.on=function(t,i,n,s){void 0===n&&(n=this),void 0===s&&(s=!1);for(var e=0,r=Array.isArray(t)?t:[t];e=_.Ra?(u=_.lcs.getSize(),l=f.localCoord.x-p.x,d=f.localCoord.y-p.y,0!=l&&(l*=u[0],v[0]=l),0!=d&&(d*=u[1],v[1]=d),i.optimalZoom>=_.Ra&&_.za>=f.zo.z&&(v[0]=-p.center[0],v[1]=-p.center[1])):i.optimalZoom<_.Ra&&_.za=u)&&(p=Math.floor(c.x/u),v[0]+=20037508.342789244*p*2),l=d.tag,f.Ro=d.Ro,f.ID(d),f.Sa=v,f.status=d.status,f.tag=l)),f&&(f.stamp=o,f.Sa=v,r.push(f))}var m=i.optimalZoom,t=_.every(e,function(s){return _.some(r,function(t){var i=t.zo.key,n=t.zo.z,n=_.Util.VF(n,m),t=t.tag,t=_.Util.LD(t,n);return i===s.key&&t})}),y=this.map.getOutseaState(),b=this.map.getOutseaDataType(),e=(y&&!b&&(t=!(b=_.filter(e,function(t){return!(t=n.NE.getTile(t))||!t.boundsStatus||!1!==t.boundsStatus.isInNebulaOversea})).length||_.every(b,function(s){return _.some(r,function(t){var i=t.zo.key,n=t.zo.z,n=_.Util.VF(n,m),t=t.tag,t=_.Util.LD(t,n);return i===s.key&&t})})),this.jE(r)),b=(t&&(this.a_=!0,this.map.bZ.dynamic.set("firstAllLoaded",!0)),e&&this.map.bZ.dynamic.set("firstLabelDataAllLoaded",!0),{s_:this.a_,fo:!!t&&e,yZ:e,tiles:r,Ca:h,outseaData:void 0});return 0!==r.length&&!t||this.Fo(!0),y&&r.length&&(e=this.map.bZ.MZ.wZ.gZ(),b.outseaData=e),b.tiles=this.UE(r,s),b},r.prototype.pe=function(t){return t=new _.ca(t[0],t[1],t[2]),this.ua.getTile(t)},r.prototype.ZE=function(t){return!1},r.prototype.OE=function(t){for(var i=t.length,n=[],s=[],e=[],r=0;r>w,p=k.y>>w;g[k=(m=new _.ca(a,v,p)).key]||(w=new _.ca(a,this.fa(v,a),p),y=new _.ca(a,v,p),M=this.ua.getTile(w,!0),g[k]=!0,(M&&M.status===_.TileState.LOADED?c:u).push(y))}c.length&&i.push.apply(i,c),n=u}return i},r.prototype.Da=function(t){var e,r,h;t.length&&(e=this.Pa.z,r=(this.Pa.ja+this.Pa.Oa)/2,h=(this.Pa.Fa+this.Pa.Ea)/2,t.sort(function(t,i){var n=(t.x<t[2]&&(t[2]=i[2]),i[1]t[3]&&(t[3]=i[3])},a.prototype.extendCoordinate=function(t,i){+i[0]t[2]&&(t[2]=i[0]),+i[1]t[3]&&(t[3]=i[1])},a.prototype.hs=function(t){return[t[0],t[1]]},a.prototype.ls=function(t){return[t[2],t[1]]},a.prototype.getCenter=function(t){return[(t[0]+t[2])/2,(t[1]+t[3])/2]},a.prototype.us=function(t,i,n,s,e){for(var r,h,o=i*s[0]/2,i=i*s[1]/2,a=Math.cos(n),u=Math.sin(n),c=[-o,-o,o,o],f=[-i,i,-i,i],l=0;l<4;l+=1)r=c[l],h=f[l],c[l]=t[0]+r*a-h*u,f[l]=t[1]+r*u+h*a;return this.ns(c,f,e)},a.prototype.getHeight=function(t){return t[3]-t[1]},a.prototype.getSize=function(t){return[t[2]-t[0],t[3]-t[1]]},a.prototype.cs=function(t){return[t[0],t[3]]},a.prototype.fs=function(t){return[t[2],t[3]]},a.prototype.getWidth=function(t){return t[2]-t[0]},a.prototype.intersects=function(t,i){return t[0]<=i[2]&&t[2]>=i[0]&&t[1]<=i[3]&&t[3]>=i[1]},a.prototype.isEmpty=function(t){return t[2]=i)&&t.kT>=s.kT&&t.KL<=n&&t.kT<=e.kT},u.prototype.intersects=function(t){var i=this.southWest,n=this.northEast,s=t.southWest,e=(t=t.northEast).kT>=i.kT&&s.kT<=n.kT,t=t.KL>=i.KL&&s.KL<=n.KL;return e&&t},u.prototype.getCenter=function(){var t=this.southWest.KL>this.northEast.KL?(this.southWest.KL+this.northEast.KL+360)/2%360:(this.southWest.KL+this.northEast.KL)/2,i=(this.southWest.kT+this.northEast.kT)/2;return new _.LngLat(t,i)},u.prototype.extend=function(t){return this.southWest.setLng(Math.min(this.southWest.KL,t.KL)),this.southWest.setLat(Math.min(this.southWest.kT,t.kT)),this.northEast.setLng(Math.max(this.northEast.KL,t.KL)),this.northEast.setLat(Math.max(this.northEast.kT,t.kT)),this},u.prototype.union=function(t){return this.extend(t.southWest).extend(t.northEast)},u.prototype.toString=function(){return this.southWest.toString()+";"+this.northEast.toString()},u.prototype.toJSON=function(){return[this.southWest.lng,this.southWest.lat,this.northEast.lng,this.northEast.lat]},u.prototype.getWidth=function(){return Math.abs(this.northEast.lng-this.southWest.lng)},u.prototype.getHeight=function(){return Math.abs(this.southWest.lat-this.northEast.lat)},u.prototype.clone=function(){return u.from([this])},u.prototype.check=function(){return!!(this.northEast&&this.southWest&&this.northEast.lat&&this.southWest.lat)},u);function u(){this.className="AMap.Bounds";var i,n,s,e,r,h="undefined"!=typeof Float64Array;if(1===arguments.length&&(arguments[0]instanceof Array||h&&arguments[0]instanceof Float64Array))e=new _.LngLat(arguments[0][0],arguments[0][1],!0),r=new _.LngLat(arguments[0][2],arguments[0][3],!0);else if(2===arguments.length)e=_.parseLngLatData(arguments[0]),r=_.parseLngLatData(arguments[1]);else if(4===arguments.length)e=new _.LngLat(arguments[0],arguments[1]),r=new _.LngLat(arguments[2],arguments[3]);else{if(0!==arguments.length)throw Error("Invalid Object: Bounds("+arguments+")");e=new _.LngLat(-180,-90),r=new _.LngLat(180,90)}(e.KL>r.KL||e.kT>r.kT)&&(h=Math.max(e.KL,r.KL),i=Math.min(e.KL,r.KL),n=Math.max(e.kT,r.kT),s=Math.min(e.kT,r.kT),e=new _.LngLat(i,s),r=new _.LngLat(h,n)),this.southWest=e,this.northEast=r}jt=ct,_.Ei(Wt,jt),Wt.prototype.loadData=function(t,i,n){return this.ze=i,!(this.Oo&&!this.io||!this.map.isDOMMode()&&!i||(t=this.c0(t,i,n),this.io?t(this.io,"canvas"):((i=new Image).crossOrigin="",i.onload=t,i.src=this.gs.getImageUrl(),this.Rs=i),0))},Wt.prototype.reLoadImgage=function(t){var s=this;t&&this.Rs&&((t=new Image).crossOrigin="",t.onload=function(t,i){var n;"image"===(i=void 0===i?"image":i)?n=t.target:"canvas"===i&&(n=t),s._s&&s._s.update(n),s.Fo(!0)},t.src=this.gs.getImageUrl(),this.Rs=t)},Wt.prototype.c0=function(t,s,e){var r=this;return function(t,i){var n;void 0===i&&(i="image"),s&&(n=void 0,"image"===i?n=t.target:"canvas"===i&&(n=t),r._s?r._s.update(n):(r._s=s.createTexture(n,{Zi:!0}),r._s.bind(s.gl.CLAMP_TO_EDGE,s.gl.LINEAR,s.gl.LINEAR)),r.Fo(!0)),e()}},Wt.prototype.getData=function(t){if(this.Oo&&this._s){(i=this.gs.getBounds())instanceof l&&(i=i.toJSON());var n=_.lcs.getLocalByCoord([t.centerCoord[0],t.centerCoord[1]]),e=(s=_.ProjectionManager.getProjection(t.projectionId)).project(i[0],i[1]),s=s.project(i[2],i[3]),r=[0,0,0,0];if(t.optimalZoom>=_.Ra){for(var i=_.lcs.getLocalByCoord([e[0],e[1]]),t=_.lcs.getLocalByCoord([s[0],s[1]]),h=_.lcs.getSize(),r=[i.x-n.x,i.y-n.y,t.x-n.x,t.y-n.y],o=0;o=_.Ra&&(b.Ro[0]-=l.center[0],b.Ro[1]-=l.center[1],b.Ro[2]-=l.center[0],b.Ro[3]-=l.center[1]),this.ze?b.data={Hs:l,texture:o.data.texture,Js:o.data.Js,zs:this.ze.fe(new Float32Array([b.Ro[0],b.Ro[1],0,1,b.Ro[2],b.Ro[1],1,1,b.Ro[0],b.Ro[3],0,0,b.Ro[2],b.Ro[1],1,1,b.Ro[2],b.Ro[3],1,0,b.Ro[0],b.Ro[3],0,0]),16)}:(b.data=o.data,b.data.Hs=l),b.data)&&(b.status=_.TileState.LOADED)),b.data&&(t.optimalZoom>=_.Ra&&b.data.Hs?(d=_.lcs.getSize(),a=b.data.Hs.x-y.x,c=b.data.Hs.y-y.y,0!=a&&(a*=d[0],m[0]=a),0!=c&&(c*=d[1],m[1]=c),t.optimalZoom>=_.Ra&&_.za>=b.zo.z&&(m[0]=-y.center[0],m[1]=-y.center[1])):t.optimalZoom<_.Ra&&_.zathis.Qs[1]&&(i=this.Qs[1],n=s.getResolution(i)),this.Xa),e=20037508.342789244,r=t[0]+e,h=-(t[3]-e),o=t[2]+e,r=r/n,h=h/n,t=-(t[1]-e)/n;return{Oa:Math.floor(o/n/s),Ea:Math.min((1<this.Qs[1]&&(s=this.Qs[1]),h.getResolution(s),[]),a=[],u=!0,c=r,f=c.ja;f<=c.Oa;f+=1)for(var l=c.Fa;l<=c.Ea;l+=1){var d=new _.ca(s,this.fa(f,s),l),v=this.ua.getTile(d),p=(this.PF(d,t.projectionId),new _.ca(s,f,l));(v?v.status===_.TileState.LOADED||v.status===_.TileState.ERROR?a:(u=!1,n):(u=!1,o.push(d),n)).push(p)}return a.length&&i.push(a),this.Pa=r,this.Fo(u),o},Yt.prototype.da=function(t,i,n,s){if(t=t.optimalZoom,this.Za="overlay"!==this.layer.type,this.qa="overlay"!==this.layer.type,this.Za)for(var e=Math.min(this.xt[1],t+2),r=t+1;n.length&&r<=e;r+=1){for(var h=[],o=[],a=r,u=n.length-1;0<=u;--u)for(var c=n[u],f=c.x<<1,l=c.y<<1,d=1;0<=d;--d)for(var v=1;0<=v;--v){var p=new _.ca(a,this.fa(f+d,a),l+v),m=this.ua.getTile(p),y=new _.ca(a,f+d,l+v);(m&&m.status===_.TileState.LOADED?o:h).push(y)}o.length&&i.push(o),n=h}if(this.qa)for(var b=this.xt[0],r=t-1;n.length&&b<=r;--r){for(var o=[],h=[],g={},u=n.length-1;0<=u;--u){var M=n[u],a=r,k=M.z-a,d=M.x>>k,v=M.y>>k;g[M=(p=new _.ca(a,this.fa(d,a),v)).key]||(m=this.ua.getTile(p),g[M]=!0,(m&&m.status===_.TileState.LOADED?o:h).push(new _.ca(a,d,v)))}o.length&&i.push(o),n=h}return i},Yt.prototype.ma=function(){var t,i=new RegExp(/\{(\w|\,)+\}/g);return i.test(this._tileUrl)?(t=this._tileUrl.match(i)[0].replace(/[\{|\}]/g,"").split(","),this.tr++,t&&this.tr>=t.length&&(this.tr=0),this._tileUrl.replace(i,t[this.tr])):this._tileUrl},Yt.prototype.Ys=function(l,d,v,p){var m;if(!(this.aa.optimalZoomthis.xt[1])){this.Da(l);for(var y=this,i=0,n=l.length;i_.za&&(h.Ro[0]-=i.center[0],h.Ro[1]-=i.center[1],h.Ro[2]-=i.center[0],h.Ro[3]-=i.center[1]),n=d.fe(new Float32Array([h.Ro[0],h.Ro[1],0,1,h.Ro[2],h.Ro[1],1,1,h.Ro[0],h.Ro[3],0,0,h.Ro[2],h.Ro[1],1,1,h.Ro[2],h.Ro[3],1,0,h.Ro[0],h.Ro[3],0,0]),16),(e=(s=document.createElement("canvas")).getContext("2d"))&&(r=this.Xa,s.height=s.width=r,s.style.height=s.style.width=r+"px",e.beginPath(),e.moveTo(0,0),e.lineTo(r,0),e.lineTo(r,r),e.lineTo(0,r),e.lineTo(0,0),e.lineWidth=1,e.font="20px Verdana",e.fillStyle="#ff0000",e.strokeStyle="#FF0000",e.strokeRect(0,0,r,r),e.fillText("z: "+h.zo.z,10,30),e.fillText("x: "+h.zo.x,10,60),e.fillText("y: "+h.zo.y,10,90),e.stroke()),(r=d.createTexture(s,{Zi:!0})).bind(d.gl.MIRRORED_REPEAT,d.gl.LINEAR,d.gl.LINEAR_MIPMAP_NEAREST),h.data={texture:t,zs:n,Js:r,Hs:i}),h.status=_.TileState.LOADED,p()}r=u[0],o=c[0],a=c[1],e=u[1],h.Ro=[r,a,o,e],h.status=_.TileState.LOADING,"AMap.TileLayer.Flexible"===y.layer.CLASS_NAME||"AMap.TileLayer.WMTS"===y.layer.CLASS_NAME||"AMap.TileLayer.WMS"===y.layer.CLASS_NAME?n.createTile(t.x,t.y,t.z,function(t){d?f.call(this,t):(h.data=t,h.status=_.TileState.LOADED)}.bind(y),function(){h.status=_.TileState.ERROR,p()}):(c=new Image,"w"===(null==(m=y.map)?void 0:m.baseRender)&&(c.crossOrigin="anonymous"),c.onload=f.bind(y),"d"===(null==(m=y.map)?void 0:m.baseRender)&&0i[2]&&s>i[3])},Yt.prototype.TB=function(){var t=!1;return this.layer.getState().detectRetina&&(t=!0),!("d"!==_.Support.baseRender||!_.Support.Ue||!_.Support.$e)||t};var _t,Ut=Yt;function Yt(t,i,n,s){return(i=_t.call(this,t,i,n,s)||this).ua=new xt(_.Support.$e?200:400),i.Xa=256,i.sa=[],i.Zs=[],i.tr=-1,i.qa=!0,i.Za=!0,i.xt=t.zooms,i.Qs=t.dataZooms,i.Xa=t.tileSize,i._tileUrl=t.tileUrl,i}Zt=ct,_.Ei(Jt,Zt),Jt.prototype.loadData=function(t,i,n){return this.ze=i,this.Oo||(this.Fo(!0),n()),!0},Jt.prototype.getData=function(t){if(this.ir=t.bounds,this.Oo){var i=_.lcs.getLocalByCoord([t.centerCoord[0],t.centerCoord[1]]),s=(n=_.ProjectionManager.getProjection(t.projectionId)).project(this.ir[0],this.ir[1]),n=n.project(this.ir[2],this.ir[3]),e=[0,0,0,0];if(t.optimalZoom>=_.Ra){for(var t=_.lcs.getLocalByCoord([s[0],s[1]]),s=_.lcs.getLocalByCoord([n[0],n[1]]),r=_.lcs.getSize(),e=[t.x-i.x,t.y-i.y,s.x-i.x,s.y-i.y],h=0;h=_.Ra&&f.data.Hs?(u=_.lcs.getSize(),c=f.data.Hs.x-d.x,a=f.data.Hs.y-d.y,0!=c&&(c*=u[0],l[0]=c),0!=a&&(a*=u[1],l[1]=a),n>=_.Ra&&_.za>=f.zo.z&&(l[0]=-d.center[0],l[1]=-d.center[1])):n<_.Ra&&_.za>k,v=M.y>>k;g[M=(p=new _.ca(a,this.fa(d,a),v)).key]||(m=this.ua.getTile(p),g[M]=!0,(m&&m.status===_.TileState.LOADED?o:h).push(new _.ca(a,d,v)))}o.length&&i.push.apply(i,o),n=h}return i},c.prototype.fa=function(t,i){for(var n=1<<(i=i||this.aa.optimalZoom);t<0||n<=t;)t=n<=t?t-n:t<0?n+t:t;return t},c.prototype.vX=function(t,i){var n=[-180,-90],s=[180,90],r=(e=_.ProjectionManager.getProjection("EPSG:3857")).project(256*t+n[0],s[1]-256*i),e=e.project(256*(t+1)+n[0],s[1]-256*(i+1));return[r[0],r[1],e[0],e[1]]},c.prototype.jE=function(t){for(var i=!!t.length,n=0,s=t;n=_.Ra&&l.data.Hs?(c=_.lcs.getSize(),f=l.data.Hs.x-v.x,u=l.data.Hs.y-v.y,0!=f&&(f*=c[0],d[0]=f),0!=u&&(u*=c[1],d[1]=u),d[0]=-v.center[0],d[1]=-v.center[1]):(d[0]=v.center[0],d[1]=v.center[1])),l&&(l.Sa=d,l.stamp=o,h.push(l))}return s=!(n=_.filter(s,function(t){return!(!(t=i.NE.getTile(t))||!t.boundsStatus||!1!==t.boundsStatus.isInNebulaOversea)})).length||_.every(n,function(i){return _.some(h,function(t){return t.zo.key===i.key})}),n=this.jE(h),s&&(this.a_=!0,this.map.bZ.dynamic.set("firstAllLoaded",!0)),this.a_&&this.map.bZ.dynamic.set("firstLabelDataAllLoaded",!0),s&&this.Fo(!0),{s_:this.a_,fo:!!s,yZ:n,tiles:h}},mi.prototype.Ia=function(){this.map.on("tileSdfInfoFinished",this.Aa.bind(this))},mi.prototype.ha=function(t,i,n,s){for(var e=this.layer.getSourceConfig().dataZooms,e=(i=Math.max(Math.min(i,e[1]),e[0])-1,n=_.ProjectionManager.getProjection(s.projectionId).getResolution(i),this.Xa),s=20037508.342789244,r=t[0]+s,h=-(t[3]-s),o=t[2]+s,r=r/n,h=h/n,t=-(t[1]-s)/n,a=Math.floor(o/n/e),u=Math.min((1<this.xt[1])){this.Da(o);var i=this.map.mapStyle.vn.MS("traffic");i&&i.multiFillColors&&((i=i.multiFillColors).congested&&i.congested,i.slow&&i.slow,i.smooth&&i.smooth,i.seriousCongested&&i.seriousCongested,i.unknown)&&i.unknown;for(var S=this.layer.getOptions().rZ,a=this,n=0,s=o.length;n_.za;A&&(k.Ro[0]-=x.center[0],k.Ro[1]-=x.center[1],k.Ro[2]-=x.center[0],k.Ro[3]-=x.center[1]),k.request=yi.Ajax(i,{},function(t,i){k.data={};try{i=JSON.parse(i.data)}catch(t){return k.status=_.TileState.LOADED,void C()}if(i=i.data[M.join("_")],"complete"===t&&i){for(var n=new bi,s=new _.J_,e=0,r=i.length;e=_.Ra?(f=_.lcs.getSize(),v=d.localCoord.x-u.x,p=d.localCoord.y-u.y,0!=v&&(v*=f[0],m[0]=v),0!=p&&(p*=f[1],m[1]=p),i.optimalZoom>=_.Ra&&_.za>=d.zo.z&&(m[0]=-u.center[0],m[1]=-u.center[1])):i.optimalZoom<_.Ra&&_.za=f)&&(v=Math.floor(l.x/f),m[0]+=20037508.342789244*v*2),p=y.gB,d.Ro=y.Ro,d.ID(y),d.Sa=m,d.status=y.status,d.tag=p,d.gB=p)),d&&(d.stamp=o,d.Sa=m,r.push(d))}var b=i.optimalZoom,t=_.every(e,function(s){return _.some(r,function(t){var i=t.zo.key,n=t.zo.z,n=_.Util.VF(n,b),t=t.gB,t=_.Util.LD(t,n);return i===s.key&&t})}),g=this.map.getOutseaState(),M=this.map.getOutseaDataType(),e=(g&&!M&&(t=!(M=_.filter(e,function(t){return!(t=n.NE.getTile(t))||!t.boundsStatus||!1!==t.boundsStatus.isInNebulaOversea})).length||_.every(M,function(s){return _.some(r,function(t){var i=t.zo.key,n=t.zo.z,n=_.Util.VF(n,b),t=t.gB,t=_.Util.LD(t,n);return i===s.key&&t})})),r&&0<=r.length&&this.Fo(!0),this.jE(r)),M=(t&&(this.a_=!0,this.map.bZ.dynamic.set("firstAllLoaded",!0)),e&&this.map.bZ.dynamic.set("firstLabelDataAllLoaded",!0),t&&e&&this.Fo(!0),{s_:this.a_,fo:!!t&&e,yZ:e,tiles:r,Ca:h,outseaData:void 0});return g&&r.length&&(t=this.map.bZ.MZ.wZ.gZ(),M.outseaData=t),M.tiles=this.UE(r,s),M},f.prototype.pe=function(t){return t=new _.ca(t[0],t[1],t[2]),this.ua.getTile(t)},f.prototype.ZE=function(t){return!1},f.prototype.OE=function(t){for(var i=t.length,n=[],s=[],e=[],r=0;r>w,p=k.y>>w;g[k=(m=new _.ca(a,v,p)).key]||(w=new _.ca(a,this.fa(v,a),p),y=new _.ca(a,v,p),M=this.ua.getTile(w,!0),g[k]=!0,(M&&M.status===_.TileState.LOADED?c:u).push(y))}c.length&&i.push.apply(i,c),n=u}return i},f.prototype.Da=function(t){var e,r,h;t.length&&(e=this.Pa.z,r=(this.Pa.ja+this.Pa.Oa)/2,h=(this.Pa.Fa+this.Pa.Ea)/2,t.sort(function(t,i){var n=(t.x<this.xt[1])){this.Da(a);for(var d=this,i=0,n=a.length;i_.za&&(h.Ro[0]-=t.center[0],h.Ro[1]-=t.center[1],h.Ro[2]-=t.center[0],h.Ro[3]-=t.center[1]),i=u.fe(new Float32Array([h.Ro[0],h.Ro[1],0,1,h.Ro[2],h.Ro[1],1,1,h.Ro[0],h.Ro[3],0,0,h.Ro[2],h.Ro[1],1,1,h.Ro[2],h.Ro[3],1,0,h.Ro[0],h.Ro[3],0,0]),16),!l.Rs){var n=document.createElement("canvas"),s=n.getContext("2d");if(s){n.height=n.width=256,n.style.height=n.style.width="256px",s.font="14px Verdana",s.fillStyle="rgba(76,83,98,0.15)",s.rotate(-15*Math.PI/180);for(var e="暂未获得高德开放平台商用授权",r=0;r=this.map.getZooms()[0]&&(this.bt=r,this.du=n.getResolution(this.bt),r=(t=this.mu).Rt,t=t.zt,(s=this.lu(n))[0]=s[0]-t[0]+r[0],s[1]=s[1]-t[1]+r[1],e=n.unproject(s[0],s[1]),this.hu=e,_.Pl(this.uu,s[0],s[1],0),this.vu(),this.cu.setPosition(this.fu()),this.mu=void 0)}!this.h_()&&i&&this.map.setNeedUpdate(!0)},p.prototype.getOptions=function(){return{zoom:this.bt,center:this.hu,rotation:this.nu,projectionId:this.su,pitch:0}},p.prototype.getStatus=function(){var t=_.Zl(),i=_.Zl(),n=_.Zl(),s=(this.xu(t,i,n),_.Util.getOptimalZoom(this.bt));return{pitch:this.Pu,size:this._size,rotation:this.nu,zoom:this.bt,optimalZoom:s,resolution:this.du,optimalResolution:_.ProjectionManager.getProjection(this.su).getResolution(s),center:this.hu,bounds:t,boundsCoord:i,transformedBoundsCoord:n,centerCoord:this.uu,projectionId:this.su,mvpMatrix:this.cu.Vl(),viewMode:this.type,skyHeight:this.EF(),fov:60}},p.prototype.bu=function(t){this.hu=[t[0],t[1]],t=_.ProjectionManager.getProjection(this.su).project(this.hu[0],this.hu[1]),_.Pl(this.uu,t[0],t[1],0)},p.prototype.containerTolnglat=function(t,i,n){var s,r=(e=this.getStatus()).centerCoord,e=e.rotation,r=_.V[this.su].transform(r[0],r[1],n),h=(r=0!==e?(n=e/180*Math.PI,e=t-this._size[0]/2,s=-(i-this._size[1]/2),h=Math.sqrt(e*e+s*s),e=Math.atan(e/s)-n,s<0&&(e+=Math.PI),n=h*Math.sin(e),s=h*Math.cos(e),[r[0]+n*this.du,r[1]-s*this.du]):[r[0]+(t-this._size[0]/2)*this.du,r[1]+(i-this._size[1]/2)*this.du],r=_.V[this.su].Xs(r[0],r[1]),_.ProjectionManager.getProjection(this.su).unproject(r[0],r[1]));return h[0]=180=_.Ra||_.Util.getOptimalZoom(t.zoom)>=_.Ra&&_.Util.getOptimalZoom(n)<_.Ra)&&(s=this.fu(),this.cu.Fu(s[0],s[1],0),this.cu.Ou(),this.vu()),this.cu.Fu(e[0],e[1],0),this.cu.Ou(),this.vu()),void 0!==t.pitch&&"w"===_.Support.baseRender&&(t.pitch>this.$u()||this.Pu>this.$u()?t.pitch=this.$u():(t.pitch<0||this.Pu<0)&&(t.pitch=0),this.Pu=Math.min(t.pitch,this.$u()),this.cu.setPitch(t.pitch)),t.center&&(this.hu=t.center,r=this.lu(i),_.Pl(this.uu,r[0],r[1],0),e=this.fu(),s=i.unproject(r[0],r[1]),this.hu=s,this.cu.Fu(e[0],e[1],0),this.cu.Ou()),t.kt){if(!this.map.getStatus().zoomEnable)return;var n=this.bt,n=(this.bt=Math.min(Math.max(t.kt.Mt,this.map.getZooms()[0]),this.map.getZooms()[1]),this.du=i.getResolution(this.bt),(_.Util.getOptimalZoom(t.kt.Mt)<_.Ra&&_.Util.getOptimalZoom(n)>=_.Ra||_.Util.getOptimalZoom(t.kt.Mt)>=_.Ra&&_.Util.getOptimalZoom(n)<_.Ra)&&(s=this.fu(),this.cu.Fu(s[0],s[1],0),this.cu.Ou()),this.lu(i)),s=t.kt.pos,i=this.X(s[0],s[1]),t=_.lcs.getLocalByCoord([n[0],n[1]]),e=(this.vu(),this.fu());this.cu.Fu(e[0],e[1],0),this.cu.Ou();var s=[(s=this.X(s[0],s[1]))[0]-i[0],s[1]-i[1]],i=[e[0]-s[0],e[1]-s[1]],r=[n[0]-s[0],n[1]-s[1]],e=_.lcs.getLocalByCoord(r);this.bt>=_.Ra&&(e.x!==t.x||t.y!==e.y)&&(n=e.x-t.x,s=e.y-t.y,i[0]-=n*_.lcs.getSize()[0],i[1]-=s*_.lcs.getSize()[1]),this.cu.Fu(i[0],i[1],0),this.cu.Ou(),this.bu(r)}this.h_()||this.map.setNeedUpdate(!0)},y.prototype.bu=function(t){var i=_.ProjectionManager.getProjection(this.su),i=(_.Pl(this.uu,t[0],t[1],0),i.unproject(t[0],t[1]));this.hu=i},y.prototype.getOptions=function(){return{size:this._size,zoom:this.bt,center:this.hu,rotation:this.nu,projectionId:this.su,pitch:this.Pu,resolution:this.du}},y.prototype.au=function(){return this.su},y.prototype.ru=function(){return _.ProjectionManager.getProjection(this.su)},y.prototype.getStatus=function(){var t=_.Zl(),i=_.Zl(),n=_.Zl(),s=(this.xu(t,i,n),_.Util.getOptimalZoom(this.bt));return{size:this._size,pitch:this.Pu,rotation:this.nu,zoom:this.bt,optimalZoom:s,resolution:this.du,optimalResolution:_.ProjectionManager.getProjection(this.su).getResolution(s),center:this.hu,bounds:t,boundsCoord:i,transformedBoundsCoord:n,centerCoord:this.uu,projectionId:this.su,mvpMatrix:this.cu.Vl(),modelMatrix:this.cu.Au(),viewMode:this.type,skyHeight:this.EF(),fov:this.cu.Tu}},y.prototype.$u=function(t){return 80},y.prototype.Uu=function(t){var t=void 0!==t?t:this.Pu,i=this.bt,t=Math.max(t/100-.4,0),i=Math.max(4*(i-22),0)/100;return this._size[1]*(t-i)-10},y.prototype.EF=function(){var t=1;return 0<(t=this.Uu())?1-t/this._size[1]*2:1},y.prototype.X=function(t,i){var n,s=this.cu.Cu(),e=this.cu.Au(),r=this._size;return t=t/r[0]*2-1,i=1-i/r[1]*2,s?(r=_.Bu(t,i,-1,1),this.Wu(r,this.tu),n=_.Zl(),_.Gu(n,r,s),r=_.Bu(t,i,1,1),this.Wu(r,this.iu),t=_.Zl(),_.Gu(t,r,s),i=_.Zl(),_.Gu(i,n,e),r=_.Zl(),_.Gu(r,t,e),s=+i[2]/(i[2]-r[2]),[i[0]-s*(i[0]-r[0]),i[1]-s*(i[1]-r[1])]):[0,0]},y.prototype.ku=function(t,i){var n=_.Util.getOptimalZoom(this.bt),s=this.uu,e=this.X(t,i);return t=e[0],i=e[1],n>=_.Ra&&(t+=(e=_.lcs.getLocalByCoord([s[0],s[1]])).center[0],i+=e.center[1]),[t,i]},y.prototype.H=function(t,i,n){void 0===n&&(n=0);var s=this.cu.Su(),e=this.cu.Lu(),t=((r=this.fG)[0]=t,r[1]=i,r[2]=n,this.uG),i=this.cG,n=(_.Gu(t,r,e),_.Gu(i,t,s),_.scale(i,i,1/i[3]),(i[0]+1)/2*this._size[0]),r=(1-i[1])/2*this._size[1];return this.lG(i),this.lG(t),[n,r]},y.prototype._u=function(t,i,n){void 0===n&&(n=0);var s=_.Util.getOptimalZoom(this.bt),e=this.uu;return s>=_.Ra&&(t-=(s=_.lcs.getLocalByCoord([e[0],e[1]])).center[0],i-=s.center[1]),this.H(t,i,n)},y.prototype.containerTolnglat=function(t,i){var t=this.X(t,i),i=0,n=0,s=(_.Util.getOptimalZoom(this.bt)>=_.Ra&&(i=(s=_.lcs.getLocalByCoord([this.uu[0],this.uu[1]]).center)[0],n=s[1]),t[0]+=i,t[1]+=n,_.ProjectionManager.getProjection(this.su).unproject(t[0],t[1]));return s[0]=180=_.Ra&&(i=_.lcs.getLocalByCoord([this.uu[0],this.uu[1]]),t[0]-=i.center[0],t[1]-=i.center[1]),this.H(t[0],t[1],n)},y.prototype.pz=function(){return this.cu},y.prototype.h_=function(){return _.Ru(this.Xl,this.cu.Vl())},y.prototype.aD=function(){return this.Xl=this.cu.Vl(),this.Xl},y.prototype.xu=function(t,i,n){var s=0,e=0,r=this.Uu(),h=(_.Util.getOptimalZoom(this.bt)>=_.Ra&&(s=(h=_.lcs.getLocalByCoord([this.uu[0],this.uu[1]]).center)[0],e=h[1]),_.ProjectionManager.getProjection(this.su)),o=this.X(0,r),a=this.X.apply(this,this._size),r=this.X(this._size[0],r),u=this.X(0,this._size[1]),c=Math.min(o[0],u[0],r[0],a[0])+s,s=Math.max(o[0],u[0],r[0],a[0])+s,f=Math.min(o[1],u[1],r[1],a[1])+e,o=Math.max(o[1],u[1],r[1],a[1])+e,u=h.unproject(c,f),r=h.unproject(s,o),a=(i[0]=c,i[1]=f,i[2]=s,i[3]=o,t[0]=u[0],t[1]=u[1],t[2]=r[0],t[3]=r[1],_.V[this.su].transform(i[0],i[3])),e=_.V[this.su].transform(i[2],i[1]);return n[0]=a[0],n[1]=a[1],n[2]=e[0],n[3]=e[1],t},y.prototype.vu=function(){var t=this._size,i=t[0]*this.du,n=t[1]*this.du,s=(this.cu.setSize([i,n]),this.cu.Eu(),this.cu.dz()),s=(this.tu=s/10,this.iu=50*s,56-this.bt);this.cu.setOptions([i,n],s,t[0]/t[1],this.tu,this.iu),this.cu.Eu()},y.prototype.fu=function(){var t;return _.Util.getOptimalZoom(this.bt)<_.Ra?[this.uu[0],this.uu[1]]:[(t=_.lcs.getDeltaCoord([this.uu[0],this.uu[1]]))[0],t[1]]},y.prototype.lu=function(t){return this.hu[0]=180=this.mG.length?_.vY.finish:_.vY.pause},eb:!1,nb:!0});var Xn=Jn;function Jn(t,i){this.lang=t,this.mG=i,this.type="LangSDFTask",this.offset=0,this.result=[]}var Hn={Fdt:["vdata.amap.com","pre-lbs-jsapi-vdata.amap.com"],Gdt:function(i){return Hn.Fdt.some(function(t){return-1 KEY异常。")))},e.onerror=function(t){s("error")},e.open("GET",n,!0),e.responseType="arraybuffer",e.send(),{cancel:function(){e.abort()}}},g.prototype.jD=function(){var t=this.GD%this.ND;return this.GD=1+t,this.ED[t]},g.prototype.updateDataVersion=function(t,i){this.emit("updateDataVersion",{version:i})},g.prototype.tv=function(){var t=this;this._map.on("movestart",function(){t.iv=!0,t.ev()}),this._map.on("moveend",function(){t.iv=!1,t.ev()}),this._map.on("dragstart",function(){t._dragging=!0,t.ev()}),this._map.on("dragend",function(){t._dragging=!1,t.ev()}),this._map.on("zoomstart",function(){t.lt=!0,t.ev()}),this._map.on("zoomend",function(){t.lt=!1,t.ev()})},g.prototype.ev=function(){var i=!1;(this._dragging||this.lt||this.iv)&&(i=!0),this.nv!==i&&(this.Uh.send("setMainThreadBusy",i),_.forEach(this.ED,function(t){t.send("setMainThreadBusy",i)})),this.nv=i},g.prototype.WD=function(){for(var t=0;t=this.mG.length?_.vY.finish:_.vY.pause},eb:!1,nb:!0});var Es=Ps;function Ps(t,i){this.bY=t,this.mG=i,this.type="SDFCombineTask",this.offset=0,this.result=[]}Bs.prototype.dynamicTextSDFInfoLoaded=function(t){var i=this.map.R_;i&&"SDFManagerBase"!==i.CLASS_NAME&&(i.Ju(t.data),this.Eo())},Bs.prototype.iconImageLoaded=function(t){for(var i=this,t=t.data,e=[],n=0,s=t;nf?Math.floor(f):Math.ceil(f))-f)&&(this.bo=d,e=_.V[this._view.au()],r=200*Math.abs(v)+100,h=new H(0,.6,.15,1),u=o=0,a=function(){o+=16;var t=c._view.getStatus().zoom,i=f+v*h.h(o/r),t=(re[1]),e=n.visible,r=(void 0!==r&&(n.visible=r),r&&(n.visible=!s),this.ZF(i));n.visible&&(n.visible=!r);var r=(s=this._opts).zIndex,h=void 0===(h=s.anchor)?ge.Nm:h,o=void 0===(o=s.offset)?[0,0]:o,a=s.rotate,u=s.scale,c=s.noSelect,f=[0,0];return"number"==typeof(s=s.orientation)?n.rotate=this.dP(s):void 0!==a&&(n.rotate=a),e!==n.visible&&this._map&&(this._map.render(),this._parent)?!(this._parent.aZ=!0):(t?i&&(n.left=i[0]+"px",n.top=i[1]+"px",f=n.translate):(this._getContentSize(),(s=this._getStyleZIndex(r))&&(n.zIndex=s),void 0!==u&&(n.scale=u),i&&(n.left=i[0]+"px",n.top=i[1]+"px"),(h||o)&&(f=this._getOffset(h,o),n.translate=f,n.transformOrigin=-f[0]+"px "+-f[1]+"px"),n.pointerEvents=!0===c?"none":"auto"),a="translate("+f[0]+"px, "+f[1]+"px) scale("+n.scale+") rotate("+n.rotate+"deg)",_.Support.ie&&(n.msTransform=a),n.transform=a,!0)},A.prototype._getStyleZIndex=function(t){return t},A.prototype._getSize=function(){var i=(t=(t=this._opts.size||[])instanceof _.Size?t.toArray():t)[0],t=void 0===(t=t[1])?0:t,s=(n=this._size)[0],n=n[1];return[(void 0===i?0:i)||(void 0===s?0:s),t||(void 0===n?0:n)]},A.prototype._getContentSize=function(){var t=this._style,i=this._getSize(),n=0,s=0;i[0]&&i[1]?(n=i[0],s=i[1]):this.dom&&(i=this.dom,n=Math.ceil(i.offsetWidth)||0,s=Math.ceil(i.offsetHeight)||0,this._size=[n,s]),t.width=n+"px",t.height=s+"px",t.size=[n,s]},A.prototype._applyStyle=function(t){void 0===t&&(t=!1);var i,n,s=this._style,e=this.dom;for(i in s)s.hasOwnProperty(i)&&("visible"===i?(n=s[i]?"block":"none",e.style.display=n):t?"top"!==i&&"left"!==i&&"transform"!==i&&"msTransform"!==i||(e.style[i]=s[i]):"width"===i||"height"===i?"0px"!==s[i]&&(n=this._opts.size)&&"AMap.InfoWindow"!==this.type&&("width"===i&&(e.style[i]=n[0]+"px"),"height"===i)&&(e.style[i]=n[1]+"px"):"translate"!==i&&"scale"!==i&&"rotate"!==i&&(e.style[i]=s[i]))},A.prototype._getOffset=function(t,i){var n=(t=this._getAnchorOffset(t))[0],t=t[1];return[n+i[0],t+i[1]]},A.prototype._getAnchorOffset=function(t){var n=(i=this._style.size)[0],s=i[1],i=ge,e=0,r=0;if(Array.isArray(t))return t;switch(t){case i.Nm:e=0;break;case i.$m:e=-n/2;break;case i.Um:e=-n;break;case i.Bm:e=0,r=-s/2;break;case i.center:e=-n/2,r=-s/2;break;case i.Wm:e=-n,r=-s/2;break;case i.Gm:r=-s;break;case i.Zm:e=-n/2,r=-s;break;case i.qm:e=-n,r=-s}return[e,r]},A.prototype._createDom=function(t,i){return i&&("object"==typeof i&&i instanceof HTMLElement?t.appendChild(i):t.innerHTML=i),t.addEventListener("touchstart",function(t){t.cH="markerContent"}),t},A.prototype._removeContent=function(){this.dom.innerHTML=""},A.prototype._formatSize=function(t){return[t.getWidth(),t.getHeight()]},A.prototype.ZF=function(t){var i,n=this._map;return!!(n&&t&&"3D"===(n=n.getView()).type&&(n=n.Uu(),i=ke,t)&&t[1]-n-i[0]<=0)},A.prototype._getRotationByPoints=function(t,i){var n=i.y-t.y,s=i.x-t.x,e=0;return(0!=n||0!=s)&&(i.x-t.x!=0?(e=Math.atan((i.y-t.y)/(i.x-t.x)),0<=n&&s<0||n<0&&s<=0?e=Math.PI+e:n<0&&0<=s&&(e=2*Math.PI+e)):e=i.y>t.y?Math.PI/2:3*Math.PI/2,Math.round(180*e/Math.PI*10)/10)},A.prototype._getRotationByLngLats=function(t,i){var n=null==(n=this._map)?void 0:n.getProjection().project(t.KL,t.kT),i=(t=null==(t=this._map)?void 0:t.getProjection().project(i.KL,i.kT))[0]-n[0],t=t[1]-n[1],n=0;return(0!=i||0!=t)&&(0!=t?(n=Math.atan(i/t),0<=i&&0o.getWidth()?s=20-r[0]:o.getWidth()o.getHeight()?e=5-r[1]:o.getHeight()o&&(e=o-c[0]-s[1],h=!0),a[1]+s[2]>u&&(r=u-s[2]-c[1],h=!0),f[0]-s[3]<0&&(e=s[3],h=!0),h)&&(o=_.vector.Ip([e,r],n),a=t.containerToLngLat(o).toArray(),u=_.vector.Ip(a,i),c=t.getCenter().toArray(),f=_.vector.Ip(c,u),t.panTo(f))},S.prototype.g_=function(t){var i,n,s=ge;for(n in s)if(s.hasOwnProperty(n)){var e=s[n];if(-1!==t.indexOf(e)){i=e;break}}return i};var Fe,Ge=S;function S(t){(t=Fe.call(this,t=void 0===t?{}:t,{className:Pe.XP,anchor:je.anchor})||this).type=Pe.uy,t._opts=_.assign({},je,t._opts),t._originOpts.zIndex||(t._opts.zIndex=Pe.QP);var i=t._opts.size;return i instanceof _.Size&&(t._opts.size=t._formatSize(i)),t.jy(),t}var Ne,_e="AMap.ContextMenu",Je=(Ne=si,_.Ei(He,Ne),He.prototype.addToGroup=function(t){this.Iy&&this._overlays[this.Iy]&&this.Iy!==t.hS&&this._overlays[this.Iy].remove(),this.Iy=t.hS,Ne.prototype.addToGroup.call(this,t)},He.prototype.removeFromGroup=function(t){Ne.prototype.removeFromGroup.call(this,t),this.Iy=0},He.prototype.vi=function(t){return t=t.target,this.Iy&&t&&w.closest(t,"amap-menu")?this._overlays[this.Iy]:null},He.prototype.destroy=function(){this.Uy(),Ne.prototype.destroy.call(this)},He.prototype.By=function(){this._map.on("viewchange",this.Wy),this._map.on("click",this.Py)},He.prototype.Uy=function(){this._map.off("viewchange",this.Wy),this._map.off("click",this.Py)},He);function He(t){var n=Ne.call(this,t,{className:""})||this;return n.type=_e,n.className=_e,n.Wy=function(){var t;n.Iy&&(t=n._overlays[n.Iy])&&!t.getOptions().aliveWhenMapClick&&n.removeFromGroup(t)},n.Py=function(t){var i=n.Iy,i=n._overlays[i];w.closest(t.originEvent.target,"amap-info")||!i||i.getOptions().aliveWhenMapClick||(n.Iy=0,i.close())},n._container=n._parent,n.By(),n}Ve=Pi,_.Ei(Ke,Ve),Ke.prototype.open=function(t,i){t&&i?(this._opts.visible=!0,this.add(t),this.setPosition(i),this.emit("open")):this._map&&this._position&&(this._opts.visible=!0,this.updateOverlay(),this.emit("open"))},Ke.prototype.close=function(){this._parent&&(this._opts.visible=!1,this.uZ(),this.emit("close"))},Ke.prototype.addItem=function(t,i,n){this.Zy.push({content:t,fn:i,order:n}),this.qy(this.dom),this.updateOverlay()},Ke.prototype.removeItem=function(t,i){for(var n=this.Zy,s=0;s=_.Ra?(i=_.lcs.getLocalByCoord([t[0],t[1]]),this.Us=i.center):this.Us=[0,0]},hr.prototype.pB=function(t,i){var n=[0,0];return n[0]=t[0]-i[0],n[1]=t[1]-i[1],n};var er,rr=hr;function hr(t){this.Us=[0,0],t||console.error("需要传入 map 实例对象。new AMap.CustomCoords(map);"),this.map=t,this.mB()}var or=[116.397128,39.916527],ar=ne;_.Ei(T,ar),T.prototype.setCenter=function(t,i,n){void 0===i&&(i=!1),t instanceof _.LngLat&&(t=t.toJSON()),!i&&this.Ev?this.viewChange({lng:t[0],lat:t[1]},n):this.om({center:t})},T.prototype.getStyleByUserId=function(t,i){return this.qY(t,i)},T.prototype.getCustomTypeByContainerPos=function(t){var i,n,s,e=this.getCustomTypeByPos(t);return e&&e[0]?(i={},s=e[0][0],e={x:e[0][1],y:e[0][2],z:s},n=(t=t.lnglat).lng,t=t.lat,s=_.ZY(s,s,n,t,e),i.tileInnerCoord=s,i.tileCoord=e,i):null},T.prototype.getScreenShot=function(t,i){for(var n=this.getSize(),s=document.createElement("canvas"),e=s.getContext("2d"),r=(t=t||n.width,i=i||n.height,s.width=t,s.height=i,n.width,n.height,this.do.childNodes),h=[],o=0;othis._opts.zooms[1])},O);function O(t){void 0===t&&(t={});var n=Jh.call(this)||this,i=(n.Ix=function(t){var i;n._opts.path=_.jsonLngLatData(t),(t=yh(t))&&(n.ir=l.ms(t),i=n._map)&&("d"===i.baseRender?n.X$(t):n.cE())},t.path),i=(_.iL(i)?(s=i[0],n.Tx(s)):_.eL(i)?(s=i[0][0],n.Tx(s)):_.yL(i)&&(s=i[0][0][0],n.Tx(s)),n.className="Overlay.Polygon",n._opts={fillColor:"#00D3FC",fillOpacity:.5,strokeColor:"#00B2D5",strokeWeight:2,strokeOpacity:.9,strokeStyle:"solid",draggable:!1,extrusionHeight:0,wallColor:"#00D3FC",roofColor:"#00B2D5",bubble:!1,strokeDasharray:[10,5],zIndex:50,extData:{},noSelect:!1,innerOverlay:!1,zooms:_.zoomRange,async:!1},n._opts=n.nY(t),n._checkMap(),n.Ndt=Vh,(new Date).getTime()),s=0;return"performance"in window&&"function"==typeof performance.now&&(s=performance.now()),n.Ndt.constructor={time:i,highResTime:s},n}function Qh(){var n=null!==Kh&&Kh.apply(this,arguments)||this;return n.contains=function(t){var i;return!(!n.aE||n.ir&&!n.ir.contains(t))&&(i=n.aE,t=_.parseLngLatData(t),(_.ys(i)?bh:_.Ox(i)?gh:Mh)([t.lng,t.lat],i))},n}Kh=Ti,_.Ei(Qh,Kh),Qh.prototype.getOptions=function(){return _.extend({},this._opts)},Qh.prototype.getArea=function(){var t=this.aE;return t?+Sh(t).toFixed(2):0},$h=Oi=Qh,_.Ei(io,$h),io.prototype.init=function(t){t=t||this._opts,this._opts=this.nY(t),this.setBounds(t.bounds)},io.prototype.setBounds=function(t){t&&(_.xs(t)||(t=new l(t)),this._opts.bounds=t,this.ir=t.clone(),this.cE(),this.to())},io.prototype.ZB=function(t){var i,n,s;this._map&&(this._needUpdate=!1,i=this._opts.bounds)&&(n=this._map,(s=yh(Ph(i)))&&(this.ir=i.clone(),this.aE=s,"d"===n.baseRender?this.X$(s):this.Q$(s,t)),this.to())},io.prototype.moveWithPixel=function(t,i){var n,s,e;this._map&&(n=this._map,s=(e=this._opts.bounds).southWest.toJSON(),e=e.northEast.toJSON(),s=this._map.getView().ru().moveWithPixel(s,[t,i],n.getZoom()),e=this._map.getView().ru().moveWithPixel(e,[t,i],n.getZoom()),t=new l(s,e),this.setBounds(t))},io.prototype.moveWithPos=function(t,i){var n,s;this._map&&(n=(s=this._opts.bounds).southWest.toJSON(),s=s.northEast.toJSON(),n=this._map.getView().ru().moveWithPos(n,[t,i]),s=this._map.getView().ru().moveWithPos(s,[t,i]),t=new l(n,s),this.setBounds(t))},io.prototype.setOptions=function(t){var t=this.nY(t),i=!_.isEqual(this._opts.bounds,t.bounds);this._opts=t,this._checkMap(),i&&this.setBounds(t.bounds),this.to()},io.prototype.getPath=function(){var t,i,n;if(!this.ir){var s=this._opts.bounds;if(!s)return;this.ir=s.clone()}if(s=this.ir)return this.P$&&(i=s.getSouthWest(),n=s.getNorthEast(),i=this._map.getView().ru().moveWithPos([i.KL,i.kT],this.zx),n=this._map.getView().ru().moveWithPos([n.KL,n.kT],this.zx),s=new l(i,n)),s?Ph(s):t},io.prototype.getBounds=function(){var t;if(!this.ir){var i=this._opts.bounds;if(!i)return;this.ir=i.clone()}if(i=this.ir)return this.P$?(t=i.getSouthWest(),i=i.getNorthEast(),t=this._map.getView().ru().moveWithPos([t.KL,t.kT],this.zx),i=this._map.getView().ru().moveWithPos([i.KL,i.kT],this.zx),new l(t,i)):this.ir},io.prototype.getCenter=function(){if(this._opts.bounds)return this._opts.bounds.getCenter()};var $h,to=io;function io(t){void 0===t&&(t={});var n=$h.call(this)||this;return n.className="Overlay.Rectangle",n.contains=function(t){var i=n.getBounds();return!!i&&i.contains(t)},n._opts={fillColor:"#00D3FC",fillOpacity:.5,strokeColor:"#00B2D5",strokeWeight:2,strokeOpacity:.9,strokeStyle:"solid",draggable:!1,bubble:!1,strokeDasharray:[10,5],zIndex:50,extData:{},noSelect:!1,innerOverlay:!1,zooms:_.zoomRange,async:!1},n._opts=n.nY(t),n._checkMap(),n}no=Oi,_.Ei(eo,no),eo.prototype.init=function(t){t=t||this._opts,this._opts=this.nY(t),this.setCenterAndRadius(this._opts.center,this._opts.radius)},eo.prototype.setCenter=function(t){this.setCenterAndRadius(t,this._opts.radius)},eo.prototype.setRadius=function(t){this.setCenterAndRadius(this._opts.center,t)},eo.prototype.getCenter=function(){var t=_.parseLngLatData(this._opts.center),t=this._map.getView().ru().moveWithPos([t.KL,t.kT],this.zx);return new _.LngLat(t[0],t[1])},eo.prototype.getRadius=function(){return this._opts.radius},eo.prototype.getPath=function(){var t;return this._opts.center&&this._opts.radius&&(t=Eh(this._opts.center,this._opts.radius,_.Support.$e))&&0i)||Math.abs(n.y-t.y)>i)&&(t=t.toJSON(),n=n.toJSON(),s=Math.abs(t[0]-n[0]),t=Math.abs(t[1]-n[1]),s=Math.sqrt(s*s+t*t),t=e._map.getView().Pu||0,s/Math.cos(t)n*n*1&&o.push([h[a][0],h[a][1]]);s.push(o)}u.D_(s)}else u.EI=i,u.D_(u.q$)}},u}vo=Bt,_.Ei(po,vo),po.prototype.Tx=function(t){t&&(t=_.Bs(t)?_.ProjectionManager.getProjection("EPSG:3857").project(t.KL,t.kT):_.ProjectionManager.getProjection("EPSG:3857").project(t[0],t[1]),this.Sx=_.lcs.getLocalByCoord(t))},po.prototype.destroy=function(){this.Px&&(this.Px.destroy(),delete this.Px),vo.prototype.destroy.call(this)},po.prototype.toGeometry=function(){var t=this._opts.path;if(t)return _.ys(t)?{type:"LineString",coordinates:t}:_.Ox(t)?{type:"MultiLineString",coordinates:t}:void 0},po.prototype.U_=function(t){this.F_&&!this.E_&&(this.E_=t.createTexture(this.F_,{Zi:!0}),this.E_.bind(t.gl.CLAMP_TO_EDGE,t.gl.LINEAR,t.gl.LINEAR))},po.prototype.aC=function(t,i){this.rC||(i=function(t){for(var i=document.createElement("canvas"),n=(i.height=1,i.width=4096,i.getContext("2d")),s=n.createImageData(4096,1),e=0,r=0;r<4096;r++){for(var h=void 0;e>1,o=s-n,a=s,u=i[n][0],c=i[n][1],f=i[s][0],l=i[s][1],d=n+1;d 使用 JSAPI 安全模式,代理服务请以_AMapService 作为一级路由"))),{key:config[0],host:config[2],domain:config[17],server:pi,protocol:Pi,version:config[4],adcode:config[6],callback:config[5],appname:si,client:xi,markers:ct,pc:"http://gaode.com",mo:"http://m.amap.com",workerUrl:"",YT:Qt,qT:li,y_:_.Support.$e?li:Qt,v_:"\x3c!--v2.0--\x3e © "+(new Date).getFullYear()+" AutoNavi ",db:config[14]||"",JH:config[15]||"",jscode:ea,gaodeserver:Ti,vdataProxy:"",keytype:config[19]});return hi=(new Date).getTime(),Ut=ra.server+"/v3/log/init?",(s=["platform=JS&s=rsv3&logversion=2.0&product=JsInit&key="+ra.key,"t="+hi]).push("sdkversion=2.0"),s.push("appname="+si),s.push("csid="+_.Util.uuid()),s.push("resolution="+window.screen.width+"*"+window.screen.height),s.push("mob="+(_.Support.$e?1:0)),s.push("vt="+(_.Support.isWebGL?1:0)),s.push("dpr="+window.devicePixelRatio),s.push("scale="+(_.Support.Ue?2:1)),s.push("detect="+_.Support.Ue),ra.jscode?s.push("jscode="+ra.jscode):ra.gaodeserver&&(Ut=ra.gaodeserver+"/v3/log/init?"),Ut+=s.join("&"),yi.JSONP(Ut),function(t){return t[1]&&(or=t[1].slice(-2),er=t[1].slice(0,4)),{Map:ur,ImageLayer:vr,createDefaultLayer:qr,TileLayer:v,NebulaLayer:Ji,Buildings:Xr,Indoor:Eo,SkyLayer:Ms,DistrictLayer:_o,CanvasLayer:gr,CustomLayer:xr,GLCustomLayer:ih,LabelsLayer:ms,MassMarks:Sr,Event:_.Event,version:"2.0",plugin:$o,LngLat:_.LngLat,Pixel:_.Pixel,Size:_.Size,Icon:re,Bounds:l,extent:Pt,Marker:De,Text:Dr,InfoWindow:Ge,ContextMenu:qe,LabelMarker:Br,Polygon:qh,Rectangle:to,Ellipse:so,Circle:oo,CircleMarker:fo,Polyline:bo,BezierCurve:Co,OverlayGroup:dh,VectorLayer:is,LayerGroup:eh,Control:Fr,DomUtil:w,Util:_.Util,GeometryUtil:_.GeometryUtil,Browser:_r,UA:{ie:_r.ie,ie9:_r.ie9,ie11:_r.ie11,mobile:_r.mobile,android:_r.android,ios:_r.ios},PlaneGeometryUtil:_.PlaneGeometryUtil,getConfig:ta,WebService:ir,extend:_.extend,Http:yi,addCss:N,BuryPoint:Hr,lcs:_.lcs,convertFrom:sr,Heatmap:hh,IndoorMap:jo,Mapbox:ch,BuildingLayer:Xr,Mark:Ko}}});var __AMap_callback=AMap.getConfig().callback,tryGetCallback,tryCallback;return __AMap_callback&&(tryGetCallback=function(){var c=__AMap_callback.split("."),context=window;do{if(!(context=context[c.shift()]))return null}while(c.length);return context||null},tryCallback=function(isFinalTry){var func=tryGetCallback();if(func){if("function"!=typeof func)throw new Error(__AMap_callback+" is not a function!");setTimeout(func,1)}else if(isFinalTry)throw new Error("Can not find callback: "+__AMap_callback+", try define it before load JsApi!")},document.body&&tryGetCallback()?tryCallback():setTimeout(function(){tryCallback(!0)},1)),AMap}); +(typeof _cssload_=="function")&&_cssload_("logo",".amap-logo{display:block!important;pointer-events:none;}",true)})(["1d61961cc5f61f643bcfb6f0b5021e80",[118.363373,31.228098,119.241663,32.614363,118.767413,32.041544],"https://webapi.amap.com",1,"2.0.5.21",null,"320100","AMap.ElasticMarker,AMap.ToolBar,AMap.Scale,AMap.HawkEye,AMap.MapType,AMap.MouseTool,AMap.CircleEditor,AMap.PolygonEditor,AMap.PolylineEditor,AMap.MarkerCluster,AMap.RangingTool",true,false,false,true,"20230103011500-20201123-1",false,"A","3_23_10_10_00","https","webapi.amap.com",1,"0"]) +_jsload_('AMap.ElasticMarker', '(function(){"use strict";var extendStatics=function(d,b){extendStatics=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(d,b){d.__proto__=b}||function(d,b){for(var p in b)if(b.hasOwnProperty(p))d[p]=b[p]};return extendStatics(d,b)};function __extends(d,b){extendStatics(d,b);function __(){this.constructor=d}d.prototype=b===null?Object.create(b):(__.prototype=b.prototype,new __)}var extend=function(dest){var args=[];for(var _i=1;_i=0){forShort=["Intel"];if(0<=graphicVersion.indexOf("mobile")){forShort.push("Mobile")}if(0<=graphicVersion.indexOf("gma")||0<=graphicVersion.indexOf("graphics media accelerator")){forShort.push("GMA")}if(0<=graphicVersion.indexOf("haswell")){forShort.push("Haswell")}else if(0<=graphicVersion.indexOf("ivy")){forShort.push("HD 4000")}else if(0<=graphicVersion.indexOf("sandy")){forShort.push("HD 3000")}else if(0<=graphicVersion.indexOf("ironlake")){forShort.push("HD")}else{if(0<=graphicVersion.indexOf("hd")){forShort.push("HD")}var number=graphicVersion.match(numberRegex_1);if(number){forShort.push(number[1].toUpperCase())}}forShort=forShort.join(" ");return forShort}if(graphicVersion.indexOf("nvidia")>=0||graphicVersion.indexOf("quadro")>=0||graphicVersion.indexOf("geforce")>=0||graphicVersion.indexOf("nvs")>=0){forShort=["nVidia"];if(0<=graphicVersion.indexOf("geforce")){forShort.push("geForce")}if(0<=graphicVersion.indexOf("quadro")){forShort.push("Quadro")}if(0<=graphicVersion.indexOf("nvs")){forShort.push("NVS")}if(graphicVersion.match(/\\bion\\b/)){forShort.push("ION")}if(graphicVersion.match(/gtx\\b/)){forShort.push("GTX")}else if(graphicVersion.match(/gts\\b/)){forShort.push("GTS")}else if(graphicVersion.match(/gt\\b/)){forShort.push("GT")}else if(graphicVersion.match(/gs\\b/)){forShort.push("GS")}else if(graphicVersion.match(/ge\\b/)){forShort.push("GE")}else if(graphicVersion.match(/fx\\b/)){forShort.push("FX")}var number=graphicVersion.match(numberRegex_1);if(number){forShort.push(number[1].toUpperCase().replace("GS",""))}if(0<=graphicVersion.indexOf("titan")){forShort.push("TITAN")}else if(0<=graphicVersion.indexOf("ti")){forShort.push("Ti")}forShort=forShort.join(" ");return forShort}if(graphicVersion.indexOf("amd")>=0||graphicVersion.indexOf("ati")>=0||graphicVersion.indexOf("radeon")>=0||graphicVersion.indexOf("firegl")>=0||graphicVersion.indexOf("firepro")>=0){forShort=["AMD"];if(0<=graphicVersion.indexOf("mobil")){forShort.push("Mobility")}var radeonIndex=graphicVersion.indexOf("radeon");if(0<=radeonIndex){forShort.push("Radeon")}if(0<=graphicVersion.indexOf("firepro")){forShort.push("FirePro")}else if(0<=graphicVersion.indexOf("firegl")){forShort.push("FireGL")}if(0<=graphicVersion.indexOf("hd")){forShort.push("HD")}if(radeonIndex>=0){graphicVersion=graphicVersion.substring(radeonIndex)}var number=graphicVersion.match(numberRegex_1);if(number){forShort.push(number[1].toUpperCase().replace("HD",""))}forShort=forShort.join(" ");return forShort}return graphicVersion.substring(0,100)},blackGraphicCard_1="google swiftshader;microsoft basic render driver;vmware svga 3d;Intel 965GM;Intel B43;Intel G41;Intel G45;Intel G965;Intel GMA 3600;Intel Mobile 4;Intel Mobile 45;Intel Mobile 965".split(";"),ie="ActiveXObject"in win_1,retina=window["detectRetina"]==false?false:"devicePixelRatio"in win_1&&win_1["devicePixelRatio"]>1||ie&&"matchMedia"in win_1&&win_1.matchMedia("(min-resolution:144dpi)")&&win_1.matchMedia("(min-resolution:144dpi)").matches,windows=uaHas("windows nt"),windowslt7=ua.search(/windows nt [1-5]\\./)!==-1,windowsXP=ua.search(/windows nt 5\\.[12]/)!==-1,windows10=uaHas("windows nt 10"),winPhone=uaHas("windows phone"),mb2345Browser=uaHas("Mb2345Browser"),ioslt7=ios&&ua.search(/ os [456]_/)!==-1,ioslt9=ios&&ua.search(/ os [4-8]_/)!==-1,ios78=ios&&ua.search(/ os [78]_/)!==-1,ios8=ios&&uaHas("os 8_"),ios10=ios&&uaHas("os 10_"),android_1=uaHas("android");var androidVersion=0;if(android_1){androidVersion=parseInt(ua.split("android")[1])||0}var android23=android_1&&androidVersion<4,android5plus=android_1&&androidVersion>=5,android44plus=android5plus||ua.search(/android 4.4/)!==-1,plat_1=android_1?"android":ios?"ios":windows?"windows":mac?"mac":"other",ie6=ie&&!win_1["XMLHttpRequest"],ie7=ie&&!doc.querySelector,ielt9=ie&&!doc.addEventListener,ie9=ie&&uaHas("msie 9"),ie10=ie&&uaHas("msie 10"),ie11=ie&&uaHas("rv:11"),ielt10=ielt9||ie9,edge=uaHas("edge"),QtWeb=uaHas("qtweb"),uc=uaHas("ucbrowser"),gaodeCoords=uaHas("alipay")||android_1&&uc,xiaomi=uaHas("miuibrowser"),wechat=uaHas("micromessenger"),dingding=uaHas("dingtalk"),qq=uaHas("mqqbrowser"),baidu=uaHas("baidubrowser"),crios=uaHas("crios/"),chrome=uaHas("chrome/"),chromium=(chrome||crios)&&uaHas("chromium"),chrome30plus=!chromium&&(chrome&&parseInt(ua.split("chrome/")[1])>30||crios&&parseInt(ua.split("crios/")[1])>30),firefox=uaHas("firefox"),firefox27plus=firefox&&parseInt(ua.split("firefox/")[1])>27,safari7plus=safari&&parseInt(ua.split("version/")[1])>7,aliApp=ios&&uaHas("aliapp"),mobile_1=android_1||ios||winPhone||uaHas("mobile"),touchDev="ontouchstart"in doc,msPointer=win_1["navigator"]&&win_1["navigator"]["msPointerEnabled"]&&!!win_1["navigator"]["msMaxTouchPoints"],pointer=win_1["navigator"]&&!!win_1["navigator"]["maxTouchPoints"],pointerDev=!touchDev&&(pointer||msPointer),touch_1=touchDev||pointerDev,getScale=function(){if(!mobile_1){return win_1.devicePixelRatio||1}var metas=document.getElementsByTagName("meta");if(window.parent&&window.parent!==window){try{if(window.parent.location.origin===window.location.origin){metas=window.parent.document.getElementsByTagName("meta")}else{return 1}}catch(e){return 1}}for(var i=metas.length-1;i>=0;i-=1){if(metas[i].name==="viewport"){var content=metas[i].content;var initial_scale=void 0,minimum_scale=void 0,maximum_scale=void 0;if(content.indexOf("initial-scale")!==-1){initial_scale=parseFloat(content.split("initial-scale=")[1])}if(content.indexOf("minimum-scale")!==-1){minimum_scale=parseFloat(content.split("minimum-scale=")[1])}else{minimum_scale=0}if(content.indexOf("maximum-scale")!==-1){maximum_scale=parseFloat(content.split("maximum-scale=")[1])}else{maximum_scale=Infinity}if(initial_scale){if(maximum_scale>=minimum_scale){if(initial_scale>maximum_scale){return maximum_scale}else if(initial_scale=minimum_scale){if(minimum_scale>=1){return 1}else{return Math.min(maximum_scale,1)}}else{console&&console.log&&console.log("viewport参数不合法");return null}}}}return undefined},viewportScale=getScale(),needFitRetina_1=retina&&(!mobile_1||!!viewportScale&&viewportScale>=1),ie3d=ie&&"transition"in docE.style,isSvg=!!doc.createElementNS&&!!doc.createElementNS("http://www.w3.org/2000/svg","svg")["createSVGRect"],canvas_1=doc.createElement("canvas"),isCanvas_1=!!(canvas_1&&canvas_1.getContext),UrlLib=window["URL"]||window["webkitURL"],DataUrl2Blob=false;var isWorker_1=window["disableWorker"]!==true&&!ie&&!(uc&&android_1&&!chrome30plus)&&window["Worker"]&&UrlLib&&UrlLib["createObjectURL"]&&window["Blob"],webglContextName_1="",graphicCard_1="",maxRenderSize_1=0,needAntialias=window["higtQualityRender"]==false?retina?false:true:true,movingDraw=window["movingDraw"],webglParams_1=window["forceWebGL"]?{alpha:true,antialias:needAntialias,depth:true,stencil:true}:{alpha:true,antialias:needAntialias,depth:true,stencil:true},checkWebgl=function(){if(!isCanvas_1||!isWorker_1){return false}var contextName=["webgl","experimental-webgl","moz-webgl"];var gl=null;for(var i=0;imaxRenderSize_1){return false}if(23>gl.getShaderPrecisionFormat(35632,36338).precision||23>gl.getShaderPrecisionFormat(35633,36338).precision){return false}graphicCard_1=gl.getExtension("WEBGL_debug_renderer_info")?gl.getParameter(37446):null;var graphicCardShort=getGraphicCardShortStr_1(graphicCard_1);if(graphicCardShort){if(graphicCardShort.indexOf("google swiftshader")>-1){hardwareAccEnabled=false;return false}if(-1!==blackGraphicCard_1.indexOf(graphicCardShort)){return false}}webglContextName_1=contextName[i];return true}}return false},canWebGL=checkWebgl(),enableVector=config[8]!==undefined?config[8]:true,byWebgl=window["Uint8Array"]&&enableVector&&!window["forbidenWebGL"]&&canWebGL&&(window["forceWebGL"]||(chrome30plus||firefox27plus||safari7plus||edge||wechat||dingding)&&plat_1!=="other"),baseRender=window["forceWebGLBaseRender"]?"w":byWebgl?"w":"d",webkit_1=uaHas("webkit"),webkit3d="WebKitCSSMatrix"in win_1&&"m11"in new window["WebKitCSSMatrix"],gecko3d="MozPerspective"in docE.style,opera3d="OTransition"in docE.style,any3d=ie3d||webkit3d||gecko3d||opera3d,enableLabelImage=false,vdataVersion=config[12]!==undefined?config[12]:null;var localStore=true;try{if(typeof win_1.localStorage==="undefined"){localStore=false}else{var tmpData=(new Date).getTime()+"";win_1.localStorage.setItem("_test",tmpData);if(win_1.localStorage.getItem("_test")!==tmpData){localStore=false}win_1.localStorage.removeItem("_test")}}catch(e){localStore=false}var getContext=function(canvas,opt){var params={};extend(params,webglParams_1);extend(params,opt);return canvas.getContext(webglContextName_1,params)};var chromeversion=parseInt(ua.split("chrome/")[1]);Browser={iPad:iPad,iPhone:iPhone,size:iPhone?100:android_1?200:500,mac:mac,windows:windows,ios:ios,ios10:ios10,android:android_1,android23:android23,gaodeCoords:gaodeCoords,plat:plat_1,baidu:baidu,qq:qq,safari:safari,wechat:wechat,ie:ie,ie6:ie6,ie7:ie7,ie9:ie9,ie10:ie10,ielt9:ielt9,ielt10:ielt10,ie11:ie11,edge:edge,ielt11:ie&&!ie11,mb2345Browser:mb2345Browser,localStore:localStore,vdataVersion:vdataVersion,geolocation:mobile_1||ie&&!ielt9||edge,uc_:uc,uc:uc&&!chrome,chrome:chrome,drawTextDir:true,firefox:firefox,hardwareAccEnabled:hardwareAccEnabled,isMobile:mobile_1,mobileWebkit:mobile_1&&webkit_1,mobileWebkit3d:mobile_1&&webkit3d,mobileOpera:mobile_1&&win_1.opera,isRetina:retina,viewportScale:viewportScale,needFitRetina:needFitRetina_1,touch:touch_1,msPointer:msPointer,pointer:pointer,pointerDev:pointerDev,chrome57:chrome&&chromeversion>=57,chrome64:!mobile_1&&chrome&&chromeversion>=64,webkit:webkit_1,ie3d:ie3d,webkit3d:webkit3d,gecko3d:gecko3d,opera3d:opera3d,any3d:any3d,isSvg:isSvg,isCanvas:isCanvas_1,isWorker:isWorker_1,useLabelImage:enableLabelImage,isWebGL:byWebgl,webglContextName:webglContextName_1,webglParams:webglParams_1,graphicCard:graphicCard_1,maxRenderSize:maxRenderSize_1,DataUrl2Blob:DataUrl2Blob,movingDraw:movingDraw,baseRender:enableVector?baseRender:"d",scale:retina?2:1,getContext:getContext,isWebp:false,wasm:wasm,amapRunTime:amapRunTime,checkWebgl:checkWebgl};testWepP(function(isWebp){Browser.isWebp=isWebp})}return Browser}var Browser=getSupport(typeof config==="undefined"?[]:config);if(typeof createImageBitmap!=="undefined"&&typeof ImageBitmap!=="undefined"){Browser.imageBitmap=true}var canceledWorkerFetch=Boolean(Browser.isWorkerEnv?!Browser.safari&&!Browser.macWechat&&!Browser.windowsWechat&&self.fetch&&self.Request&&self.AbortController&&self.Request.prototype.hasOwnProperty("signal"):!Browser.safari&&!Browser.macWechat&&!Browser.windowsWechat&&window.fetch&&window.Request&&window.AbortController&&window.Request.prototype.hasOwnProperty("signal"));Browser.canceledWorkerFetch=canceledWorkerFetch;Browser["amapRunTime"]={workerTime:{}};var DomUtil={getViewport:function(obj){if(!obj){return[0,0]}return[obj.clientWidth,obj.clientHeight]},getStyle:function(obj,key){var value=obj.style[key];if((!value||value==="auto")&&document.defaultView){var css=document.defaultView.getComputedStyle(obj,null);value=css?css[key]:null}if((!value||value==="auto")&&key==="height"){value=obj.clientHeight+"px"}if((!value||value==="auto")&&key==="width"){value=obj.clientWidth+"px"}return value==="auto"?null:value},getViewportOffset:function(element){var top=0;var left=0;var el=element;var docBody=document.body;var docEl=document.documentElement;var pos;do{top+=el.offsetTop||0;left+=el.offsetLeft||0;top+=parseInt(DomUtil.getStyle(el,"borderTopWidth"),10)||0;left+=parseInt(DomUtil.getStyle(el,"borderLeftWidth"),10)||0;pos=DomUtil.getStyle(el,"position");if(el.offsetParent===docBody&&pos==="absolute"){break}if(pos==="fixed"){top+=docBody.scrollTop||docEl.scrollTop||0;left+=docBody.scrollLeft||docEl.scrollLeft||0;break}el=el.offsetParent}while(el);el=element;do{if(el===docBody){break}top-=el.scrollTop||0;left-=el.scrollLeft||0;if(!DomUtil.documentIsLtr()&&Browser.webkit){left+=el.scrollWidth-el.clientWidth}el=el.parentNode}while(el);return[left,top]},documentIsLtr:function(){var checked=false;var _docIsLtr=false;return function(){if(!checked){_docIsLtr=DomUtil.getStyle(document.body,"direction")==="ltr";checked=true}return _docIsLtr}}(),create:function(tagName,container,className,position){var el=document.createElement(tagName);if(className){el.className=className}if(container){if(position&&position==="before"){var firstDom=container.firstChild;container.insertBefore(el,firstDom)}else{container.appendChild(el)}}return el},toggleClass:function(el,name,on){if(on){this.addClass(el,name)}else{this.removeClass(el,name)}},hasClass:function(el,name){if(!el||!name){return}return el.className.length>0&&new RegExp("(^|\\\\s)"+name+"(\\\\s|$)").test(el.className)},addClass:function(el,name){if(!el||!name){return}if(el.classList&&el.classList.add){el.classList.add(name)}else if(!this.hasClass(el,name)){el.className+=(el.className?" ":"")+name}},setClass:function(el,name){if(!el){return}el.className=name||""},removeClass:function(el,name){function replaceFn(w,match){if(match===name){return""}return w}if(!el||!name){return}if(el.classList&&el.classList.remove){el.classList.remove(name)}else{el.className=el.className.replace(/(\\S+)\\s*/g,replaceFn).replace(/(^\\s+|\\s+$)/,"")}},watchSize:function(element,listener,map){var iframe=document.createElement("iframe");iframe.style.cssText="width: 100%;height: 100%;position: absolute;pointEvents:none; opacity:0; margin: 0;padding: 0;border: none;";iframe.onload=function(){if(iframe){iframe.contentWindow.onresize=sizeChange}};element.appendChild(iframe);iframe.src="javascript:void(0)";var oldWidth=0;var oldHeight=0;sizeChange();map.resize=sizeChange;function sizeChange(){map._boundingClientRect=element.getBoundingClientRect();map._clientPos=[element.clientLeft,element.clientTop];var width=element.offsetWidth;var height=element.offsetHeight;if(width!==oldWidth||height!==oldHeight){listener(width,height);oldWidth=width;oldHeight=height}}window.onscroll=sizeChange;return function(){var _a;if(map.resize){map.resize=null}if(window.onscroll){window.onscroll=null}if(iframe.contentWindow){iframe.contentWindow.onresize=null;iframe.contentWindow.document.write("");iframe.parentNode.removeChild(iframe);(_a=iframe.contentWindow)===null||_a===void 0?void 0:_a.close()}}},watchSize2:function(element,listener,map){var expand=document.createElement("_");expand.className="expand";var shrink=expand.appendChild(document.createElement("_"));shrink.className="shrink";var expandChild=expand.appendChild(document.createElement("_"));expandChild.className="expandChild";var shrinkChild=shrink.appendChild(document.createElement("_"));shrinkChild.className="shrinkChild";var lastWidth;var lastHeight;var style="height:100%;left:0;opacity:0;overflow:hidden;pointer-events:none;position:absolute;top:0;transition:0s;width:100%;z-index:-1";shrink.style.cssText=expand.style.cssText=style;shrinkChild.style.cssText=expandChild.style.cssText="display:block;height:100%;transition:0s;width:100%";shrinkChild.style.width=shrinkChild.style.height="200%";element.appendChild(expand);test();return stop;function test(){unbind();map._boundingClientRect=element.getBoundingClientRect();map._clientPos=[element.clientLeft,element.clientTop];var width=element.offsetWidth;var height=element.offsetHeight;if(width!==lastWidth||height!==lastHeight){lastWidth=width;lastHeight=height;expandChild.style.width=width*2+"px";expandChild.style.height=height*2+"px";expand.scrollLeft=expand.scrollWidth;expand.scrollTop=expand.scrollHeight;shrink.scrollLeft=shrink.scrollWidth;shrink.scrollTop=shrink.scrollHeight;listener(width,height)}shrink.addEventListener("scroll",test);expand.addEventListener("scroll",test)}function unbind(){shrink.removeEventListener("scroll",test);expand.removeEventListener("scroll",test)}function stop(){unbind();element.removeChild(expand)}},mousePos:function(el,e,map){if(el){map._boundingClientRect=el.getBoundingClientRect();map._clientPos=[el.clientLeft,el.clientTop]}var rect=map._boundingClientRect;var t=e;if(t.touches&&t.changedTouches){if(t.touches.length>0){t=t.touches[0]}else{t=t.changedTouches[t.changedTouches.length-1]}}return[t.clientX-rect.left-map._clientPos[0],t.clientY-rect.top-map._clientPos[1]]},remove:function(el){if(el&&el.parentNode){el.parentNode.removeChild(el)}},empty:function(el){while(el.firstChild){el.removeChild(el.firstChild)}},closest:function(elem,className){if(elem){if(this.hasClass(elem,className)){return elem}else{var parent=elem.parentElement;if(parent){return DomUtil.closest(parent,className)}return null}}return null},fillText:function(el,text){if(!el){return}if(el.textContent!==void 0){el.textContent=text}else if(el.innerText!==void 0){el.innerText=text}else{el.innerHTML=text}return el},testProp:function(props){var style=document.documentElement.style;for(var i=0;i0){var t=target["filters"].item(0);t["Dx"]=-center.x*cosDeg+center.y*sinDeg+center.x;t["Dy"]=-center.x*sinDeg-center.y*cosDeg+center.y;t["M11"]=t["M22"]=cosDeg;t["M12"]=-(t["M21"]=sinDeg)}}},setCss:function(obj,css){obj=obj instanceof Array?obj:[obj];for(var i=0;i=0?lowerExponent*lowerScatter:1/upperExponent*upperScatter;scale=Math.min(maxScale,Math.max(minScale,scale));return scale};return ElasticMarker}(AMap.Marker);AMap["ElasticMarker"]=ElasticMarker})(); ');_jsload_('AMap.ToolBar', '(function(){"use strict";var extendStatics=function(d,b){extendStatics=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(d,b){d.__proto__=b}||function(d,b){for(var p in b)if(b.hasOwnProperty(p))d[p]=b[p]};return extendStatics(d,b)};function __extends(d,b){extendStatics(d,b);function __(){this.constructor=d}d.prototype=b===null?Object.create(b):(__.prototype=b.prototype,new __)}var zoomRange=[2,26];var defultOpts={position:{bottom:"20px",right:"20px"},offset:[15,15]};var ToolBar=function(_super){__extends(ToolBar,_super);function ToolBar(opts){if(opts===void 0){opts=defultOpts}var _this=_super.call(this,opts)||this;_this._className="toolbar";_this._handleZoomEnd=_this._handleZoomEnd.bind(_this);_this._config=AMap.extend(defultOpts,opts);_this.initContainer();_this._initUI();return _this}ToolBar.prototype.addTo=function(map){_super.prototype.addTo.call(this,map);this._handleZoomEnd();map.on("zoomend",this._handleZoomEnd)};ToolBar.prototype.remove=function(){if(this.map){this.map.off("zoomend",this._handleZoomEnd)}_super.prototype.remove.call(this)};ToolBar.prototype.removeFrom=function(map){if(map){map.off("zoomend",this._handleZoomEnd)}_super.prototype.removeFrom.call(this,map)};ToolBar.prototype._handleZoomEnd=function(){var map=this.map;var zooms=map.getZooms();if(map.getZoom()<=zooms[0]){this._zoomOut.style.color="#ddd"}else{this._zoomOut.style.color="#000"}if(map.getZoom()>=zooms[1]){this._zoomIn.style.color="#ddd"}else{this._zoomIn.style.color="#000"}};ToolBar.prototype._initUI=function(){var _this=this;this._zoomIn=AMap.DomUtil.create("span",this._container,"amap-ctrl-zoomin");this._zoomOut=AMap.DomUtil.create("span",this._container,"amap-ctrl-zoomout");this._zoomIn.innerHTML="+";this._zoomOut.innerHTML="-";this._zoomIn.setAttribute("data-type","add");this._zoomOut.setAttribute("data-type","sub");this._container.addEventListener("click",function(event){if(event.target instanceof HTMLElement){var type=event.target.getAttribute("data-type");var z=_this.map.getZoom();if(type==="add"){_this.map.setZoom(Math.min(z+1,zoomRange[1]))}else if(type==="sub"){_this.map.setZoom(Math.max(z-1,2))}}})};return ToolBar}(AMap.Control);AMap["ToolBar"]=ToolBar})(); ');_jsload_('AMap.Scale', '(function(){"use strict";var extendStatics=function(d,b){extendStatics=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(d,b){d.__proto__=b}||function(d,b){for(var p in b)if(b.hasOwnProperty(p))d[p]=b[p]};return extendStatics(d,b)};function __extends(d,b){extendStatics(d,b);function __(){this.constructor=d}d.prototype=b===null?Object.create(b):(__.prototype=b.prototype,new __)}var defultOpts={position:"LB",offset:[15,25]};var Scale=function(_super){__extends(Scale,_super);function Scale(opts){if(opts===void 0){opts=defultOpts}var _this=_super.call(this,opts)||this;_this._className="scalecontrol";_this._scaleLevel=[[1e7,"10000"],[5e6,"5000"],[2e6,"2000"],[1e6,"1000"],[5e5,"500"],[2e5,"200"],[1e5,"100"],[5e4,"50"],[3e4,"30"],[2e4,"20"],[1e4,"10"],[5e3,"5"],[2e3,"2"],[1e3,"1"],[500,"500"],[200,"200"],[100,"100"],[50,"50"],[25,"25"],[10,"10"],[5,"5"],[2,"2"],[1,"1"],[.5,"50"],[.2,"20"],[.1,"10"],[.05,"5"],[.02,"2"],[.01,"1"],[.01,"1"],[.01,"1"]];_this._handleViewChange=_this._handleViewChange.bind(_this);_this._config=AMap.extend(defultOpts,opts);_this.initContainer();return _this}Scale.prototype.addTo=function(map){_super.prototype.addTo.call(this,map);this._initUI();map.on("viewchange",this._handleViewChange)};Scale.prototype.remove=function(){if(this.map){this.map.off("viewchange",this._handleViewChange)}this._destroyUI();_super.prototype.remove.call(this)};Scale.prototype.removeFrom=function(map){if(map){map.off("viewchange",this._handleViewChange)}this._destroyUI();_super.prototype.removeFrom.call(this,map)};Scale.prototype._handleViewChange=function(){this._updateUI()};Scale.prototype._initUI=function(){this._text=AMap.DomUtil.create("div",this._container,"amap-scale-text");this._line=AMap.DomUtil.create("div",this._container,"amap-scale-line");this._lineLeft=AMap.DomUtil.create("div",this._container,"amap-scale-edgeleft");this._lineRight=AMap.DomUtil.create("div",this._container,"amap-scale-edgeright");this._lineMid=AMap.DomUtil.create("div",this._container,"amap-scale-middle");this._line.appendChild(this._lineLeft);this._line.appendChild(this._lineMid);this._line.appendChild(this._lineRight);this._updateUI()};Scale.prototype._destroyUI=function(){while(this._container.firstChild){this._container.removeChild(this._container.firstChild)}};Scale.prototype._updateUI=function(){var _a=this.map.getView().getStatus(),optimalZoom=_a.optimalZoom,center=_a.center,resolution=_a.resolution;var size=this.map.getSize().toArray();var level=optimalZoom-1;var coordX=resolution*Math.cos(center[1]/180*Math.PI);var len=this._scaleLevel[level][0]/coordX;for(var i=level;i=0){forShort=["Intel"];if(0<=graphicVersion.indexOf("mobile")){forShort.push("Mobile")}if(0<=graphicVersion.indexOf("gma")||0<=graphicVersion.indexOf("graphics media accelerator")){forShort.push("GMA")}if(0<=graphicVersion.indexOf("haswell")){forShort.push("Haswell")}else if(0<=graphicVersion.indexOf("ivy")){forShort.push("HD 4000")}else if(0<=graphicVersion.indexOf("sandy")){forShort.push("HD 3000")}else if(0<=graphicVersion.indexOf("ironlake")){forShort.push("HD")}else{if(0<=graphicVersion.indexOf("hd")){forShort.push("HD")}var number=graphicVersion.match(numberRegex_1);if(number){forShort.push(number[1].toUpperCase())}}forShort=forShort.join(" ");return forShort}if(graphicVersion.indexOf("nvidia")>=0||graphicVersion.indexOf("quadro")>=0||graphicVersion.indexOf("geforce")>=0||graphicVersion.indexOf("nvs")>=0){forShort=["nVidia"];if(0<=graphicVersion.indexOf("geforce")){forShort.push("geForce")}if(0<=graphicVersion.indexOf("quadro")){forShort.push("Quadro")}if(0<=graphicVersion.indexOf("nvs")){forShort.push("NVS")}if(graphicVersion.match(/\\bion\\b/)){forShort.push("ION")}if(graphicVersion.match(/gtx\\b/)){forShort.push("GTX")}else if(graphicVersion.match(/gts\\b/)){forShort.push("GTS")}else if(graphicVersion.match(/gt\\b/)){forShort.push("GT")}else if(graphicVersion.match(/gs\\b/)){forShort.push("GS")}else if(graphicVersion.match(/ge\\b/)){forShort.push("GE")}else if(graphicVersion.match(/fx\\b/)){forShort.push("FX")}var number=graphicVersion.match(numberRegex_1);if(number){forShort.push(number[1].toUpperCase().replace("GS",""))}if(0<=graphicVersion.indexOf("titan")){forShort.push("TITAN")}else if(0<=graphicVersion.indexOf("ti")){forShort.push("Ti")}forShort=forShort.join(" ");return forShort}if(graphicVersion.indexOf("amd")>=0||graphicVersion.indexOf("ati")>=0||graphicVersion.indexOf("radeon")>=0||graphicVersion.indexOf("firegl")>=0||graphicVersion.indexOf("firepro")>=0){forShort=["AMD"];if(0<=graphicVersion.indexOf("mobil")){forShort.push("Mobility")}var radeonIndex=graphicVersion.indexOf("radeon");if(0<=radeonIndex){forShort.push("Radeon")}if(0<=graphicVersion.indexOf("firepro")){forShort.push("FirePro")}else if(0<=graphicVersion.indexOf("firegl")){forShort.push("FireGL")}if(0<=graphicVersion.indexOf("hd")){forShort.push("HD")}if(radeonIndex>=0){graphicVersion=graphicVersion.substring(radeonIndex)}var number=graphicVersion.match(numberRegex_1);if(number){forShort.push(number[1].toUpperCase().replace("HD",""))}forShort=forShort.join(" ");return forShort}return graphicVersion.substring(0,100)},blackGraphicCard_1="google swiftshader;microsoft basic render driver;vmware svga 3d;Intel 965GM;Intel B43;Intel G41;Intel G45;Intel G965;Intel GMA 3600;Intel Mobile 4;Intel Mobile 45;Intel Mobile 965".split(";"),ie="ActiveXObject"in win_1,retina=window["detectRetina"]==false?false:"devicePixelRatio"in win_1&&win_1["devicePixelRatio"]>1||ie&&"matchMedia"in win_1&&win_1.matchMedia("(min-resolution:144dpi)")&&win_1.matchMedia("(min-resolution:144dpi)").matches,windows=uaHas("windows nt"),windowslt7=ua.search(/windows nt [1-5]\\./)!==-1,windowsXP=ua.search(/windows nt 5\\.[12]/)!==-1,windows10=uaHas("windows nt 10"),winPhone=uaHas("windows phone"),mb2345Browser=uaHas("Mb2345Browser"),ioslt7=ios&&ua.search(/ os [456]_/)!==-1,ioslt9=ios&&ua.search(/ os [4-8]_/)!==-1,ios78=ios&&ua.search(/ os [78]_/)!==-1,ios8=ios&&uaHas("os 8_"),ios10=ios&&uaHas("os 10_"),android_1=uaHas("android");var androidVersion=0;if(android_1){androidVersion=parseInt(ua.split("android")[1])||0}var android23=android_1&&androidVersion<4,android5plus=android_1&&androidVersion>=5,android44plus=android5plus||ua.search(/android 4.4/)!==-1,plat_1=android_1?"android":ios?"ios":windows?"windows":mac?"mac":"other",ie6=ie&&!win_1["XMLHttpRequest"],ie7=ie&&!doc.querySelector,ielt9=ie&&!doc.addEventListener,ie9=ie&&uaHas("msie 9"),ie10=ie&&uaHas("msie 10"),ie11=ie&&uaHas("rv:11"),ielt10=ielt9||ie9,edge=uaHas("edge"),QtWeb=uaHas("qtweb"),uc=uaHas("ucbrowser"),gaodeCoords=uaHas("alipay")||android_1&&uc,xiaomi=uaHas("miuibrowser"),wechat=uaHas("micromessenger"),dingding=uaHas("dingtalk"),qq=uaHas("mqqbrowser"),baidu=uaHas("baidubrowser"),crios=uaHas("crios/"),chrome=uaHas("chrome/"),chromium=(chrome||crios)&&uaHas("chromium"),chrome30plus=!chromium&&(chrome&&parseInt(ua.split("chrome/")[1])>30||crios&&parseInt(ua.split("crios/")[1])>30),firefox=uaHas("firefox"),firefox27plus=firefox&&parseInt(ua.split("firefox/")[1])>27,safari7plus=safari&&parseInt(ua.split("version/")[1])>7,aliApp=ios&&uaHas("aliapp"),mobile_1=android_1||ios||winPhone||uaHas("mobile"),touchDev="ontouchstart"in doc,msPointer=win_1["navigator"]&&win_1["navigator"]["msPointerEnabled"]&&!!win_1["navigator"]["msMaxTouchPoints"],pointer=win_1["navigator"]&&!!win_1["navigator"]["maxTouchPoints"],pointerDev=!touchDev&&(pointer||msPointer),touch_1=touchDev||pointerDev,getScale=function(){if(!mobile_1){return win_1.devicePixelRatio||1}var metas=document.getElementsByTagName("meta");if(window.parent&&window.parent!==window){try{if(window.parent.location.origin===window.location.origin){metas=window.parent.document.getElementsByTagName("meta")}else{return 1}}catch(e){return 1}}for(var i=metas.length-1;i>=0;i-=1){if(metas[i].name==="viewport"){var content=metas[i].content;var initial_scale=void 0,minimum_scale=void 0,maximum_scale=void 0;if(content.indexOf("initial-scale")!==-1){initial_scale=parseFloat(content.split("initial-scale=")[1])}if(content.indexOf("minimum-scale")!==-1){minimum_scale=parseFloat(content.split("minimum-scale=")[1])}else{minimum_scale=0}if(content.indexOf("maximum-scale")!==-1){maximum_scale=parseFloat(content.split("maximum-scale=")[1])}else{maximum_scale=Infinity}if(initial_scale){if(maximum_scale>=minimum_scale){if(initial_scale>maximum_scale){return maximum_scale}else if(initial_scale=minimum_scale){if(minimum_scale>=1){return 1}else{return Math.min(maximum_scale,1)}}else{console&&console.log&&console.log("viewport参数不合法");return null}}}}return undefined},viewportScale=getScale(),needFitRetina_1=retina&&(!mobile_1||!!viewportScale&&viewportScale>=1),ie3d=ie&&"transition"in docE.style,isSvg=!!doc.createElementNS&&!!doc.createElementNS("http://www.w3.org/2000/svg","svg")["createSVGRect"],canvas_1=doc.createElement("canvas"),isCanvas_1=!!(canvas_1&&canvas_1.getContext),UrlLib=window["URL"]||window["webkitURL"],DataUrl2Blob=false;var isWorker_1=window["disableWorker"]!==true&&!ie&&!(uc&&android_1&&!chrome30plus)&&window["Worker"]&&UrlLib&&UrlLib["createObjectURL"]&&window["Blob"],webglContextName_1="",graphicCard_1="",maxRenderSize_1=0,needAntialias=window["higtQualityRender"]==false?retina?false:true:true,movingDraw=window["movingDraw"],webglParams_1=window["forceWebGL"]?{alpha:true,antialias:needAntialias,depth:true,stencil:true}:{alpha:true,antialias:needAntialias,depth:true,stencil:true},checkWebgl=function(){if(!isCanvas_1||!isWorker_1){return false}var contextName=["webgl","experimental-webgl","moz-webgl"];var gl=null;for(var i=0;imaxRenderSize_1){return false}if(23>gl.getShaderPrecisionFormat(35632,36338).precision||23>gl.getShaderPrecisionFormat(35633,36338).precision){return false}graphicCard_1=gl.getExtension("WEBGL_debug_renderer_info")?gl.getParameter(37446):null;var graphicCardShort=getGraphicCardShortStr_1(graphicCard_1);if(graphicCardShort){if(graphicCardShort.indexOf("google swiftshader")>-1){hardwareAccEnabled=false;return false}if(-1!==blackGraphicCard_1.indexOf(graphicCardShort)){return false}}webglContextName_1=contextName[i];return true}}return false},canWebGL=checkWebgl(),enableVector=config[8]!==undefined?config[8]:true,byWebgl=window["Uint8Array"]&&enableVector&&!window["forbidenWebGL"]&&canWebGL&&(window["forceWebGL"]||(chrome30plus||firefox27plus||safari7plus||edge||wechat||dingding)&&plat_1!=="other"),baseRender=window["forceWebGLBaseRender"]?"w":byWebgl?"w":"d",webkit_1=uaHas("webkit"),webkit3d="WebKitCSSMatrix"in win_1&&"m11"in new window["WebKitCSSMatrix"],gecko3d="MozPerspective"in docE.style,opera3d="OTransition"in docE.style,any3d=ie3d||webkit3d||gecko3d||opera3d,enableLabelImage=false,vdataVersion=config[12]!==undefined?config[12]:null;var localStore=true;try{if(typeof win_1.localStorage==="undefined"){localStore=false}else{var tmpData=(new Date).getTime()+"";win_1.localStorage.setItem("_test",tmpData);if(win_1.localStorage.getItem("_test")!==tmpData){localStore=false}win_1.localStorage.removeItem("_test")}}catch(e){localStore=false}var getContext=function(canvas,opt){var params={};extend(params,webglParams_1);extend(params,opt);return canvas.getContext(webglContextName_1,params)};var chromeversion=parseInt(ua.split("chrome/")[1]);Browser={iPad:iPad,iPhone:iPhone,size:iPhone?100:android_1?200:500,mac:mac,windows:windows,ios:ios,ios10:ios10,android:android_1,android23:android23,gaodeCoords:gaodeCoords,plat:plat_1,baidu:baidu,qq:qq,safari:safari,wechat:wechat,ie:ie,ie6:ie6,ie7:ie7,ie9:ie9,ie10:ie10,ielt9:ielt9,ielt10:ielt10,ie11:ie11,edge:edge,ielt11:ie&&!ie11,mb2345Browser:mb2345Browser,localStore:localStore,vdataVersion:vdataVersion,geolocation:mobile_1||ie&&!ielt9||edge,uc_:uc,uc:uc&&!chrome,chrome:chrome,drawTextDir:true,firefox:firefox,hardwareAccEnabled:hardwareAccEnabled,isMobile:mobile_1,mobileWebkit:mobile_1&&webkit_1,mobileWebkit3d:mobile_1&&webkit3d,mobileOpera:mobile_1&&win_1.opera,isRetina:retina,viewportScale:viewportScale,needFitRetina:needFitRetina_1,touch:touch_1,msPointer:msPointer,pointer:pointer,pointerDev:pointerDev,chrome57:chrome&&chromeversion>=57,chrome64:!mobile_1&&chrome&&chromeversion>=64,webkit:webkit_1,ie3d:ie3d,webkit3d:webkit3d,gecko3d:gecko3d,opera3d:opera3d,any3d:any3d,isSvg:isSvg,isCanvas:isCanvas_1,isWorker:isWorker_1,useLabelImage:enableLabelImage,isWebGL:byWebgl,webglContextName:webglContextName_1,webglParams:webglParams_1,graphicCard:graphicCard_1,maxRenderSize:maxRenderSize_1,DataUrl2Blob:DataUrl2Blob,movingDraw:movingDraw,baseRender:enableVector?baseRender:"d",scale:retina?2:1,getContext:getContext,isWebp:false,wasm:wasm,amapRunTime:amapRunTime,checkWebgl:checkWebgl};testWepP(function(isWebp){Browser.isWebp=isWebp})}return Browser}var Browser=getSupport(typeof config==="undefined"?[]:config);if(typeof createImageBitmap!=="undefined"&&typeof ImageBitmap!=="undefined"){Browser.imageBitmap=true}var canceledWorkerFetch=Boolean(Browser.isWorkerEnv?!Browser.safari&&!Browser.macWechat&&!Browser.windowsWechat&&self.fetch&&self.Request&&self.AbortController&&self.Request.prototype.hasOwnProperty("signal"):!Browser.safari&&!Browser.macWechat&&!Browser.windowsWechat&&window.fetch&&window.Request&&window.AbortController&&window.Request.prototype.hasOwnProperty("signal"));Browser.canceledWorkerFetch=canceledWorkerFetch;Browser["amapRunTime"]={workerTime:{}};var freeGlobal=typeof global=="object"&&global&&global.Object===Object&&global;var freeSelf=typeof self=="object"&&self&&self.Object===Object&&self;var root=freeGlobal||freeSelf||Function("return this")();var Symbol=root.Symbol;var objectProto=Object.prototype;var hasOwnProperty=objectProto.hasOwnProperty;var nativeObjectToString=objectProto.toString;var symToStringTag=Symbol?Symbol.toStringTag:undefined;function getRawTag(value){var isOwn=hasOwnProperty.call(value,symToStringTag),tag=value[symToStringTag];try{value[symToStringTag]=undefined;var unmasked=true}catch(e){}var result=nativeObjectToString.call(value);if(unmasked){if(isOwn){value[symToStringTag]=tag}else{delete value[symToStringTag]}}return result}var objectProto$1=Object.prototype;var nativeObjectToString$1=objectProto$1.toString;function objectToString(value){return nativeObjectToString$1.call(value)}var nullTag="[object Null]",undefinedTag="[object Undefined]";var symToStringTag$1=Symbol?Symbol.toStringTag:undefined;function baseGetTag(value){if(value==null){return value===undefined?undefinedTag:nullTag}return symToStringTag$1&&symToStringTag$1 in Object(value)?getRawTag(value):objectToString(value)}function isObjectLike(value){return value!=null&&typeof value=="object"}var isArray=Array.isArray;function isObject(value){var type=typeof value;return value!=null&&(type=="object"||type=="function")}function identity(value){return value}var asyncTag="[object AsyncFunction]",funcTag="[object Function]",genTag="[object GeneratorFunction]",proxyTag="[object Proxy]";function isFunction(value){if(!isObject(value)){return false}var tag=baseGetTag(value);return tag==funcTag||tag==genTag||tag==asyncTag||tag==proxyTag}var coreJsData=root["__core-js_shared__"];var maskSrcKey=function(){var uid=/[^.]+$/.exec(coreJsData&&coreJsData.keys&&coreJsData.keys.IE_PROTO||"");return uid?"Symbol(src)_1."+uid:""}();function isMasked(func){return!!maskSrcKey&&maskSrcKey in func}var funcProto=Function.prototype;var funcToString=funcProto.toString;function toSource(func){if(func!=null){try{return funcToString.call(func)}catch(e){}try{return func+""}catch(e){}}return""}var reRegExpChar=/[\\\\^$.*+?()[\\]{}|]/g;var reIsHostCtor=/^\\[object .+?Constructor\\]$/;var funcProto$1=Function.prototype,objectProto$2=Object.prototype;var funcToString$1=funcProto$1.toString;var hasOwnProperty$1=objectProto$2.hasOwnProperty;var reIsNative=RegExp("^"+funcToString$1.call(hasOwnProperty$1).replace(reRegExpChar,"\\\\$&").replace(/hasOwnProperty|(function).*?(?=\\\\\\()| for .+?(?=\\\\\\])/g,"$1.*?")+"$");function baseIsNative(value){if(!isObject(value)||isMasked(value)){return false}var pattern=isFunction(value)?reIsNative:reIsHostCtor;return pattern.test(toSource(value))}function getValue(object,key){return object==null?undefined:object[key]}function getNative(object,key){var value=getValue(object,key);return baseIsNative(value)?value:undefined}function apply(func,thisArg,args){switch(args.length){case 0:return func.call(thisArg);case 1:return func.call(thisArg,args[0]);case 2:return func.call(thisArg,args[0],args[1]);case 3:return func.call(thisArg,args[0],args[1],args[2])}return func.apply(thisArg,args)}var HOT_COUNT=800,HOT_SPAN=16;var nativeNow=Date.now;function shortOut(func){var count=0,lastCalled=0;return function(){var stamp=nativeNow(),remaining=HOT_SPAN-(stamp-lastCalled);lastCalled=stamp;if(remaining>0){if(++count>=HOT_COUNT){return arguments[0]}}else{count=0}return func.apply(undefined,arguments)}}function constant(value){return function(){return value}}var defineProperty=function(){try{var func=getNative(Object,"defineProperty");func({},"",{});return func}catch(e){}}();var baseSetToString=!defineProperty?identity:function(func,string){return defineProperty(func,"toString",{configurable:true,enumerable:false,value:constant(string),writable:true})};var setToString=shortOut(baseSetToString);var MAX_SAFE_INTEGER=9007199254740991;var reIsUint=/^(?:0|[1-9]\\d*)$/;function isIndex(value,length){var type=typeof value;length=length==null?MAX_SAFE_INTEGER:length;return!!length&&(type=="number"||type!="symbol"&&reIsUint.test(value))&&(value>-1&&value%1==0&&value-1&&value%1==0&&value<=MAX_SAFE_INTEGER$1}function isArrayLike(value){return value!=null&&isLength(value.length)&&!isFunction(value)}function isIterateeCall(value,index,object){if(!isObject(object)){return false}var type=typeof index;if(type=="number"?isArrayLike(object)&&isIndex(index,object.length):type=="string"&&index in object){return eq(object[index],value)}return false}function createAssigner(assigner){return baseRest(function(object,sources){var index=-1,length=sources.length,customizer=length>1?sources[length-1]:undefined,guard=length>2?sources[2]:undefined;customizer=assigner.length>3&&typeof customizer=="function"?(length--,customizer):undefined;if(guard&&isIterateeCall(sources[0],sources[1],guard)){customizer=length<3?undefined:customizer;length=1}object=Object(object);while(++index0){for(var i=0;i\\n

"+layerInfo.name+"

\\n ";this._layerData.base.push({layerInfo:layerInfo,container:div})};MapType.prototype._addOverlayDiv=function(layerInfo){var div=AMap.DomUtil.create("li",this._container,"amap-ui-ctrl-layer-overlay-item");this._layerOverlayList.appendChild(div);div.innerHTML="\\n \\n

"+layerInfo.name+"

\\n ";this._layerData.overlay.push({layerInfo:layerInfo,container:div})};return MapType}(AMap.Control);AMap["MapType"]=MapType})(); ');_jsload_('AMap.MouseTool', '(function(){"use strict";var extendStatics=function(d,b){extendStatics=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(d,b){d.__proto__=b}||function(d,b){for(var p in b)if(b.hasOwnProperty(p))d[p]=b[p]};return extendStatics(d,b)};function __extends(d,b){extendStatics(d,b);function __(){this.constructor=d}d.prototype=b===null?Object.create(b):(__.prototype=b.prototype,new __)}var freeGlobal=typeof global=="object"&&global&&global.Object===Object&&global;var freeSelf=typeof self=="object"&&self&&self.Object===Object&&self;var root=freeGlobal||freeSelf||Function("return this")();var Symbol=root.Symbol;var objectProto=Object.prototype;var hasOwnProperty=objectProto.hasOwnProperty;var nativeObjectToString=objectProto.toString;var symToStringTag=Symbol?Symbol.toStringTag:undefined;function getRawTag(value){var isOwn=hasOwnProperty.call(value,symToStringTag),tag=value[symToStringTag];try{value[symToStringTag]=undefined;var unmasked=true}catch(e){}var result=nativeObjectToString.call(value);if(unmasked){if(isOwn){value[symToStringTag]=tag}else{delete value[symToStringTag]}}return result}var objectProto$1=Object.prototype;var nativeObjectToString$1=objectProto$1.toString;function objectToString(value){return nativeObjectToString$1.call(value)}var nullTag="[object Null]",undefinedTag="[object Undefined]";var symToStringTag$1=Symbol?Symbol.toStringTag:undefined;function baseGetTag(value){if(value==null){return value===undefined?undefinedTag:nullTag}return symToStringTag$1&&symToStringTag$1 in Object(value)?getRawTag(value):objectToString(value)}function isObjectLike(value){return value!=null&&typeof value=="object"}var isArray=Array.isArray;function isObject(value){var type=typeof value;return value!=null&&(type=="object"||type=="function")}function identity(value){return value}var asyncTag="[object AsyncFunction]",funcTag="[object Function]",genTag="[object GeneratorFunction]",proxyTag="[object Proxy]";function isFunction(value){if(!isObject(value)){return false}var tag=baseGetTag(value);return tag==funcTag||tag==genTag||tag==asyncTag||tag==proxyTag}var coreJsData=root["__core-js_shared__"];var maskSrcKey=function(){var uid=/[^.]+$/.exec(coreJsData&&coreJsData.keys&&coreJsData.keys.IE_PROTO||"");return uid?"Symbol(src)_1."+uid:""}();function isMasked(func){return!!maskSrcKey&&maskSrcKey in func}var funcProto=Function.prototype;var funcToString=funcProto.toString;function toSource(func){if(func!=null){try{return funcToString.call(func)}catch(e){}try{return func+""}catch(e){}}return""}var reRegExpChar=/[\\\\^$.*+?()[\\]{}|]/g;var reIsHostCtor=/^\\[object .+?Constructor\\]$/;var funcProto$1=Function.prototype,objectProto$2=Object.prototype;var funcToString$1=funcProto$1.toString;var hasOwnProperty$1=objectProto$2.hasOwnProperty;var reIsNative=RegExp("^"+funcToString$1.call(hasOwnProperty$1).replace(reRegExpChar,"\\\\$&").replace(/hasOwnProperty|(function).*?(?=\\\\\\()| for .+?(?=\\\\\\])/g,"$1.*?")+"$");function baseIsNative(value){if(!isObject(value)||isMasked(value)){return false}var pattern=isFunction(value)?reIsNative:reIsHostCtor;return pattern.test(toSource(value))}function getValue(object,key){return object==null?undefined:object[key]}function getNative(object,key){var value=getValue(object,key);return baseIsNative(value)?value:undefined}function apply(func,thisArg,args){switch(args.length){case 0:return func.call(thisArg);case 1:return func.call(thisArg,args[0]);case 2:return func.call(thisArg,args[0],args[1]);case 3:return func.call(thisArg,args[0],args[1],args[2])}return func.apply(thisArg,args)}var HOT_COUNT=800,HOT_SPAN=16;var nativeNow=Date.now;function shortOut(func){var count=0,lastCalled=0;return function(){var stamp=nativeNow(),remaining=HOT_SPAN-(stamp-lastCalled);lastCalled=stamp;if(remaining>0){if(++count>=HOT_COUNT){return arguments[0]}}else{count=0}return func.apply(undefined,arguments)}}function constant(value){return function(){return value}}var defineProperty=function(){try{var func=getNative(Object,"defineProperty");func({},"",{});return func}catch(e){}}();var baseSetToString=!defineProperty?identity:function(func,string){return defineProperty(func,"toString",{configurable:true,enumerable:false,value:constant(string),writable:true})};var setToString=shortOut(baseSetToString);var MAX_SAFE_INTEGER=9007199254740991;var reIsUint=/^(?:0|[1-9]\\d*)$/;function isIndex(value,length){var type=typeof value;length=length==null?MAX_SAFE_INTEGER:length;return!!length&&(type=="number"||type!="symbol"&&reIsUint.test(value))&&(value>-1&&value%1==0&&value-1&&value%1==0&&value<=MAX_SAFE_INTEGER$1}function isArrayLike(value){return value!=null&&isLength(value.length)&&!isFunction(value)}function isIterateeCall(value,index,object){if(!isObject(object)){return false}var type=typeof index;if(type=="number"?isArrayLike(object)&&isIndex(index,object.length):type=="string"&&index in object){return eq(object[index],value)}return false}function createAssigner(assigner){return baseRest(function(object,sources){var index=-1,length=sources.length,customizer=length>1?sources[length-1]:undefined,guard=length>2?sources[2]:undefined;customizer=assigner.length>3&&typeof customizer=="function"?(length--,customizer):undefined;if(guard&&isIterateeCall(sources[0],sources[1],guard)){customizer=length<3?undefined:customizer;length=1}object=Object(object);while(++index3){pathArr.pop();this.MeasureAreaTemp.obj["setPath"](pathArr);var area=this.MeasureAreaTemp.obj["getArea"]();var areaHTML=area>1*1e5?(area*1e-6).toFixed(2)+"平方公里":area.toFixed(1)+"平方米";var lastPoint=pathArr[pathArr.length-1];var text=new AMap.Text({text:areaHTML,position:lastPoint});this.overlays.measureArea.push(text);this._map.add(text);this.overlays.measureArea.push(this.MeasureAreaTemp["obj"]);this.emit("draw",{obj:this.MeasureAreaTemp.obj});this.MeasureAreaTemp=null}else{if(this.MeasureAreaTemp){this._map.remove(this.MeasureAreaTemp.obj)}this.MeasureAreaTemp=null}this.emit("cancel",{obj:this.MeasureAreaTemp&&this.MeasureAreaTemp.obj||false});this._map.off("mousemove",this._drawMeasureArea,this)};MouseTool.prototype._addPolygonPoint=function(opts,e){this.mapDoubleClickZoom=this._map["getStatus"]()["doubleClickZoom"];this._map["setStatus"]({doubleClickZoom:false});if(this.overlayBubble){var curOverlays=this._map.getAllOverlays();if(curOverlays&&curOverlays.length>0){for(var _i=0,curOverlays_1=curOverlays;_i0){for(var _i=0,curOverlays_2=curOverlays;_i0){for(var _i=0,curOverlays_3=curOverlays;_i0){for(var _i=0,curOverlays_4=curOverlays;_i0){for(var _i=0,curOverlays_5=curOverlays;_i2&&arguments[2]!==undefined?arguments[2]:{};_classCallCheck(this,Point);_this=_super.call(this);_this.map=map;_this.pos=pos;_this._markerOptions={draggable:true,radius:AMap.Browser.mobile?6:6,strokeColor:"#1791fc",strokeWeight:AMap.Browser.mobile?6:2,strokeOpacity:AMap.Browser.mobile?.4:1,fillColor:"white",fillOpacity:1,cursor:"pointer",visible:false,zIndex:99999,innerOverlay:true};_this._middleMarkerOptions={draggable:true,radius:6,strokeColor:"white",strokeWeight:AMap.Browser.mobile?6:2,strokeOpacity:AMap.Browser.mobile?.6:1,fillColor:"#1791fc",fillOpacity:1,cursor:"pointer",visible:false,zIndex:99999};if(opts.controlPoint){_this._markerOptions=AMap.extend(_this._markerOptions,opts.controlPoint)}if(opts.controlPoint){_this._middleMarkerOptions=AMap.extend(_this._middleMarkerOptions,opts.midControlPoint)}_this.init();_this.hide();return _this}_createClass(Point,[{key:"init",value:function init(){this.marker=new AMap.CircleMarker(AMap.extend({map:this.map,center:this.pos},this._markerOptions))}},{key:"show",value:function show(){this.marker.show()}},{key:"hide",value:function hide(){this.marker.hide()}},{key:"remove",value:function remove(){this.marker.remove()}},{key:"setMiddle",value:function setMiddle(middle){this.marker.setOptions(middle?this._middleMarkerOptions:this._markerOptions)}}]);return Point}(AMap.Event);var PointWithMarker=function(_AMap$Event2){_inherits(PointWithMarker,_AMap$Event2);var _super2=_createSuper(PointWithMarker);function PointWithMarker(map,pos){var _this2;var controlPoint=arguments.length>2&&arguments[2]!==undefined?arguments[2]:{draggable:true,icon:new AMap.Icon({size:new AMap.Size(11,11),imageOffset:new AMap.Pixel(0,0),image:AMap.getConfig().client+"/images/dd-via.png"}),offset:new AMap.Pixel(-6,-6),cursor:"pointer",zIndex:1e3};_classCallCheck(this,PointWithMarker);_this2=_super2.call(this);_this2.map=map;_this2.pos=pos;_this2.controlPoint=controlPoint;_this2.init();_this2.hide();return _this2}_createClass(PointWithMarker,[{key:"init",value:function init(){this.marker=new AMap.Marker(AMap.extend({map:this.map,position:this.pos,draggable:true,cursor:"pointer",zIndex:1e3,innerOverlay:true},this.controlPoint))}},{key:"show",value:function show(){this.marker.show()}},{key:"hide",value:function hide(){this.marker.hide()}},{key:"remove",value:function remove(){this.marker.remove()}}]);return PointWithMarker}(AMap.Event);var CirlePoint=function(_AMap$Event){_inherits(CirlePoint,_AMap$Event);var _super=_createSuper(CirlePoint);function CirlePoint(map,circle){var _this;var opts=arguments.length>2&&arguments[2]!==undefined?arguments[2]:{};_classCallCheck(this,CirlePoint);_this=_super.call(this);_this.map=map;_this.circle=circle;var center=circle.getCenter();var radius=circle.getRadius();var isMobile=AMap.Browser.mobile;_this.movePoint=new PointWithMarker(map,center.toJSON(),opts.movePoint||{content:\'
\',offset:isMobile?new AMap.Pixel(-13,-13):new AMap.Pixel(-8,-8)});var movePos=center.offset(radius,0);_this.resizePoint=new PointWithMarker(map,movePos,opts.resizePoint||{content:\'
\',offset:isMobile?new AMap.Pixel(-13,-13):new AMap.Pixel(-8,-8)});_this.bindEvent();return _this}_createClass(CirlePoint,[{key:"bindEvent",value:function bindEvent(){this.movePoint.marker.on("dragging",this._handleMovePointDragging.bind(this));this.resizePoint.marker.on("dragging",this._handleResizePointDragging.bind(this));this.movePoint.marker.on("dragend",this._handleMovePointDragend.bind(this));this.resizePoint.marker.on("dragend",this._handleResizePointDragend.bind(this))}},{key:"unbindEvent",value:function unbindEvent(){this.movePoint.marker.off("dragging",this._handleMovePointDragging.bind(this));this.resizePoint.marker.off("dragging",this._handleResizePointDragging.bind(this));this.movePoint.marker.off("dragend",this._handleMovePointDragend.bind(this));this.resizePoint.marker.off("dragend",this._handleResizePointDragend.bind(this))}},{key:"show",value:function show(){this.movePoint.show();this.resizePoint.show();this._updateText();this._updateText()}},{key:"hide",value:function hide(){this.movePoint.hide();this.resizePoint.hide()}},{key:"destroy",value:function destroy(){this.unbindEvent();this.movePoint.remove();this.resizePoint.remove()}},{key:"getBounds",value:function getBounds(){return new AMap.Bounds(this.movePoint.marker.getPosition(),this.resizePoint.marker.getPosition())}},{key:"_updateText",value:function _updateText(){var radius=this.circle.getRadius();this.resizePoint.marker.setLabel({content:"半径:".concat(radius,"米")})}},{key:"_handleMovePointDragging",value:function _handleMovePointDragging(){var pos=this.movePoint.marker.getPosition();var resizePos=this.resizePoint.marker.getPosition();var circleCenter=this.circle.getCenter();if(!pos||!resizePos){return}var newPos=pos.add(resizePos.subtract(circleCenter,false),false);this.resizePoint.marker.setPosition(newPos.toJSON());this.circle.setCenter(pos);this._updateText();this.emit(ListEvent.change)}},{key:"_handleResizePointDragging",value:function _handleResizePointDragging(){var moveLatLng=this.circle["getCenter"]();var resizeLatlng=this.resizePoint.marker.getPosition();var radius=Math.round(AMap.GeometryUtil.distance(moveLatLng,resizeLatlng));this.circle.setRadius(radius);this._updateText();this.emit(ListEvent.change)}},{key:"_handleResizePointDragend",value:function _handleResizePointDragend(event){var radius=this.circle.getRadius();this.emit(ListEvent.adjust,{radius:radius,lnglat:event.lnglat,pixel:event.pixel})}},{key:"_handleMovePointDragend",value:function _handleMovePointDragend(event){this.emit(ListEvent.move,event)}}]);return CirlePoint}(AMap.Event);function _typeof$1(obj){if(typeof Symbol==="function"&&_typeof(Symbol.iterator)==="symbol"){_typeof$1=function _typeof$1(obj){return _typeof(obj)}}else{_typeof$1=function _typeof$1(obj){return obj&&typeof Symbol==="function"&&obj.constructor===Symbol&&obj!==Symbol.prototype?"symbol":_typeof(obj)}}return _typeof$1(obj)}function boundMethod(target,key,descriptor){var fn=descriptor.value;if(typeof fn!=="function"){throw new TypeError("@boundMethod decorator can only be applied to methods not: ".concat(_typeof$1(fn)))}var definingProperty=false;return{configurable:true,get:function get(){if(definingProperty||this===target.prototype||this.hasOwnProperty(key)||typeof fn!=="function"){return fn}var boundFn=fn.bind(this);definingProperty=true;Object.defineProperty(this,key,{configurable:true,get:function get(){return boundFn},set:function set(value){fn=value;delete this[key]}});definingProperty=false;return boundFn},set:function set(value){fn=value}}}function boundClass(target){var keys;if(typeof Reflect!=="undefined"&&typeof Reflect.ownKeys==="function"){keys=Reflect.ownKeys(target.prototype)}else{keys=Object.getOwnPropertyNames(target.prototype);if(typeof Object.getOwnPropertySymbols==="function"){keys=keys.concat(Object.getOwnPropertySymbols(target.prototype))}}keys.forEach(function(key){if(key==="constructor"){return}var descriptor=Object.getOwnPropertyDescriptor(target.prototype,key);if(typeof descriptor.value==="function"){Object.defineProperty(target.prototype,key,boundMethod(target,key,descriptor))}});return target}function autobind(){if(arguments.length===1){return boundClass.apply(void 0,arguments)}return boundMethod.apply(void 0,arguments)}var __decorate=undefined&&undefined.__decorate||function(decorators,target,key,desc){var c=arguments.length,r=c<3?target:desc===null?desc=Object.getOwnPropertyDescriptor(target,key):desc,d;if((typeof Reflect==="undefined"?"undefined":_typeof(Reflect))==="object"&&typeof Reflect.decorate==="function")r=Reflect.decorate(decorators,target,key,desc);else for(var i=decorators.length-1;i>=0;i--){if(d=decorators[i])r=(c<3?d(r):c>3?d(target,key,r):d(target,key))||r}return c>3&&r&&Object.defineProperty(target,key,r),r};var BaseEditor=function(_AMap$Event){_inherits(BaseEditor,_AMap$Event);var _super=_createSuper(BaseEditor);function BaseEditor(_map,_poly){var _this;_classCallCheck(this,BaseEditor);_this=_super.call(this);_this._map=_map;_this.className="AMap.BaseEditor";_this._editing=false;_this._poly=_poly;return _this}_createClass(BaseEditor,[{key:"setTarget",value:function setTarget(overlay){this.close();if(this._poly&&this._poly!==overlay){this.destroy()}if(overlay){this._poly=overlay}}},{key:"getTarget",value:function getTarget(){return this._poly}},{key:"bindListEvent",value:function bindListEvent(){if(this.list){this.list.on(ListEvent.addNode,this.handleAddNode);this.list.on(ListEvent.adjust,this.handleAdjust);this.list.on(ListEvent.change,this.handleChange);this.list.on(ListEvent.move,this.handleMove)}}},{key:"unbindListEvent",value:function unbindListEvent(){if(this.list){this.list.off(ListEvent.addNode,this.handleAddNode);this.list.off(ListEvent.adjust,this.handleAdjust);this.list.off(ListEvent.change,this.handleChange);this.list.off(ListEvent.move,this.handleMove)}}},{key:"handleChange",value:function handleChange(){}},{key:"handleMove",value:function handleMove(event){this.emit(ListEvent.move,{target:this.getTarget(),lnglat:event.lnglat,pixel:event.pixel})}},{key:"handleAddNode",value:function handleAddNode(event){this.emit(ListEvent.addNode,event)}},{key:"handleRemoveNode",value:function handleRemoveNode(){}},{key:"handleAdjust",value:function handleAdjust(event){this.emit(ListEvent.adjust,AMap.extend({},event,{target:this.getTarget()}))}},{key:"open",value:function open(){if(this._poly&&!this._editing){this._editing=true;this.initList();this._openEdit()}else{this._creator.open()}if(!this._poly||!this.list){return}}},{key:"_openEdit",value:function _openEdit(){if(!this.list||!this._poly){return}this.list.show();this._saveCustomStyle();this._poly.setOptions(this._editStyle?this._editStyle:{})}},{key:"_saveCustomStyle",value:function _saveCustomStyle(){if(!this._poly){return}this._customStyle=AMap.extend({},this._poly.getOptions());delete this._customStyle.map;delete this._customStyle.center;delete this._customStyle.radius;delete this._customStyle.path;delete this._customStyle.bounds}},{key:"close",value:function close(){this._editing=false;if(!this._poly){return}if(!this.list){return}this.list.hide();this._poly.setOptions(this._customStyle);this.emit(ListEvent.end,{target:this.getTarget()})}},{key:"destroy",value:function destroy(){if(this.list){this.unbindListEvent();this.list.destroy();delete this.list}delete this._poly}},{key:"CLASS_NAME",get:function get(){return this.className}}]);return BaseEditor}(AMap.Event);__decorate([autobind],BaseEditor.prototype,"handleChange",null);__decorate([autobind],BaseEditor.prototype,"handleMove",null);__decorate([autobind],BaseEditor.prototype,"handleAddNode",null);__decorate([autobind],BaseEditor.prototype,"handleRemoveNode",null);__decorate([autobind],BaseEditor.prototype,"handleAdjust",null);var __decorate$1=undefined&&undefined.__decorate||function(decorators,target,key,desc){var c=arguments.length,r=c<3?target:desc===null?desc=Object.getOwnPropertyDescriptor(target,key):desc,d;if((typeof Reflect==="undefined"?"undefined":_typeof(Reflect))==="object"&&typeof Reflect.decorate==="function")r=Reflect.decorate(decorators,target,key,desc);else for(var i=decorators.length-1;i>=0;i--){if(d=decorators[i])r=(c<3?d(r):c>3?d(target,key,r):d(target,key))||r}return c>3&&r&&Object.defineProperty(target,key,r),r};var CirclrCreator=function(_AMap$Event){_inherits(CirclrCreator,_AMap$Event);var _super=_createSuper(CirclrCreator);function CirclrCreator(_map){var _this;_classCallCheck(this,CirclrCreator);_this=_super.call(this);_this._map=_map;return _this}_createClass(CirclrCreator,[{key:"open",value:function open(){this._map.on("click",this._onMapClick)}},{key:"close",value:function close(){this._map.off("click",this._onMapClick)}},{key:"_onMapClick",value:function _onMapClick(e){var center=e.lnglat.toJSON();var radius=this._map.getResolution()*60;this.emit("create",{center:center,radius:radius});this.close()}}]);return CirclrCreator}(AMap.Event);__decorate$1([autobind],CirclrCreator.prototype,"_onMapClick",null);var CircleEditor=function(_BaseEditor){_inherits(CircleEditor,_BaseEditor);var _super2=_createSuper(CircleEditor);function CircleEditor(map,_poly){var _this2;var opts=arguments.length>2&&arguments[2]!==undefined?arguments[2]:{};_classCallCheck(this,CircleEditor);_this2=_super2.call(this,map,_poly);_this2.className="AMap.CircleEditor";_this2._normalCircleStyle={draggbable:true,strokeColor:"#FF33FF",strokeWeight:3,strokeOpacity:.2,fillOpacity:.4,strokeStyle:"dashed",strokeDasharray:[10,10],fillColor:"#1791fc",zIndex:50};_this2._editStyle={strokeColor:"#1791fc",strokeWeight:3,strokeOpacity:.8,fillOpacity:.4,strokeStyle:"solid",strokeDasharray:[10,10],fillColor:"#1791fc",draggable:false};_this2._opts=opts;_this2._normalCircleStyle=AMap.extend(_this2._normalCircleStyle,opts.createOptions||{});_this2._editStyle=AMap.extend(_this2._editStyle,opts.editOptions||{});_this2._creator=new CirclrCreator(map);_this2._creator.on("create",function(data){_this2._creator.close();var poly=new AMap.Circle(AMap.extend({map:_this2._map,center:data.center,radius:data.radius},_this2._normalCircleStyle));_this2.setTarget(poly);_this2.open();_this2.emit(ListEvent.add,{target:_this2.getTarget(),obj:poly})});return _this2}_createClass(CircleEditor,[{key:"initList",value:function initList(){if(!this._poly){return}if(!this.list){this.list=new CirlePoint(this._map,this._poly,this._opts)}this.bindListEvent()}}]);return CircleEditor}(BaseEditor);AMap.CircleEditor=CircleEditor}(window.AMap); ');_jsload_('AMap.PolygonEditor', '!function(AMap){"use strict";function _iterableToArrayLimit(arr,i){var _i=null==arr?null:"undefined"!=typeof Symbol&&arr[Symbol.iterator]||arr["@@iterator"];if(null!=_i){var _s,_e,_x,_r,_arr=[],_n=!0,_d=!1;try{if(_x=(_i=_i.call(arr)).next,0===i){if(Object(_i)!==_i)return;_n=!1}else for(;!(_n=(_s=_x.call(_i)).done)&&(_arr.push(_s.value),_arr.length!==i);_n=!0);}catch(err){_d=!0,_e=err}finally{try{if(!_n&&null!=_i.return&&(_r=_i.return(),Object(_r)!==_r))return}finally{if(_d)throw _e}}return _arr}}function _typeof(obj){"@babel/helpers - typeof";return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(obj){return typeof obj}:function(obj){return obj&&"function"==typeof Symbol&&obj.constructor===Symbol&&obj!==Symbol.prototype?"symbol":typeof obj},_typeof(obj)}function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError("Cannot call a class as a function")}}function _defineProperties(target,props){for(var i=0;iarr.length)len=arr.length;for(var i=0,arr2=new Array(len);i=o.length)return{done:true};return{done:false,value:o[i++]}},e:function(e){throw e},f:F}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var normalCompletion=true,didErr=false,err;return{s:function(){it=it.call(o)},n:function(){var step=it.next();normalCompletion=step.done;return step},e:function(e){didErr=true;err=e},f:function(){try{if(!normalCompletion&&it.return!=null)it.return()}finally{if(didErr)throw err}}}}function _toPrimitive(input,hint){if(typeof input!=="object"||input===null)return input;var prim=input[Symbol.toPrimitive];if(prim!==undefined){var res=prim.call(input,hint||"default");if(typeof res!=="object")return res;throw new TypeError("@@toPrimitive must return a primitive value.")}return(hint==="string"?String:Number)(input)}function _toPropertyKey(arg){var key=_toPrimitive(arg,"string");return typeof key==="symbol"?key:String(key)}function getNearestPoint(pt,pts){var nearest=null;pts.forEach(function(p,i){var lngDiff=p[0]-pt[0];var latDiff=p[1]-pt[1];var l=Math.sqrt(Math.pow(lngDiff,2)+Math.pow(latDiff,2));var cur={distance:l,point:p,index:i};if(nearest){if(nearest.distance>l){nearest=cur}}else{nearest=cur}});return nearest}function getPixelDistance(_map,_ref){var _ref2=_slicedToArray(_ref,2),p1=_ref2[0],p2=_ref2[1];var toPixel=function toPixel(p){var lnglat=new AMap.LngLat(p[0],p[1]);return _map.lngLatToContainer(lnglat)};var pixel1=toPixel(p1);var pixel2=toPixel(p2);var xDiff=pixel1.x-pixel2.x;var yDiff=pixel1.y-pixel2.y;var l=Math.sqrt(Math.pow(xDiff,2)+Math.pow(yDiff,2));return l}function e2ll(e){if(e&&e.lnglat){return e.lnglat}return null}function getPolygonOptions(opt){return{path:opt["path"],map:opt["map"],strokeColor:opt["strokeColor"]||"#1791fc",strokeOpacity:opt["strokeOpacity"]||.8,strokeWeight:opt["strokeWeight"]||2,fillColor:opt["fillColor"]||"#1791fc",fillOpacity:opt["fillOpacity"]||.35,strokeStyle:opt["strokeStyle"]||"solid",strokeDasharray:opt["strokeDasharray"]||[10,5],zIndex:opt["zIndex"]||10,extData:opt["extData"]||{},bubble:!!opt["bubble"]}}function createPolygon(path,opt){var _opt=AMap.extend({},getPolygonOptions(opt),{path:path});var p=new AMap.Polygon(_opt);if(_opt["map"]){_opt["map"].add(p)}return p}var earthRadius=6371008.8;var factors={centimeters:earthRadius*100,centimetres:earthRadius*100,degrees:earthRadius/111325,feet:earthRadius*3.28084,inches:earthRadius*39.37,kilometers:earthRadius/1e3,kilometres:earthRadius/1e3,meters:earthRadius,metres:earthRadius,miles:earthRadius/1609.344,millimeters:earthRadius*1e3,millimetres:earthRadius*1e3,nauticalmiles:earthRadius/1852,radians:1,yards:earthRadius*1.0936};var unitsFactors={centimeters:100,centimetres:100,degrees:1/111325,feet:3.28084,inches:39.37,kilometers:1/1e3,kilometres:1/1e3,meters:1,metres:1,miles:1/1609.344,millimeters:1e3,millimetres:1e3,nauticalmiles:1/1852,radians:1/earthRadius,yards:1.0936133};var areaFactors={acres:247105e-9,centimeters:1e4,centimetres:1e4,feet:10.763910417,hectares:1e-4,inches:1550.003100006,kilometers:1e-6,kilometres:1e-6,meters:1,metres:1,miles:386e-9,millimeters:1e6,millimetres:1e6,yards:1.195990046};function feature(geom,properties,options){if(options===void 0){options={}}var feat={type:"Feature"};if(options.id===0||options.id){feat.id=options.id}if(options.bbox){feat.bbox=options.bbox}feat.properties=properties||{};feat.geometry=geom;return feat}function geometry(type,coordinates,_options){switch(type){case"Point":return point(coordinates).geometry;case"LineString":return lineString(coordinates).geometry;case"Polygon":return polygon(coordinates).geometry;case"MultiPoint":return multiPoint(coordinates).geometry;case"MultiLineString":return multiLineString(coordinates).geometry;case"MultiPolygon":return multiPolygon(coordinates).geometry;default:throw new Error(type+" is invalid")}}function point(coordinates,properties,options){if(options===void 0){options={}}if(!coordinates){throw new Error("coordinates is required")}if(!Array.isArray(coordinates)){throw new Error("coordinates must be an Array")}if(coordinates.length<2){throw new Error("coordinates must be at least 2 numbers long")}if(!isNumber(coordinates[0])||!isNumber(coordinates[1])){throw new Error("coordinates must contain numbers")}var geom={type:"Point",coordinates:coordinates};return feature(geom,properties,options)}function points(coordinates,properties,options){if(options===void 0){options={}}return featureCollection(coordinates.map(function(coords){return point(coords,properties)}),options)}function polygon(coordinates,properties,options){if(options===void 0){options={}}for(var _i=0,coordinates_1=coordinates;_i=0)){throw new Error("precision must be a positive number")}var multiplier=Math.pow(10,precision||0);return Math.round(num*multiplier)/multiplier}function radiansToLength(radians,units){if(units===void 0){units="kilometers"}var factor=factors[units];if(!factor){throw new Error(units+" units is invalid")}return radians*factor}function lengthToRadians(distance,units){if(units===void 0){units="kilometers"}var factor=factors[units];if(!factor){throw new Error(units+" units is invalid")}return distance/factor}function lengthToDegrees(distance,units){return radiansToDegrees(lengthToRadians(distance,units))}function bearingToAzimuth(bearing){var angle=bearing%360;if(angle<0){angle+=360}return angle}function radiansToDegrees(radians){var degrees=radians%(2*Math.PI);return degrees*180/Math.PI}function degreesToRadians(degrees){var radians=degrees%360;return radians*Math.PI/180}function convertLength(length,originalUnit,finalUnit){if(originalUnit===void 0){originalUnit="kilometers"}if(finalUnit===void 0){finalUnit="kilometers"}if(!(length>=0)){throw new Error("length must be a positive number")}return radiansToLength(lengthToRadians(length,originalUnit),finalUnit)}function convertArea(area,originalUnit,finalUnit){if(originalUnit===void 0){originalUnit="meters"}if(finalUnit===void 0){finalUnit="kilometers"}if(!(area>=0)){throw new Error("area must be a positive number")}var startFactor=areaFactors[originalUnit];if(!startFactor){throw new Error("invalid original units")}var finalFactor=areaFactors[finalUnit];if(!finalFactor){throw new Error("invalid final units")}return area/startFactor*finalFactor}function isNumber(num){return!isNaN(num)&&num!==null&&!Array.isArray(num)}function isObject(input){return!!input&&input.constructor===Object}function validateBBox(bbox){if(!bbox){throw new Error("bbox is required")}if(!Array.isArray(bbox)){throw new Error("bbox must be an Array")}if(bbox.length!==4&&bbox.length!==6){throw new Error("bbox must be an Array of 4 or 6 numbers")}bbox.forEach(function(num){if(!isNumber(num)){throw new Error("bbox must only contain numbers")}})}function validateId(id){if(!id){throw new Error("id is required")}if(["string","number"].indexOf(_typeof(id))===-1){throw new Error("id must be a number or a string")}}var es=Object.freeze({__proto__:null,earthRadius:earthRadius,factors:factors,unitsFactors:unitsFactors,areaFactors:areaFactors,feature:feature,geometry:geometry,point:point,points:points,polygon:polygon,polygons:polygons,lineString:lineString,lineStrings:lineStrings,featureCollection:featureCollection,multiLineString:multiLineString,multiPoint:multiPoint,multiPolygon:multiPolygon,geometryCollection:geometryCollection,round:round,radiansToLength:radiansToLength,lengthToRadians:lengthToRadians,lengthToDegrees:lengthToDegrees,bearingToAzimuth:bearingToAzimuth,radiansToDegrees:radiansToDegrees,degreesToRadians:degreesToRadians,convertLength:convertLength,convertArea:convertArea,isNumber:isNumber,isObject:isObject,validateBBox:validateBBox,validateId:validateId});function getCoord(coord){if(!coord){throw new Error("coord is required")}if(!Array.isArray(coord)){if(coord.type==="Feature"&&coord.geometry!==null&&coord.geometry.type==="Point"){return coord.geometry.coordinates}if(coord.type==="Point"){return coord.coordinates}}if(Array.isArray(coord)&&coord.length>=2&&!Array.isArray(coord[0])&&!Array.isArray(coord[1])){return coord}throw new Error("coord must be GeoJSON Point or an Array of numbers")}function getCoords(coords){if(Array.isArray(coords)){return coords}if(coords.type==="Feature"){if(coords.geometry!==null){return coords.geometry.coordinates}}else{if(coords.coordinates){return coords.coordinates}}throw new Error("coords must be GeoJSON Feature, Geometry Object or an Array")}function bearing(start,end,options){if(options===void 0){options={}}if(options.final===true){return calculateFinalBearing(start,end)}var coordinates1=getCoord(start);var coordinates2=getCoord(end);var lon1=degreesToRadians(coordinates1[0]);var lon2=degreesToRadians(coordinates2[0]);var lat1=degreesToRadians(coordinates1[1]);var lat2=degreesToRadians(coordinates2[1]);var a=Math.sin(lon2-lon1)*Math.cos(lat2);var b=Math.cos(lat1)*Math.sin(lat2)-Math.sin(lat1)*Math.cos(lat2)*Math.cos(lon2-lon1);return radiansToDegrees(Math.atan2(a,b))}function calculateFinalBearing(start,end){var bear=bearing(end,start);bear=(bear+180)%360;return bear}function distance(from,to,options){if(options===void 0){options={}}var coordinates1=getCoord(from);var coordinates2=getCoord(to);var dLat=degreesToRadians(coordinates2[1]-coordinates1[1]);var dLon=degreesToRadians(coordinates2[0]-coordinates1[0]);var lat1=degreesToRadians(coordinates1[1]);var lat2=degreesToRadians(coordinates2[1]);var a=Math.pow(Math.sin(dLat/2),2)+Math.pow(Math.sin(dLon/2),2)*Math.cos(lat1)*Math.cos(lat2);return radiansToLength(2*Math.atan2(Math.sqrt(a),Math.sqrt(1-a)),options.units)}function destination(origin,distance,bearing,options){if(options===void 0){options={}}var coordinates1=getCoord(origin);var longitude1=degreesToRadians(coordinates1[0]);var latitude1=degreesToRadians(coordinates1[1]);var bearingRad=degreesToRadians(bearing);var radians=lengthToRadians(distance,options.units);var latitude2=Math.asin(Math.sin(latitude1)*Math.cos(radians)+Math.cos(latitude1)*Math.sin(radians)*Math.cos(bearingRad));var longitude2=longitude1+Math.atan2(Math.sin(bearingRad)*Math.sin(radians)*Math.cos(latitude1),Math.cos(radians)-Math.sin(latitude1)*Math.sin(latitude2));var lng=radiansToDegrees(longitude2);var lat=radiansToDegrees(latitude2);return point([lng,lat],options.properties)}function coordEach(geojson,callback,excludeWrapCoord){if(geojson===null)return;var j,k,l,geometry,stopG,coords,geometryMaybeCollection,wrapShrink=0,coordIndex=0,isGeometryCollection,type=geojson.type,isFeatureCollection=type==="FeatureCollection",isFeature=type==="Feature",stop=isFeatureCollection?geojson.features.length:1;for(var featureIndex=0;featureIndexpreviousFeatureIndex||multiPartIndexCoord>previousMultiIndex||geometryIndex>prevGeomIndex){previousCoords=currentCoord;previousFeatureIndex=featureIndex;previousMultiIndex=multiPartIndexCoord;prevGeomIndex=geometryIndex;segmentIndex=0;return}var currentSegment=lineString([previousCoords,currentCoord],feature.properties);if(callback(currentSegment,featureIndex,multiFeatureIndex,geometryIndex,segmentIndex)===false)return false;segmentIndex++;previousCoords=currentCoord})===false)return false})}function segmentReduce(geojson,callback,initialValue){var previousValue=initialValue;var started=false;segmentEach(geojson,function(currentSegment,featureIndex,multiFeatureIndex,geometryIndex,segmentIndex){if(started===false&&initialValue===undefined)previousValue=currentSegment;else previousValue=callback(previousValue,currentSegment,featureIndex,multiFeatureIndex,geometryIndex,segmentIndex);started=true});return previousValue}function lineEach(geojson,callback){if(!geojson)throw new Error("geojson is required");flattenEach(geojson,function(feature,featureIndex,multiFeatureIndex){if(feature.geometry===null)return;var type=feature.geometry.type;var coords=feature.geometry.coordinates;switch(type){case"LineString":if(callback(feature,featureIndex,multiFeatureIndex,0,0)===false)return false;break;case"Polygon":for(var geometryIndex=0;geometryIndexx2?x1:x2;var north=y1>y2?y1:y2;return[west,south,east,north]}function quickselect(arr,k,left,right,compare){quickselectStep(arr,k,left||0,right||arr.length-1,compare||defaultCompare)}function quickselectStep(arr,k,left,right,compare){while(right>left){if(right-left>600){var n=right-left+1;var m=k-left+1;var z=Math.log(n);var s=.5*Math.exp(2*z/3);var sd=.5*Math.sqrt(z*s*(n-s)/n)*(m-n/2<0?-1:1);var newLeft=Math.max(left,Math.floor(k-m*s/n+sd));var newRight=Math.min(right,Math.floor(k+(n-m)*s/n+sd));quickselectStep(arr,k,newLeft,newRight,compare)}var t=arr[k];var i=left;var j=right;swap(arr,left,k);if(compare(arr[right],t)>0)swap(arr,left,right);while(i0)j--}if(compare(arr[left],t)===0)swap(arr,left,j);else{j++;swap(arr,j,right)}if(j<=k)left=j+1;if(k<=j)right=j-1}}function swap(arr,i,j){var tmp=arr[i];arr[i]=arr[j];arr[j]=tmp}function defaultCompare(a,b){return ab?1:0}var RBush=function(){function RBush(){var maxEntries=arguments.length>0&&arguments[0]!==undefined?arguments[0]:9;_classCallCheck(this,RBush);this._maxEntries=Math.max(4,maxEntries);this._minEntries=Math.max(2,Math.ceil(this._maxEntries*.4));this.clear()}_createClass(RBush,[{key:"all",value:function all(){return this._all(this.data,[])}},{key:"search",value:function search(bbox){var node=this.data;var result=[];if(!intersects(bbox,node))return result;var toBBox=this.toBBox;var nodesToSearch=[];while(node){for(var i=0;i=0){if(insertPath[level].children.length>this._maxEntries){this._split(insertPath,level);level--}else break}this._adjustParentBBoxes(bbox,insertPath,level)}},{key:"_split",value:function _split(insertPath,level){var node=insertPath[level];var M=node.children.length;var m=this._minEntries;this._chooseSplitAxis(node,m,M);var splitIndex=this._chooseSplitIndex(node,m,M);var newNode=createNode(node.children.splice(splitIndex,node.children.length-splitIndex));newNode.height=node.height;newNode.leaf=node.leaf;calcBBox(node,this.toBBox);calcBBox(newNode,this.toBBox);if(level)insertPath[level-1].children.push(newNode);else this._splitRoot(node,newNode)}},{key:"_splitRoot",value:function _splitRoot(node,newNode){this.data=createNode([node,newNode]);this.data.height=node.height+1;this.data.leaf=false;calcBBox(this.data,this.toBBox)}},{key:"_chooseSplitIndex",value:function _chooseSplitIndex(node,m,M){var index;var minOverlap=Infinity;var minArea=Infinity;for(var i=m;i<=M-m;i++){var bbox1=distBBox(node,0,i,this.toBBox);var bbox2=distBBox(node,i,M,this.toBBox);var overlap=intersectionArea(bbox1,bbox2);var area=bboxArea(bbox1)+bboxArea(bbox2);if(overlap=m;_i--){var _child=node.children[_i];extend(rightBBox,node.leaf?toBBox(_child):_child);margin+=bboxMargin(rightBBox)}return margin}},{key:"_adjustParentBBoxes",value:function _adjustParentBBoxes(bbox,path,level){for(var i=level;i>=0;i--){extend(path[i],bbox)}}},{key:"_condense",value:function _condense(path){for(var i=path.length-1,siblings;i>=0;i--){if(path[i].children.length===0){if(i>0){siblings=path[i-1].children;siblings.splice(siblings.indexOf(path[i]),1)}else this.clear()}else calcBBox(path[i],this.toBBox)}}}]);return RBush}();function findItem(item,items,equalsFn){if(!equalsFn)return items.indexOf(item);for(var i=0;i=a.minX&&b.maxY>=a.minY}function createNode(children){return{children:children,height:1,leaf:true,minX:Infinity,minY:Infinity,maxX:-Infinity,maxY:-Infinity}}function multiSelect(arr,left,right,n,compare){var stack=[left,right];while(stack.length){right=stack.pop();left=stack.pop();if(right-left<=n)continue;var mid=left+Math.ceil((right-left)/n/2)*n;quickselect(arr,mid,left,right,compare);stack.push(left,mid,mid,right)}}function bbox$1(geojson){var result=[Infinity,Infinity,-Infinity,-Infinity];coordEach(geojson,function(coord){if(result[0]>coord[0]){result[0]=coord[0]}if(result[1]>coord[1]){result[1]=coord[1]}if(result[2] line1 must only contain 2 coordinates")}if(coords2.length!==2){throw new Error(" line2 must only contain 2 coordinates")}var x1=coords1[0][0];var y1=coords1[0][1];var x2=coords1[1][0];var y2=coords1[1][1];var x3=coords2[0][0];var y3=coords2[0][1];var x4=coords2[1][0];var y4=coords2[1][1];var denom=(y4-y3)*(x2-x1)-(x4-x3)*(y2-y1);var numeA=(x4-x3)*(y1-y3)-(y4-y3)*(x1-x3);var numeB=(x2-x1)*(y1-y3)-(y2-y1)*(x1-x3);if(denom===0){if(numeA===0&&numeB===0){return null}return null}var uA=numeA/denom;var uB=numeB/denom;if(uA>=0&&uA<=1&&uB>=0&&uB<=1){var x=x1+uA*(x2-x1);var y=y1+uA*(y2-y1);return point([x,y])}return null}function nearestPointOnLine(lines,pt,options){if(options===void 0){options={}}var closestPt=point([Infinity,Infinity],{dist:Infinity});var length=0;flattenEach(lines,function(line){var coords=getCoords(line);for(var i=0;i0){intersectPt=intersect.features[0];intersectPt.properties.dist=distance(pt,intersectPt,options);intersectPt.properties.location=length+distance(start,intersectPt,options)}if(start.properties.dist-1&&value%1==0&&value-1&&value%1==0&&value<=MAX_SAFE_INTEGER$1}function isArrayLike(value){return value!=null&&isLength(value.length)&&!isFunction(value)}var objectProto$3=Object.prototype;function isPrototype(value){var Ctor=value&&value.constructor,proto=typeof Ctor=="function"&&Ctor.prototype||objectProto$3;return value===proto}function baseTimes(n,iteratee){var index=-1,result=Array(n);while(++index-1}function listCacheSet(key,value){var data=this.__data__,index=assocIndexOf(data,key);if(index<0){++this.size;data.push([key,value])}else{data[index][1]=value}return this}function ListCache(entries){var index=-1,length=entries==null?0:entries.length;this.clear();while(++indexarrLength)){return false}var arrStacked=stack.get(array);var othStacked=stack.get(other);if(arrStacked&&othStacked){return arrStacked==other&&othStacked==array}var index=-1,result=true,seen=bitmask&COMPARE_UNORDERED_FLAG?new SetCache:undefined;stack.set(array,other);stack.set(other,array);while(++indexminPointLimit){path.splice(pointIndex,1);if(isFirstEqualLast){path[path.length-1]=AMap.LngLat.from(path[0])}this.path=path;this.map.remove(marker);this.highLightEditPoly();this.emit(EnumSingleRingEvent.removenode,{target:this.getTarget(),lnglat:_point,pixel:pixel})}else{this.path=[];this.highLightEditPoly();this.emit(EnumSingleRingEvent.removenode,{target:this.getTarget(),lnglat:_point,pixel:pixel})}}}}},{key:"highLightEditPoly",value:function highLightEditPoly(){var _this2=this;if(this.destroyed){return}var poly=this.editingPolyObj.poly;var path=this.path;var pointOnClick=function pointOnClick(chosedObj){var marker=chosedObj.marker;var _markerOpt=_this2.getMergeMkrOptions(_this2.controlPoint);var chosedOpt=_this2.getMergeMkrOptions({radius:3});if(_this2.chosedPoint){var cm=_this2.chosedPoint.marker;cm.setOptions(_markerOpt)}marker.setOptions(chosedOpt);_this2.chosedPoint=chosedObj};this.clearVertexMarkers();var isFirstEqualLast=path.length===0?false:path[0].equals(path[path.length-1]);this.editingVertexMarkerList=map(path,function(pt,pointIndex){var opt=AMap.extend({},_this2.controlPoint,{center:pt});var m=_this2.createMarker(opt);if(pointIndex===path.length-1&&isFirstEqualLast){return m}_this2.map.add(m);m.on("click",function(e){pointOnClick({lnglat:e.lnglat,pixel:e.pixel,marker:m,pointIndex:pointIndex,point:pt,path:path,poly:poly,isFirstEqualLast:isFirstEqualLast});_this2.deleteChosedItem(e)});m.on("dragging",function(e){_this2.clearTipMarkers();var _paths=_this2.getPath();var ll=_this2.getAdjustedPoint(_paths,e2ll(e));path[pointIndex]=ll;if(pointIndex===0&&isFirstEqualLast){path[path.length-1]=ll}_this2.path=path;_this2.emit(EnumSingleRingEvent.change,{target:_this2.getTarget(),pixel:e.pixel,lnglat:e.lnglat})});m.on("dragend",function(e){_this2.initTipMarkers();var _paths=_this2.getPath();var ll=_this2.getAdjustedPoint(_paths,e2ll(e));m.setCenter(ll);path[pointIndex]=ll;if(pointIndex===0&&isFirstEqualLast){path[path.length-1]=ll}_this2.path=path;_this2.emit(EnumSingleRingEvent.adjust,{target:_this2.getTarget(),pixel:e.pixel,lnglat:e.lnglat})});m.on("mouseover",_this2.handleVertexMouseOver);m.on("mouseout",_this2.handleVertexMouseOut);return m});this.initTipMarkers()}},{key:"getTarget",value:function getTarget(){return this.editingPolyObj&&this.editingPolyObj.poly}},{key:"getMergeMkrOptions",value:function getMergeMkrOptions(opt){var _opt=AMap.extend({},this.defaultMarkerOpt,opt);_opt.radius*=1;return _opt}},{key:"close",value:function close(){this.clearVertexMarkers();this.clearTipMarkers();this.emit("end",{target:this.getTarget()})}},{key:"clearVertexMarkers",value:function clearVertexMarkers(){var _this3=this;this.editingVertexMarkerList&&this.editingVertexMarkerList.forEach(function(mk){mk.clearEvents();_this3.map.remove(mk)});this.editingVertexMarkerList=[]}},{key:"initTipMarkers",value:function initTipMarkers(){var _this4=this;var path=this.path;var isFirstEqualLast=path.length===0?false:path[0].equals(path[path.length-1]);this.clearTipMarkers();var _loop=function _loop(i){if(i===path.length-1&&isFirstEqualLast){return"continue"}var cur=path[i];var next=i===path.length-1?path[0]:path[i+1];var midll=getMiddleLatLngByLngLat(_this4.map,cur,next);var opt=AMap.extend({},_this4.midControlPoint,{zIndex:999997,center:midll,bubble:false,draggable:true});var m=_this4.createMarker(opt);_this4.map.add(m);m.on("dragstart",function(e){if(_this4.destroyed){return}var breakPoint=midll;var breakIndex=i;var lnglat=breakPoint;var path=_this4.path;var index=breakIndex+1;path.splice(index,0,lnglat);_this4.path=path;var option=_this4.getMergeMkrOptions(_this4.controlPoint);m.setOptions(option)});m.on("dragging",function(e){if(_this4.destroyed){return}_this4.path;var _paths=_this4.getPath();var ll=_this4.getAdjustedPoint(_paths,e2ll(e));var pointIndex=i+1;path[pointIndex]=ll;_this4.path=path;_this4.emit(EnumSingleRingEvent.change,{target:_this4.getTarget(),pixel:e.pixel,lnglat:e.lnglat})});m.on("dragend",function(e){if(_this4.destroyed){return}_this4.handleMidVertexMouseOut({target:_this4.getTarget(),pixel:e.pixel,lnglat:e.lnglat});_this4.highLightEditPoly();_this4.emit("addnode",{target:_this4.getTarget(),pixel:e.pixel,lnglat:e.lnglat})});m.on("mouseover",_this4.handleMidVertexMouseOver);m.on("mouseout",_this4.handleMidVertexMouseOut);_this4.editingMidTipMarkerList.push(m)};for(var i=0;i2&&path[0]!==path[path.length-1]){path.push(path[0])}});var mvPt=[ll.lng,ll.lat];var lines=multiLineString(_paths);var pt=point(mvPt);var _nearestPointOnLine=nearestPointOnLine(lines,pt,{units:"kilometers"}),linePt=_nearestPointOnLine.geometry.coordinates,properties=_nearestPointOnLine.properties;return{point:linePt,properties:properties}}},{key:"getAdjustedPoint",value:function getAdjustedPoint(_paths,ll){var ajustPt=ll;if(this.adsorb&&_paths&&_paths.length>0){var mvPt=[ll.lng,ll.lat];var allPoints=_paths.reduce(function(pre,n){return pre.concat(n)});var _this$getPointOnLine=this.getPointOnLine(_paths,ll),linePt=_this$getPointOnLine.point;var _this$adsorbDistance=this.adsorbDistance,lAbPx=_this$adsorbDistance.line,vAbPx=_this$adsorbDistance.point;var nearVPt=getNearestPoint(mvPt,allPoints);if(!nearVPt){return ajustPt}var vDist=getPixelDistance(this.map,[nearVPt.point,mvPt]);var linePtDist=getPixelDistance(this.map,[linePt,mvPt]);if(vDist0){polyPath.push(ringPath)}}}catch(err){_iterator7.e(err)}finally{_iterator7.f()}return polyPath;case"Multipolygon":var multipolyPath=[];var _iterator8=_createForOfIteratorHelper(this.list),_step8;try{for(_iterator8.s();!(_step8=_iterator8.n()).done;){var poly=_step8.value;var _polyPath=[];var _iterator9=_createForOfIteratorHelper(poly),_step9;try{for(_iterator9.s();!(_step9=_iterator9.n()).done;){var ring=_step9.value;var _ringPath=ring.path;if(_ringPath&&_ringPath.length>0){_polyPath.push(_ringPath)}}}catch(err){_iterator9.e(err)}finally{_iterator9.f()}multipolyPath.push(_polyPath)}}catch(err){_iterator8.e(err)}finally{_iterator8.f()}return multipolyPath}}},{key:"clear",value:function clear(){this.type="Error";this.list=[]}}]);return SingleRingListHandle}();var __decorate=undefined&&undefined.__decorate||function(decorators,target,key,desc){var c=arguments.length,r=c<3?target:desc===null?desc=Object.getOwnPropertyDescriptor(target,key):desc,d;if((typeof Reflect==="undefined"?"undefined":_typeof(Reflect))==="object"&&typeof Reflect.decorate==="function")r=Reflect.decorate(decorators,target,key,desc);else for(var i=decorators.length-1;i>=0;i--)if(d=decorators[i])r=(c<3?d(r):c>3?d(target,key,r):d(target,key))||r;return c>3&&r&&Object.defineProperty(target,key,r),r};var isMobile=AMap.Browser.mobile;var amplify=1;var createOptions={zIndex:50,strokeColor:"#FF33FF",strokeOpacity:.2,strokeWeight:6,strokeStyle:"solid",bubble:false,fillColor:"#1791fc",fillOpacity:.4};var defaultOpt={createOptions:createOptions,adsorbPolygons:[],adsorb:true,editable:false,drawable:false,overlap:false,adsorbDistance:{line:10,point:15},allBubble:true,editOptions:{fillOpacity:.3,cursor:"pointer",strokeWeight:4,strokeStyle:"solid",strokeColor:"#1791fc",strokeOpacity:.8}};var statusRunTimeOpst={constructor:{time:0,highResTime:0},setTarget:{time:0,highResTime:0},open:{time:0,highResTime:0}};var PolygonEditor=function(_AMap$Event){_inherits(PolygonEditor,_AMap$Event);var _super=_createSuper(PolygonEditor);function PolygonEditor(map,target){var _this;var opt=arguments.length>2&&arguments[2]!==undefined?arguments[2]:{};_classCallCheck(this,PolygonEditor);_this=_super.call(this);_this.isOpenStatus=false;_this.singleRingList=[];_this.singleRingListHandle=new SingleRingListHandle(_assertThisInitialized(_this));_this.movePoint={};_this._editing=false;_this.className="PolygonEditor";_this.GRAPH_NAME="Polygon";_this.onAddPick=_this.onAddPick.bind(_assertThisInitialized(_this));_this.onAddingMouseMove=_this.onAddingMouseMove.bind(_assertThisInitialized(_this));_this.open=_this.open.bind(_assertThisInitialized(_this));_this.close=_this.close.bind(_assertThisInitialized(_this));_this.OPEN_STATUS=false;_this._opt=AMap.extend(defaultOpt,opt,{bubble:false});var _this$_opt=_this._opt,originPaths=_this$_opt.paths,adsorbPolygons=_this$_opt.adsorbPolygons,adsorb=_this$_opt.adsorb,editable=_this$_opt.editable,drawable=_this$_opt.drawable,adsorbDistance=_this$_opt.adsorbDistance,overlap=_this$_opt.overlap;if(!map){console.log("ERROR: no map");return _possibleConstructorReturn(_this)}_this.map=map;_this.drawable=drawable;_this.editable=editable;_this.adsorb=adsorb;_this.adsorbDistance=adsorbDistance;_this.overlap=overlap;_this.adsorbPolygons=adsorbPolygons||[];_this.originPaths=originPaths;_this.editingVertexMarkerList=[];_this.editingMidTipMarkerList=[];_this.addingPoly=null;_this.showTipMarker=true;_this.editingPolyObj=target&&{poly:target}||null;_this.defaultMarkerOpt={zIndex:999998,bubble:false,cursor:"pointer",clickable:true,draggable:true,radius:isMobile?6:6,strokeColor:"#1791fc",strokeWeight:isMobile?6:2,strokeOpacity:isMobile?.2:1,fillColor:"white",fillOpacity:1,innerOverlay:true};_this.midControlPoint=AMap.extend({zIndex:999999,bubble:false,cursor:"pointer",clickable:true,radius:6,strokeColor:"white",strokeWeight:isMobile?6:2,strokeOpacity:isMobile?.6:1,fillColor:"#1791fc",fillOpacity:1,innerOverlay:true},opt.midControlPoint||{});_this.controlPoint=AMap.extend({draggable:true,cursor:"pointer",bubble:false,zIndex:999999,innerOverlay:true},opt.controlPoint||{});_this.movePoint=AMap.extend({bubble:true,innerOverlay:true},opt.controlPoint||{});_this.defaultCursor=map.getDefaultCursor();onKeyDown(_this.onHandleKeydown.bind(_assertThisInitialized(_this)));_this.mvPickMarker=_this.createMarker(AMap.extend({center:new AMap.LngLat(0,0),bubble:true,innerOverlay:true},_this.movePoint));_this["mvPickMarker"].hide();_this.map.add(_this.mvPickMarker);_this._handleRingChange=_this._handleRingChange.bind(_assertThisInitialized(_this));_this._handleRingAdjust=_this._handleRingAdjust.bind(_assertThisInitialized(_this));_this._handleRingAddnode=_this._handleRingAddnode.bind(_assertThisInitialized(_this));_this._handleRingRemovenode=_this._handleRingRemovenode.bind(_assertThisInitialized(_this));_this._statusRunTime=statusRunTimeOpst;var time=(new Date).getTime();var highResTime=0;if("performance"in window&&typeof performance.now==="function"){highResTime=performance.now()}_this._statusRunTime.constructor={time:time,highResTime:highResTime};_this.draggListener();return _this}_createClass(PolygonEditor,[{key:"CLASS_NAME",get:function get(){return this.className}},{key:"onMapDblclick",value:function onMapDblclick(e){if(this.drawable){this.finishAddingPolygon(false,e)}}},{key:"draggListener",value:function draggListener(){if(this.editingPolyObj){if(this.isOpenStatus&&this.editingPolyObj.poly){this.editingPolyObj.poly.on("dragstart",this.close);this.editingPolyObj.poly.on("dragend",this.open)}}}},{key:"onMapRightclick",value:function onMapRightclick(e){if(this.drawable){this.finishAddingPolygon(true,e)}}},{key:"editPoly",value:function editPoly(){var _this2=this;this.mvPickMarker.hide();this.chosedPoint=null;var poly=this.editingPolyObj.poly;if(poly){var path=poly.getPath();this.editingPolyObj.origin_path=path;var opt=poly.getOptions();delete opt.path;delete opt.map;this.editingPolyObj.origin_options=opt;var jsonPath=jsonLngLatData(path);this.singleRingListHandle.updatePath(jsonPath,opt);this.singleRingListHandle.forEach(function(list){list.highLightEditPoly();_this2.bindListen(list)});var style=this._opt.editOptions||{fillColor:"#f00",fillOpacity:1};var editOpt=AMap.extend({},this._opt,style);poly.setOptions(editOpt)}}},{key:"getPathFromSingleRings",value:function getPathFromSingleRings(){return this.singleRingListHandle.getPath()}},{key:"setLayerOptions",value:function setLayerOptions(layer,changeOpt){var opt=layer.getOptions();var _opt=AMap.extend({},opt,changeOpt);layer.setOptions(_opt)}},{key:"getIcon",value:function getIcon(){var size=arguments.length>0&&arguments[0]!==undefined?arguments[0]:[10,10];var icon=new AMap.Icon({size:new AMap.Size(size[0],size[1]),image:"http://webapi.amap.com/images/dd-via.png",imageSize:new AMap.Size(size[0],size[1])});return icon}},{key:"getMergeMkrOptions",value:function getMergeMkrOptions(opt){var _opt=AMap.extend({},this.defaultMarkerOpt,opt);_opt.radius*=amplify;return _opt}},{key:"createMarker",value:function createMarker(opt){var _opt=this.getMergeMkrOptions(opt);return new AMap.CircleMarker(_opt)}},{key:"onAddPick",value:function onAddPick(e){if(!this.drawable)return;if(!this.map){console.log("ERROR: no map");return}var adsorbPt=isMobile?e.lnglat:this.mvPickMarker.getCenter();var insertIndex=0;if(!this.addingPoly){var _path=[[adsorbPt.lng,adsorbPt.lat],[adsorbPt.lng,adsorbPt.lat]];if(isMobile){_path.pop()}var opt=AMap.extend({},this._opt,{bubble:true});this.addingPoly=createPolygon(_path,opt.editOptions);this.map.add(this.addingPoly);this._mapStatusDb=this.map.getStatus().doubleClickZoom;this.map["setStatus"]({doubleClickZoom:false})}else{var arr=this.addingPoly["getPath"]();if(!isMobile){arr.pop();arr.push(adsorbPt)}arr.push(adsorbPt);insertIndex=arr.length-2;this.addingPoly["setPath"](arr)}this.emit("addnode",{target:this.addingPoly,pixel:e.pixel,lnglat:e.lnglat})}},{key:"getPointOnLine",value:function getPointOnLine(_paths,ll){if(this.GRAPH_NAME==="Polygon"){_paths.forEach(function(path){if(path.length>2&&path[0]!==path[path.length-1]){path.push(path[0])}})}var mvPt=[ll.lng,ll.lat];var lines=multiLineString(_paths);var pt=point(mvPt);var _nearestPointOnLine=nearestPointOnLine(lines,pt,{units:"kilometers"}),linePt=_nearestPointOnLine.geometry.coordinates,properties=_nearestPointOnLine.properties;return{point:linePt,properties:properties}}},{key:"onAddingMouseMove",value:function onAddingMouseMove(e){if(!this.drawable)return;var ll=e2ll(e);var _paths=this.getPath();var ajustPt=this.getAdjustedPoint(_paths,ll);if(this.mvPickMarker){this.mvPickMarker.setCenter(ajustPt);if(ajustPt==ll){this.mvPickMarker.hide()}else{this.mvPickMarker.show()}}if(this.addingPoly){var arr=this.addingPoly["getPath"]();arr.pop();arr.push(ajustPt);this.addingPoly["setPath"](arr)}}},{key:"getPolyArrPath",value:function getPolyArrPath(poly){var path=poly.getPath();var _path=map(path,function(loc){return[loc.lng,loc.lat]});return _path}},{key:"getAdjustedPoint",value:function getAdjustedPoint(_paths,ll){var ajustPt=ll;if(this.adsorb&&_paths&&_paths.length>0){var mvPt=[ll.lng,ll.lat];var allPoints=_paths.reduce(function(pre,n){return pre.concat(n)});var _this$getPointOnLine=this.getPointOnLine(_paths,ll),linePt=_this$getPointOnLine.point;var _this$adsorbDistance=this.adsorbDistance,lAbPx=_this$adsorbDistance.line,vAbPx=_this$adsorbDistance.point;var nearVPt=getNearestPoint(mvPt,allPoints);if(!nearVPt){return ajustPt}var vDist=getPixelDistance(this.map,[nearVPt.point,mvPt]);var linePtDist=getPixelDistance(this.map,[linePt,mvPt]);if(this.showTipMarker){var mvp=new AMap.LngLat(mvPt[0],mvPt[1]);this.mvPickMarker.setCenter(mvp)}if(vDist0&&arguments[0]!==undefined?arguments[0]:false;var e=arguments.length>1?arguments[1]:undefined;if(this.addingPoly){var arr=this.addingPoly["getPath"]();if(stripLast){if(!isMobile){arr.pop()}}else{arr.pop();if(!isMobile){arr.pop()}}if(arr.length>2){this.addingPoly["setPath"](arr);var success=this.tailorPolygonOverlaps();if(success){this.emit("add",{target:this.addingPoly,obj:this.addingPoly,lnglat:e.lnglat,pixel:e.pixel});this.editingPolyObj={poly:this.addingPoly};this.addingPoly=undefined;this.openEdit();this.editingPolyObj.origin_options=this._opt.createOptions}else{alert("您正在编辑的多边形不合规(边不能交叉),请重新添加")}}else{this.cancel()}}if(this.addingPoly){this.drawable=false}else{this.emit("cancel",{lnglat:e.lnglat,pixel:e.pixel})}}},{key:"getClosePath",value:function getClosePath(path){var last=path[path.length-1];if(last&&last!==path[0]){return path.concat([path[0]])}else{return path}}},{key:"tailorPolygonOverlaps",value:function tailorPolygonOverlaps(){return true}},{key:"getPolygons",value:function getPolygons(){return this.adsorbPolygons}},{key:"getPath",value:function getPath(){var _this3=this;var result=[];forEach(this.adsorbPolygons,function(p){if(!_this3.editingPolyObj){return}if(p===_this3.editingPolyObj.poly){return}var path=p.getPath();var jsonPath=multiPolygonJson(jsonLngLatData(path));if(!jsonPath){return}var _iterator=_createForOfIteratorHelper(jsonPath),_step;try{for(_iterator.s();!(_step=_iterator.n()).done;){var poly=_step.value;var _iterator2=_createForOfIteratorHelper(poly),_step2;try{for(_iterator2.s();!(_step2=_iterator2.n()).done;){var ring=_step2.value;result.push(ring)}}catch(err){_iterator2.e(err)}finally{_iterator2.f()}}}catch(err){_iterator.e(err)}finally{_iterator.f()}});return result}},{key:"addAddListener",value:function addAddListener(){this.map.on("click",this.onAddPick);this.map.on("mousemove",this.onAddingMouseMove);this.map.on("dblclick",this.onMapDblclick);this.map.on("rightclick",this.onMapRightclick)}},{key:"removeAddListener",value:function removeAddListener(){this.map.off("click",this.onAddPick);this.map.off("mousemove",this.onAddingMouseMove);this.map.off("dblclick",this.onMapDblclick);this.map.off("rightclick",this.onMapRightclick)}},{key:"open",value:function open(cb){if(this.editingPolyObj&&this.editingPolyObj.poly){this.openEdit();if(this.editingPolyObj.poly._opts.draggable){this.isOpenStatus=true}this.draggListener()}else{this.openAdd()}var time=(new Date).getTime();var highResTime=0;if("performance"in window&&typeof performance.now==="function"){highResTime=performance.now()}this._statusRunTime.open={time:time,highResTime:highResTime};if(typeof cb==="function"){cb()}}},{key:"setTarget",value:function setTarget(tar,cb){this.close();this._opt.target=tar;this.editingPolyObj={poly:tar};var time=(new Date).getTime();var highResTime=0;if("performance"in window&&typeof performance.now==="function"){highResTime=performance.now()}this._statusRunTime.setTarget={time:time,highResTime:highResTime};if(cb){cb()}}},{key:"getStatus",value:function getStatus(){return this._statusRunTime}},{key:"getTarget",value:function getTarget(){return this.editingPolyObj&&this.editingPolyObj.poly}},{key:"openAdd",value:function openAdd(){this.closeEdit();this.drawable=true;this.map.setDefaultCursor("crosshair");this.addAddListener();this.setAllBubble()}},{key:"setAllBubble",value:function setAllBubble(){if(!this._opt["allBubble"]){return}this._oldBubble=this.map.getStatus().allBubble;this.map.setStatus({allBubble:true})}},{key:"restoreBubble",value:function restoreBubble(){this.map.setStatus({allBubble:this._oldBubble})}},{key:"closeAdd",value:function closeAdd(){this.drawable=false;this.clearAddingPolygon();this.removeAddListener()}},{key:"openEdit",value:function openEdit(){if(this.editable){return}this.closeAdd();this.clearAddingPolygon();this.editable=true;this.map.setDefaultCursor(this.defaultCursor);this.editPoly();this.setAllBubble()}},{key:"closeEdit",value:function closeEdit(){this.editable=false;this.clearEditingPolyStatus();this.map.setDefaultCursor(this.defaultCursor)}},{key:"clearAddingPolygon",value:function clearAddingPolygon(){if(this.addingPoly){this.map.remove(this.addingPoly)}this.addingPoly=null}},{key:"clearEditingPolyStatus",value:function clearEditingPolyStatus(){var _this4=this;if(this.editingPolyObj&&this.editingPolyObj.poly){var _this$editingPolyObj=this.editingPolyObj,poly=_this$editingPolyObj.poly,origin_options=_this$editingPolyObj.origin_options;if(poly){origin_options&&poly.setOptions(origin_options);delete poly.origin_options}}this.singleRingListHandle.forEach(function(list){list.destroy();_this4.unbindListen(list)});this.singleRingListHandle.clear()}},{key:"setAdsorbPolygons",value:function setAdsorbPolygons(list){this.clearAdsorbPolygons();this.addAdsorbPolygons(list)}},{key:"clearAdsorbPolygons",value:function clearAdsorbPolygons(){this.adsorbPolygons=[]}},{key:"addAdsorbPolygons",value:function addAdsorbPolygons(list){if(!Array.isArray(list)){list=[list]}Array.prototype.push.apply(this.adsorbPolygons,list)}},{key:"removeAdsorbPolygons",value:function removeAdsorbPolygons(list){if(!Array.isArray(list)){list=[list]}for(var i=0,len=list.length;i=0){this.adsorbPolygons.splice(index,1)}}}},{key:"close",value:function close(){this.map.setDefaultCursor(this.defaultCursor);if(!this.isOpenStatus&&this.editingPolyObj&&this.editingPolyObj.poly){this.editingPolyObj.poly.off("dragstart",this.close);this.editingPolyObj.poly.off("dragend",this.open)}this.isOpenStatus=false;this.clearAddingPolygon();this.closeAdd();this.closeEdit();this.editingPolyObj={poly:this.editingPolyObj&&this.editingPolyObj.poly};this.mvPickMarker.hide();this.OPEN_STATUS=false;this.restoreBubble();if(!this.editingPolyObj.poly){return}this.emit("end",{target:this.getTarget()})}},{key:"onHandleKeydown",value:function onHandleKeydown(e){if(e.key==="Escape"){this.cancel()}}},{key:"cancel",value:function cancel(){if(this.addingPoly){this.map.remove(this.addingPoly);this.addingPoly=undefined;this.emit("cancel",{})}}},{key:"bindListen",value:function bindListen(ring){ring.on(EnumSingleRingEvent.change,this._handleRingChange);ring.on(EnumSingleRingEvent.adjust,this._handleRingAdjust);ring.on(EnumSingleRingEvent.addnode,this._handleRingAddnode);ring.on(EnumSingleRingEvent.removenode,this._handleRingRemovenode);ring.on(EnumSingleRingEvent.pointmouseout,this._handlePointMouseOut);ring.on(EnumSingleRingEvent.pointmouseover,this._handlePointMouseOver)}},{key:"syncPath",value:function syncPath(){this.singleRingListHandle.forEach(function(list){list.syncPath()});this.editingPolyObj.poly.setPath(this.getPathFromSingleRings())}},{key:"_handleRingChange",value:function _handleRingChange(e){this.editingPolyObj.poly.setPath(this.getPathFromSingleRings())}},{key:"_handleRingAdjust",value:function _handleRingAdjust(e){this.editingPolyObj.poly.setPath(this.getPathFromSingleRings());this.emit(EnumSingleRingEvent.adjust,e)}},{key:"_handleRingAddnode",value:function _handleRingAddnode(e){this.editingPolyObj.poly.setPath(this.getPathFromSingleRings());this.emit(EnumSingleRingEvent.addnode,e)}},{key:"_handleRingRemovenode",value:function _handleRingRemovenode(e){var path=this.getPathFromSingleRings();this.editingPolyObj.poly.setPath(path);this.emit(EnumSingleRingEvent.removenode,e);if(!path||path.length===0){this.close();this.destroy()}}},{key:"_handlePointMouseOver",value:function _handlePointMouseOver(e){this.emit(EnumSingleRingEvent.pointmouseover,e)}},{key:"_handlePointMouseOut",value:function _handlePointMouseOut(e){this.emit(EnumSingleRingEvent.pointmouseout,e)}},{key:"unbindListen",value:function unbindListen(ring){ring.off(EnumSingleRingEvent.change,this._handleRingChange);ring.off(EnumSingleRingEvent.adjust,this._handleRingAdjust);ring.off(EnumSingleRingEvent.addnode,this._handleRingAddnode);ring.off(EnumSingleRingEvent.removenode,this._handleRingRemovenode);ring.off(EnumSingleRingEvent.pointmouseout,this._handlePointMouseOut);ring.off(EnumSingleRingEvent.pointmouseover,this._handlePointMouseOver)}},{key:"destroy",value:function destroy(){this.singleRingListHandle.forEach(function(ring){return ring.destroy()});this.singleRingListHandle.clear();this.map.remove(this.editingPolyObj.poly);delete this.editingPolyObj.poly}}]);return PolygonEditor}(AMap.Event);__decorate([autobind],PolygonEditor.prototype,"onMapDblclick",null);__decorate([autobind],PolygonEditor.prototype,"onMapRightclick",null);__decorate([autobind],PolygonEditor.prototype,"_handlePointMouseOver",null);__decorate([autobind],PolygonEditor.prototype,"_handlePointMouseOut",null);AMap["PolygonEditor"]=PolygonEditor}(window.AMap); ');_jsload_('AMap.PolylineEditor', '!function(AMap){"use strict";function _typeof(obj){"@babel/helpers - typeof";return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(obj){return typeof obj}:function(obj){return obj&&"function"==typeof Symbol&&obj.constructor===Symbol&&obj!==Symbol.prototype?"symbol":typeof obj},_typeof(obj)}function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError("Cannot call a class as a function")}}function _defineProperties(target,props){for(var i=0;iarr.length)len=arr.length;for(var i=0,arr2=new Array(len);i=o.length)return{done:true};return{done:false,value:o[i++]}},e:function(e){throw e},f:F}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var normalCompletion=true,didErr=false,err;return{s:function(){it=it.call(o)},n:function(){var step=it.next();normalCompletion=step.done;return step},e:function(e){didErr=true;err=e},f:function(){try{if(!normalCompletion&&it.return!=null)it.return()}finally{if(didErr)throw err}}}}function _toPrimitive(input,hint){if(typeof input!=="object"||input===null)return input;var prim=input[Symbol.toPrimitive];if(prim!==undefined){var res=prim.call(input,hint||"default");if(typeof res!=="object")return res;throw new TypeError("@@toPrimitive must return a primitive value.")}return(hint==="string"?String:Number)(input)}function _toPropertyKey(arg){var key=_toPrimitive(arg,"string");return typeof key==="symbol"?key:String(key)}function _typeof$1(obj){if(typeof Symbol==="function"&&_typeof(Symbol.iterator)==="symbol"){_typeof$1=function _typeof$1(obj){return _typeof(obj)}}else{_typeof$1=function _typeof$1(obj){return obj&&typeof Symbol==="function"&&obj.constructor===Symbol&&obj!==Symbol.prototype?"symbol":_typeof(obj)}}return _typeof$1(obj)}function boundMethod(target,key,descriptor){var fn=descriptor.value;if(typeof fn!=="function"){throw new TypeError("@boundMethod decorator can only be applied to methods not: ".concat(_typeof$1(fn)))}var definingProperty=false;return{configurable:true,get:function get(){if(definingProperty||this===target.prototype||this.hasOwnProperty(key)||typeof fn!=="function"){return fn}var boundFn=fn.bind(this);definingProperty=true;Object.defineProperty(this,key,{configurable:true,get:function get(){return boundFn},set:function set(value){fn=value;delete this[key]}});definingProperty=false;return boundFn},set:function set(value){fn=value}}}function boundClass(target){var keys;if(typeof Reflect!=="undefined"&&typeof Reflect.ownKeys==="function"){keys=Reflect.ownKeys(target.prototype)}else{keys=Object.getOwnPropertyNames(target.prototype);if(typeof Object.getOwnPropertySymbols==="function"){keys=keys.concat(Object.getOwnPropertySymbols(target.prototype))}}keys.forEach(function(key){if(key==="constructor"){return}var descriptor=Object.getOwnPropertyDescriptor(target.prototype,key);if(typeof descriptor.value==="function"){Object.defineProperty(target.prototype,key,boundMethod(target,key,descriptor))}});return target}function autobind(){if(arguments.length===1){return boundClass.apply(void 0,arguments)}return boundMethod.apply(void 0,arguments)}var __decorate=undefined&&undefined.__decorate||function(decorators,target,key,desc){var c=arguments.length,r=c<3?target:desc===null?desc=Object.getOwnPropertyDescriptor(target,key):desc,d;if((typeof Reflect==="undefined"?"undefined":_typeof(Reflect))==="object"&&typeof Reflect.decorate==="function")r=Reflect.decorate(decorators,target,key,desc);else for(var i=decorators.length-1;i>=0;i--)if(d=decorators[i])r=(c<3?d(r):c>3?d(target,key,r):d(target,key))||r;return c>3&&r&&Object.defineProperty(target,key,r),r};var ListEvent;(function(ListEvent){ListEvent["removeNode"]="removenode";ListEvent["addNode"]="addnode";ListEvent["adjust"]="adjust";ListEvent["end"]="end";ListEvent["change"]="change";ListEvent["move"]="move";ListEvent["add"]="add";ListEvent["pointMouseOver"]="pointmouseover";ListEvent["pointMouseOut"]="pointmouseout"})(ListEvent||(ListEvent={}));var PointList=function(_AMap$Event){_inherits(PointList,_AMap$Event);var _super=_createSuper(PointList);function PointList(){var _this;_classCallCheck(this,PointList);_this=_super.apply(this,arguments);_this.length=0;return _this}_createClass(PointList,[{key:"add",value:function add(node){if(!this.head){this.head=node}else{var lastNode=this.head;while(lastNode.next){lastNode=lastNode.next}lastNode.setNext(node);node.setPrev(lastNode)}node.setList(this);this.bindNodeEvent(node);this.length+=1}},{key:"insertBefore",value:function insertBefore(node,origin){origin.prev.setNext(node);node.setPrev(origin.prev);node.setNext(origin);origin.setPrev(node);node.setList(this);this.bindNodeEvent(node);this.length+=1}},{key:"insertAfter",value:function insertAfter(node,origin){origin.next.setPrev(node);node.setNext(origin.next);node.setPrev(origin);origin.setNext(node);node.setList(this);this.bindNodeEvent(node);this.length+=1}},{key:"bindNodeEvent",value:function bindNodeEvent(node){node.on(ListEvent.change,this.handleChange.bind(this));node.on(ListEvent.addNode,this.handleAddNode.bind(this));node.on(ListEvent.adjust,this.handleAdjust.bind(this));node.on(ListEvent.removeNode,this.handleRemoveNode.bind(this));node.on(ListEvent.pointMouseOver,this.handlePointMouseOver);node.on(ListEvent.pointMouseOut,this.handlePointMouseOut)}},{key:"unbindNodeEvent",value:function unbindNodeEvent(node){node.off(ListEvent.change,this.handleChange.bind(this));node.off(ListEvent.addNode,this.handleAddNode.bind(this));node.off(ListEvent.adjust,this.handleAdjust.bind(this));node.off(ListEvent.removeNode,this.handleRemoveNode.bind(this));node.off(ListEvent.pointMouseOver,this.handlePointMouseOver);node.off(ListEvent.pointMouseOut,this.handlePointMouseOut)}},{key:"remove",value:function remove(node){this.unbindNodeEvent(node);if(node.prev){node.prev.setNext(node.next);if(node.next){node.next.setPrev(node.prev)}node.setPrev();node.setNext()}else{this.head=node.next;node.setPrev();if(node.next){node.next.setPrev()}}this.length-=1}},{key:"handlePointMouseOver",value:function handlePointMouseOver(e){this.emit(ListEvent.pointMouseOver,e)}},{key:"handlePointMouseOut",value:function handlePointMouseOut(e){this.emit(ListEvent.pointMouseOut,e)}},{key:"handleChange",value:function handleChange(e){this.emit(ListEvent.change,e)}},{key:"handleAddNode",value:function handleAddNode(e){this.emit(ListEvent.addNode,e)}},{key:"handleRemoveNode",value:function handleRemoveNode(e){this.emit(ListEvent.removeNode,e)}},{key:"handleAdjust",value:function handleAdjust(e){this.emit(ListEvent.adjust,e)}},{key:"forEach",value:function forEach(cb){var p=this.head;while(p){cb(p);p=p.next}}},{key:"destroy",value:function destroy(){var p=this.head;while(p){this.remove(p);p.destroy();p=p.next}}}]);return PointList}(AMap.Event);__decorate([autobind],PointList.prototype,"handlePointMouseOver",null);__decorate([autobind],PointList.prototype,"handlePointMouseOut",null);var AbstractPointListNode=function(_AMap$Event2){_inherits(AbstractPointListNode,_AMap$Event2);var _super2=_createSuper(AbstractPointListNode);function AbstractPointListNode(){var _this2;_classCallCheck(this,AbstractPointListNode);_this2=_super2.apply(this,arguments);_this2.editing=false;return _this2}_createClass(AbstractPointListNode,[{key:"setNext",value:function setNext(next){this.next=next}},{key:"setPrev",value:function setPrev(prev){this.prev=prev}},{key:"setList",value:function setList(list){this.list=list}}]);return AbstractPointListNode}(AMap.Event);function getMiddleLatLng(marker1,marker2){var p1=marker1.getCenter();var p2=marker2.getCenter();var pos1=p1.pos;var pos2=p2.pos;var map=marker1.getMap();if(map){return map.coordsToLngLat([(pos1[0]+pos2[0])/2,(pos1[1]+pos2[1])/2])}else{return p1.divideBy(2,false).add(p2.divideBy(2,false),false)}}var callbacks=[];document.addEventListener("keydown",function(e){for(var i=0,len=callbacks.length;i2&&arguments[2]!==undefined?arguments[2]:{};_classCallCheck(this,Point);_this=_super.call(this);_this.map=map;_this.pos=pos;_this._markerOptions={draggable:true,radius:AMap.Browser.mobile?6:6,strokeColor:"#1791fc",strokeWeight:AMap.Browser.mobile?6:2,strokeOpacity:AMap.Browser.mobile?.4:1,fillColor:"white",fillOpacity:1,cursor:"pointer",visible:false,zIndex:99999,innerOverlay:true};_this._middleMarkerOptions={draggable:true,radius:6,strokeColor:"white",strokeWeight:AMap.Browser.mobile?6:2,strokeOpacity:AMap.Browser.mobile?.6:1,fillColor:"#1791fc",fillOpacity:1,cursor:"pointer",visible:false,zIndex:99999};if(opts.controlPoint){_this._markerOptions=AMap.extend(_this._markerOptions,opts.controlPoint)}if(opts.controlPoint){_this._middleMarkerOptions=AMap.extend(_this._middleMarkerOptions,opts.midControlPoint)}_this.init();_this.hide();return _this}_createClass(Point,[{key:"init",value:function init(){this.marker=new AMap.CircleMarker(AMap.extend({map:this.map,center:this.pos},this._markerOptions))}},{key:"show",value:function show(){this.marker.show()}},{key:"hide",value:function hide(){this.marker.hide()}},{key:"remove",value:function remove(){this.marker.remove()}},{key:"setMiddle",value:function setMiddle(middle){this.marker.setOptions(middle?this._middleMarkerOptions:this._markerOptions)}}]);return Point}(AMap.Event);var PointWithMarker=function(_AMap$Event2){_inherits(PointWithMarker,_AMap$Event2);var _super2=_createSuper(PointWithMarker);function PointWithMarker(map,pos){var _this2;var controlPoint=arguments.length>2&&arguments[2]!==undefined?arguments[2]:{draggable:true,icon:new AMap.Icon({size:new AMap.Size(11,11),imageOffset:new AMap.Pixel(0,0),image:AMap.getConfig().client+"/images/dd-via.png"}),offset:new AMap.Pixel(-6,-6),cursor:"pointer",zIndex:1e3};_classCallCheck(this,PointWithMarker);_this2=_super2.call(this);_this2.map=map;_this2.pos=pos;_this2.controlPoint=controlPoint;_this2.init();_this2.hide();return _this2}_createClass(PointWithMarker,[{key:"init",value:function init(){this.marker=new AMap.Marker(AMap.extend({map:this.map,position:this.pos,draggable:true,cursor:"pointer",zIndex:1e3,innerOverlay:true},this.controlPoint))}},{key:"show",value:function show(){this.marker.show()}},{key:"hide",value:function hide(){this.marker.hide()}},{key:"remove",value:function remove(){this.marker.remove()}},{key:"updatePosition",value:function updatePosition(pos){this.marker.setPosition(pos)}}]);return PointWithMarker}(AMap.Event);var __decorate$1=undefined&&undefined.__decorate||function(decorators,target,key,desc){var c=arguments.length,r=c<3?target:desc===null?desc=Object.getOwnPropertyDescriptor(target,key):desc,d;if((typeof Reflect==="undefined"?"undefined":_typeof(Reflect))==="object"&&typeof Reflect.decorate==="function")r=Reflect.decorate(decorators,target,key,desc);else for(var i=decorators.length-1;i>=0;i--)if(d=decorators[i])r=(c<3?d(r):c>3?d(target,key,r):d(target,key))||r;return c>3&&r&&Object.defineProperty(target,key,r),r};var PolylinePoint=function(_AbstractPointListNod){_inherits(PolylinePoint,_AbstractPointListNod);var _super=_createSuper(PolylinePoint);function PolylinePoint(map,pos){var _this;var opts=arguments.length>2&&arguments[2]!==undefined?arguments[2]:{};_classCallCheck(this,PolylinePoint);_this=_super.call(this);_this.map=map;_this.pos=pos;_this.editing=false;_this.prevIsMiddle=false;_this._opts=opts;_this.point=new Point(map,pos,opts);_this.middleFlag=false;_this.bindEvents();return _this}_createClass(PolylinePoint,[{key:"bindEvents",value:function bindEvents(){this.point.marker.on("dragstart",this.handleHandleDragStart);this.point.marker.on("dragend",this.handleHandleDragEnd);this.point.marker.on("dragging",this.handleHandleDragging);this.point.marker.on("click",this.handleHandleClick);this.point.marker.on("mouseover",this.handleHandleMouseOver);this.point.marker.on("mouseout",this.handleHandleMouseOut)}},{key:"unbindEvents",value:function unbindEvents(){this.point.marker.off("dragstart",this.handleHandleDragStart);this.point.marker.off("dragend",this.handleHandleDragEnd);this.point.marker.off("dragging",this.handleHandleDragging);this.point.marker.off("click",this.handleHandleClick);this.point.marker.off("mouseover",this.handleHandleMouseOver);this.point.marker.off("mouseout",this.handleHandleMouseOut)}},{key:"handleHandleDragStart",value:function handleHandleDragStart(e){if(!this.list){return}this.editing=true;if(!this.middleFlag){return}this.prevIsMiddle=true;this.handleHandleMouseOut(e);this.setMiddle(false);var prevPos=getMiddleLatLng(this.point.marker,this.prev.point.marker);var nextPos=getMiddleLatLng(this.point.marker,this.next.point.marker);var prev=new PolylinePoint(this.map,prevPos,this._opts);var next=new PolylinePoint(this.map,nextPos,this._opts);this.list.insertBefore(prev,this);this.list.insertAfter(next,this);prev.show();next.show();prev.setMiddle(true);next.setMiddle(true);this.handleHandleMouseOver(e)}},{key:"handleHandleClick",value:function handleHandleClick(e){if(!this.middleFlag){this.destroy();this.emit(ListEvent.removeNode,e)}}},{key:"handleHandleDragging",value:function handleHandleDragging(){if(!this.middleFlag){if(this.prev&&this.prev.prev){var newPos=getMiddleLatLng(this.point.marker,this.prev.prev.point.marker);this.prev.point.marker.setCenter(newPos)}if(this.next&&this.next.next){var _newPos=getMiddleLatLng(this.point.marker,this.next.next.point.marker);this.next.point.marker.setCenter(_newPos)}}this.emit(ListEvent.change)}},{key:"handleHandleDragEnd",value:function handleHandleDragEnd(e){this.editing=false;if(this.prevIsMiddle&&this.list){this.prevIsMiddle=false;this.emit(ListEvent.addNode,e)}else{this.emit(ListEvent.adjust,e)}}},{key:"handleHandleMouseOver",value:function handleHandleMouseOver(e){if(!this.middleFlag){this.emit(ListEvent.pointMouseOver,{target:e.target,lnglat:e.lnglat,pixel:e.pixel,markerType:"vertex"})}else{this.emit(ListEvent.pointMouseOver,{target:e.target,lnglat:e.lnglat,pixel:e.pixel,markerType:"middle"})}}},{key:"handleHandleMouseOut",value:function handleHandleMouseOut(e){if(!this.middleFlag){this.emit(ListEvent.pointMouseOut,{target:e.target,lnglat:e.lnglat,pixel:e.pixel,markerType:"vertex"})}else{this.emit(ListEvent.pointMouseOut,{target:e.target,lnglat:e.lnglat,pixel:e.pixel,markerType:"middle"})}}},{key:"destroy",value:function destroy(){var _a,_b;this.unbindEvents();if(this.middleFlag){if(this.list){this.list.remove(this)}this.point.remove()}else{(_a=this.prev)===null||_a===void 0?void 0:_a.destroy();(_b=this.next)===null||_b===void 0?void 0:_b.destroy();if(this.list){var prev=this.prev;var next=this.next;this.list.remove(this);if(prev&&next){var newPos=getMiddleLatLng(prev.point.marker,next.point.marker);var newMiddleMarker=new PolylinePoint(this.map,newPos,this._opts);newMiddleMarker.setMiddle(true);newMiddleMarker.show();this.list.insertAfter(newMiddleMarker,prev)}}this.point.remove()}}},{key:"show",value:function show(){this.point.show()}},{key:"hide",value:function hide(){this.point.hide()}},{key:"setMiddle",value:function setMiddle(middle){this.middleFlag=middle;this.point.setMiddle(middle)}}]);return PolylinePoint}(AbstractPointListNode);__decorate$1([autobind],PolylinePoint.prototype,"handleHandleDragStart",null);__decorate$1([autobind],PolylinePoint.prototype,"handleHandleClick",null);__decorate$1([autobind],PolylinePoint.prototype,"handleHandleDragging",null);__decorate$1([autobind],PolylinePoint.prototype,"handleHandleDragEnd",null);__decorate$1([autobind],PolylinePoint.prototype,"handleHandleMouseOver",null);__decorate$1([autobind],PolylinePoint.prototype,"handleHandleMouseOut",null);var __decorate$2=undefined&&undefined.__decorate||function(decorators,target,key,desc){var c=arguments.length,r=c<3?target:desc===null?desc=Object.getOwnPropertyDescriptor(target,key):desc,d;if((typeof Reflect==="undefined"?"undefined":_typeof(Reflect))==="object"&&typeof Reflect.decorate==="function")r=Reflect.decorate(decorators,target,key,desc);else for(var i=decorators.length-1;i>=0;i--)if(d=decorators[i])r=(c<3?d(r):c>3?d(target,key,r):d(target,key))||r;return c>3&&r&&Object.defineProperty(target,key,r),r};var SingleLine=function(_AMap$Event){_inherits(SingleLine,_AMap$Event);var _super=_createSuper(SingleLine);function SingleLine(path,parent){var _this;_classCallCheck(this,SingleLine);_this=_super.call(this);_this.path=path;_this.parent=parent;_this.handleAddNode=_this.handleAddNode.bind(_assertThisInitialized(_this));_this.handleRemoveNode=_this.handleRemoveNode.bind(_assertThisInitialized(_this));_this.handleAdjust=_this.handleAdjust.bind(_assertThisInitialized(_this));_this.handleChange=_this.handleChange.bind(_assertThisInitialized(_this));return _this}_createClass(SingleLine,[{key:"initList",value:function initList(){if(!this.parent._poly){console.error("no poly target");return}if(!this.list){this.list=new PointList;var path=this.path;var prev;for(var i=0,len=path.length;i0){var middlePos=getMiddleLatLng(prev.point.marker,current.point.marker);var middle=new PolylinePoint(this.parent._map,middlePos,{controlPoint:this.parent._markerOptions,midControlPoint:this.parent._middleMarkerOptions});this.list.add(middle);this.list.add(current);middle.setMiddle(true)}else{this.list.add(current)}prev=current}this.bindListEvent()}this.list.forEach(function(node){node.point.marker.show()});this.parent._customStyle=AMap.extend({},this.parent._poly.getOptions());delete this.parent._customStyle.map;delete this.parent._customStyle.center;delete this.parent._customStyle.radius;delete this.parent._customStyle.path;delete this.parent._customStyle.bounds;this.parent._poly.setOptions(this.parent._selectStyle?this.parent._selectStyle:{})}},{key:"bindListEvent",value:function bindListEvent(){if(this.list){this.list.on(ListEvent.addNode,this.handleAddNode);this.list.on(ListEvent.removeNode,this.handleRemoveNode);this.list.on(ListEvent.adjust,this.handleAdjust);this.list.on(ListEvent.change,this.handleChange);this.list.on(ListEvent.pointMouseOver,this.handlePointMouseOver);this.list.on(ListEvent.pointMouseOut,this.handlePointMouseOut)}}},{key:"unbindListEvent",value:function unbindListEvent(){if(this.list){this.list.off(ListEvent.addNode,this.handleAddNode);this.list.off(ListEvent.removeNode,this.handleRemoveNode);this.list.off(ListEvent.adjust,this.handleAdjust);this.list.off(ListEvent.change,this.handleChange);this.list.off(ListEvent.pointMouseOver,this.handlePointMouseOver);this.list.off(ListEvent.pointMouseOut,this.handlePointMouseOut)}}},{key:"handleAddNode",value:function handleAddNode(e){this.emit(ListEvent.addNode,{target:this.parent.getTarget(),pixel:e.pixel,lnglat:e.lnglat})}},{key:"handleRemoveNode",value:function handleRemoveNode(e){if(!this.list){return}if(this.list.length<=1){this.list.destroy();delete this.list}this.emit(ListEvent.removeNode,{target:this.parent.getTarget(),pixel:e.pixel,lnglat:e.lnglat})}},{key:"handleAdjust",value:function handleAdjust(e){this.emit(ListEvent.adjust,{target:this.parent.getTarget(),pixel:e.pixel,lnglat:e.lnglat})}},{key:"handleChange",value:function handleChange(e){this.emit(ListEvent.change,{target:this.parent.getTarget(),pixel:e.pixel,lnglat:e.lnglat})}},{key:"handlePointMouseOver",value:function handlePointMouseOver(e){this.emit(ListEvent.pointMouseOver,e)}},{key:"handlePointMouseOut",value:function handlePointMouseOut(e){this.emit(ListEvent.pointMouseOut,e)}},{key:"syncPath",value:function syncPath(){if(this.list){this.list.forEach(function(point){point.handleHandleDragging()})}}},{key:"getPath",value:function getPath(){if(!this.list){return}var path=[];this.list.forEach(function(node){if(!node.middleFlag||node.editing){path.push(node.point.marker.getCenter())}});return path}},{key:"destroy",value:function destroy(){var _a,_b;this.unbindListEvent();(_a=this.list)===null||_a===void 0?void 0:_a.forEach(function(node){node.point.marker.hide()});(_b=this.list)===null||_b===void 0?void 0:_b.destroy()}}]);return SingleLine}(AMap.Event);__decorate$2([autobind],SingleLine.prototype,"handlePointMouseOver",null);__decorate$2([autobind],SingleLine.prototype,"handlePointMouseOut",null);var __decorate$3=undefined&&undefined.__decorate||function(decorators,target,key,desc){var c=arguments.length,r=c<3?target:desc===null?desc=Object.getOwnPropertyDescriptor(target,key):desc,d;if((typeof Reflect==="undefined"?"undefined":_typeof(Reflect))==="object"&&typeof Reflect.decorate==="function")r=Reflect.decorate(decorators,target,key,desc);else for(var i=decorators.length-1;i>=0;i--)if(d=decorators[i])r=(c<3?d(r):c>3?d(target,key,r):d(target,key))||r;return c>3&&r&&Object.defineProperty(target,key,r),r};var statusRunTimeOpst={constructor:{time:0,highResTime:0},setTarget:{time:0,highResTime:0},open:{time:0,highResTime:0}};var PolylineEditor=function(_AMap$Event){_inherits(PolylineEditor,_AMap$Event);var _super=_createSuper(PolylineEditor);function PolylineEditor(_map,_poly){var _this;var opts=arguments.length>2&&arguments[2]!==undefined?arguments[2]:{};_classCallCheck(this,PolylineEditor);_this=_super.call(this);_this._map=_map;_this.singleLineList=[];_this.singleLineListHandler=new SingleLineHandler(_assertThisInitialized(_this));_this._defaultStyle={isOutline:true,outlineColor:"white",borderWeight:2,strokeColor:"#3366FF",strokeOpacity:1,strokeWeight:6,strokeStyle:"solid",lineJoin:"round",lineCap:"round"};_this._selectStyle={isOutline:true,outlineColor:"white",borderWeight:2,strokeWeight:4,strokeStyle:"solid",strokeDasharray:[10,10],strokeColor:"#1791fc",strokeOpacity:.8,lineJoin:"round",lineCap:"round"};_this._markerOptions={};_this._middleMarkerOptions={};_this.className="AMap.PolylineEditor";_this._editing=false;_this.handleAddNode=_this.handleAddNode.bind(_assertThisInitialized(_this));_this.handleRemoveNode=_this.handleRemoveNode.bind(_assertThisInitialized(_this));_this.handleAdjust=_this.handleAdjust.bind(_assertThisInitialized(_this));_this.handleChange=_this.handleChange.bind(_assertThisInitialized(_this));if(!_this._map){console.log("ERROR: no map")}_this._creator=new PolylineCreator(_map);_this._poly=_poly;if(opts){_this._defaultStyle=opts.createOptions?AMap.extend(_this._defaultStyle,opts.createOptions):_this._defaultStyle;_this._selectStyle=opts.editOptions?AMap.extend(_this._selectStyle,opts.editOptions):_this._selectStyle;_this._markerOptions=opts.controlPoint?AMap.extend(_this._markerOptions,opts.controlPoint):_this._markerOptions;_this._middleMarkerOptions=opts.midControlPoint?AMap.extend(_this._middleMarkerOptions,opts.midControlPoint):_this._middleMarkerOptions}_this._creator.on("create",function(data){_this._creator.close();var path=data.path;var poly=new AMap.Polyline(AMap.extend({map:_map,path:path},_this._defaultStyle));_this.setTarget(poly);_this.open();_this.emit(ListEvent.add,{target:_this.getTarget(),obj:poly})});_this._statusRunTime=statusRunTimeOpst;var time=(new Date).getTime();var highResTime=0;if("performance"in window&&typeof performance.now==="function"){highResTime=performance.now()}_this._statusRunTime.constructor={time:time,highResTime:highResTime};return _this}_createClass(PolylineEditor,[{key:"CLASS_NAME",get:function get(){return this.className}},{key:"createSingleLine",value:function createSingleLine(){var _this2=this;if(!this._poly){console.error("no poly target");return}var path=this._poly.getPath();var jsonPath=jsonLngLatData(path);this.singleLineListHandler.updatePath(jsonPath);this.singleLineListHandler.forEach(function(line){line.initList();_this2._bindSingleLine(line)})}},{key:"setTarget",value:function setTarget(overlay,cb){this.close();if(this._poly&&this._poly!==overlay){this.destroy()}this._poly=overlay;var time=(new Date).getTime();var highResTime=0;if("performance"in window&&typeof performance.now==="function"){highResTime=performance.now()}this._statusRunTime.setTarget={time:time,highResTime:highResTime};if(cb){cb()}}},{key:"getTarget",value:function getTarget(){return this._poly}},{key:"getStatus",value:function getStatus(){return this._statusRunTime}},{key:"bindListEvent",value:function bindListEvent(){}},{key:"unbindListEvent",value:function unbindListEvent(){}},{key:"handleChange",value:function handleChange(){this._updatePath()}},{key:"handleAddNode",value:function handleAddNode(e){this._updatePath();this.emit(ListEvent.addNode,e)}},{key:"handlePointMouseOver",value:function handlePointMouseOver(e){this.emit(ListEvent.pointMouseOver,e)}},{key:"handlePointMouseOut",value:function handlePointMouseOut(e){this.emit(ListEvent.pointMouseOut,e)}},{key:"handleRemoveNode",value:function handleRemoveNode(e){var endflag=this._updatePath();this.emit(ListEvent.removeNode,e);if(endflag){this.close();this.destroy()}}},{key:"handleAdjust",value:function handleAdjust(e){this._updatePath();this.emit(ListEvent.adjust,e)}},{key:"open",value:function open(cb){if(!this._poly&&!this._editing){this._creator.open()}else if(!this._editing){this._editing=true;this.createSingleLine()}var time=(new Date).getTime();var highResTime=0;if("performance"in window&&typeof performance.now==="function"){highResTime=performance.now()}this._statusRunTime.open={time:time,highResTime:highResTime};if(cb){cb()}}},{key:"close",value:function close(){var _this3=this;this._creator.close();this._editing=false;if(!this._poly){return}this.singleLineListHandler.forEach(function(line){_this3._unbindSingleLine(line);line.destroy()});this.singleLineListHandler.clear();this._poly.setOptions(this._customStyle);this.emit(ListEvent.end,{target:this.getTarget()})}},{key:"destroy",value:function destroy(){this.singleLineListHandler.forEach(function(line){return line.destroy()});this.singleLineListHandler.clear();delete this._poly}},{key:"_updatePath",value:function _updatePath(){if(!this._poly){return}var path=this.singleLineListHandler.getPath();if(!path||path.length===0){this._map.remove(this._poly);return true}else{this._poly.setPath(path)}}},{key:"_bindSingleLine",value:function _bindSingleLine(line){line.on(ListEvent.change,this.handleChange);line.on(ListEvent.adjust,this.handleAdjust);line.on(ListEvent.removeNode,this.handleRemoveNode);line.on(ListEvent.addNode,this.handleAddNode);line.on(ListEvent.change,this.handleChange);line.on(ListEvent.pointMouseOver,this.handlePointMouseOver);line.on(ListEvent.pointMouseOut,this.handlePointMouseOut)}},{key:"_unbindSingleLine",value:function _unbindSingleLine(line){line.off(ListEvent.change,this.handleChange);line.off(ListEvent.adjust,this.handleAdjust);line.off(ListEvent.removeNode,this.handleRemoveNode);line.off(ListEvent.addNode,this.handleAddNode);line.off(ListEvent.change,this.handleChange);line.off(ListEvent.pointMouseOver,this.handlePointMouseOver);line.off(ListEvent.pointMouseOut,this.handlePointMouseOut)}},{key:"syncPath",value:function syncPath(){this.singleLineListHandler.forEach(function(line){line.syncPath()});this._updatePath()}}]);return PolylineEditor}(AMap.Event);__decorate$3([autobind],PolylineEditor.prototype,"handlePointMouseOver",null);__decorate$3([autobind],PolylineEditor.prototype,"handlePointMouseOut",null);var SingleLineHandler=function(){function SingleLineHandler(parent){_classCallCheck(this,SingleLineHandler);this.parent=parent}_createClass(SingleLineHandler,[{key:"updatePath",value:function updatePath(path){if(isNumberArrayArray(path)){this.type="Line";this.list=new SingleLine(AMap.Util.parseLngLatData(path),this.parent)}else if(isNumberArrayArrayArray(path)){this.type="MultiLine";this.list=[];var _iterator=_createForOfIteratorHelper(path),_step;try{for(_iterator.s();!(_step=_iterator.n()).done;){var ring=_step.value;this.list.push(new SingleLine(AMap.Util.parseLngLatData(ring),this.parent))}}catch(err){_iterator.e(err)}finally{_iterator.f()}}else{this.type="Error";console.log("WARING: PolyLine has no path")}}},{key:"forEach",value:function forEach(cb){switch(this.type){case"Line":cb(this.list);break;case"MultiLine":var _iterator2=_createForOfIteratorHelper(this.list),_step2;try{for(_iterator2.s();!(_step2=_iterator2.n()).done;){var line=_step2.value;cb(line)}}catch(err){_iterator2.e(err)}finally{_iterator2.f()}break}}},{key:"getPath",value:function getPath(){switch(this.type){case"Line":return this.list.getPath();case"MultiLine":var polyPath=[];var _iterator3=_createForOfIteratorHelper(this.list),_step3;try{for(_iterator3.s();!(_step3=_iterator3.n()).done;){var singleRing=_step3.value;var ringPath=singleRing.getPath();if(ringPath&&ringPath.length>0){polyPath.push(ringPath)}}}catch(err){_iterator3.e(err)}finally{_iterator3.f()}return polyPath}}},{key:"clear",value:function clear(){this.type="Error";this.list=[]}}]);return SingleLineHandler}();AMap.PolylineEditor=PolylineEditor}(window.AMap); ');_jsload_('AMap.MarkerCluster', '!function(u){"use strict";function n(t,i){t.prototype=Object.create(i.prototype),(t.prototype.constructor=t).__proto__=i}var v=function(r){function t(t,i){var n;return(n=r.call(this)||this).CLASS_NAME="AMap.DataCluster",n.t=t,n.i=t.getMap(),n.s=t.getGridSize(),n.h=t.getMinClusterSize(),n.o=t.isAverageCenter(),n.u=t.getUserDataLen(),n.v=t.v,n.l=i,n.p=null,n.m=[],n.M=[],n.I=null,n.g=[],n}n(t,r);var i=t.prototype;return i.j=function(){return this.p},i.O=function(t,i){if(0===this.m.length&&(this.p=t),i&&(this.k=i),this.m.push(t),t._amapMarker&&t._amapMarker.originData&&0=this.h&&this.l<=this.v?(r=new u.Marker({position:t.lnglat,anchor:"top-left"}),o?o.call(null,{clusterData:this.m,count:n,marker:r,indexs:this.k}):(r.setContent(h.content),r.setOffset(h.offset))):(r=t.originMarker?t.originMarker:new u.Marker({position:t.lnglat,anchor:"top-left",offset:new u.Pixel(-9,-32)}),e&&e.call(null,{count:n,marker:r,data:this.m,indexs:this.k})),r},i.C=function(t,i){var n=document.createElement("div");return n.style.width=i.size.width+"px",n.style.height=i.size.height+"px",n.innerHTML=t,n.style.backgroundImage="url("+i.url+")",n.style.textAlign="center",n.style.lineHeight=i.size.height+"px",n.style.backgroundPosition=i.imageOffset?i.imageOffset.x+"px "+i.imageOffset.y+"px":"0 0",n.style.color=i.textColor||"#000",n.style.fontSize=i.textSize?i.textSize+"px":"12px",n.style.cursor="pointer",{content:n,offset:i.offset||new u.Pixel(0,0)}},i.J=function(t){for(var i=0,n=t;0!==n;)n=parseInt(n/10,10),i+=1;return i=Math.min(i,5)},i.F=function(){return this.m},i.L=function(){for(var t=[],i=this.M.length,n=0;nthis.v){t=this.ct(),this.V=t;var i=this.vt(t);this.lt(i)}else{t=this.pt(),this.V=t;var n=this.vt(t);this.lt(n)}},i.vt=function(t){this._=[];var i=t.length,n=this.l,r=this.i.getBounds();r=this.dt(r,5);for(var s=this.it.length,h=0;hthis.h)for(var a=0;an&&i.y>h&&i.y";_this["midLabelText"]="{d}公里";_this["endLabelText"]="共{d}公里";_this["startLabelOffset"]=_this["midLabelOffset"]=_this["endLabelOffset"]=labelOffset;_this.keyboardEve=false;_this.d=1e3;if(opts["d"]===1){_this.d=1;_this["midLabelText"]="{d}米";_this["endLabelText"]="共{d}米"}_this.dn="";_this.dl="";_this.merge(_this,opts);_this._lastRecord=null;_this._status=_this.STATUS.OFF;return _this}RangingTool.prototype["turnOn"]=function(){if(this._status===this.STATUS.OFF){this._off2Ready();this._cacheDoubleClickZoom=this._map["getStatus"]()["doubleClickZoom"];this._map["setStatus"]({doubleClickZoom:false})}};RangingTool.prototype["turnOff"]=function(removeOverlays){if(this._status===this.STATUS.READY){this._ready2Off();this._map["setStatus"]({doubleClickZoom:this._cacheDoubleClickZoom})}else if(this._status===this.STATUS.WORKING){this._onEnd();this._working2Off();this._map["setStatus"]({doubleClickZoom:this._cacheDoubleClickZoom})}if(removeOverlays){this._removeAllRecords()}};RangingTool.prototype.setOptions=function(opts){this.merge(this,opts)};RangingTool.prototype.merge=function(obj1,obj2){for(var i in obj2){if(obj2.hasOwnProperty(i)){obj1[i]=obj2[i];if(i==="tmpLineOptions"||i==="lineOptions"){obj1[i]["bubble"]=true}}}};RangingTool.prototype.updateOptions=function(marker,options){var setting={position:[undefined,"setPosition"],draggable:[false,"setDraggable"],content:[undefined,"setContent"],icon:[undefined,"setIcon"],offset:[undefined,"setOffset"],zIndex:[100,"setzIndex"]};for(var key in setting){if(setting.hasOwnProperty(key)){var value=options[key]||setting[key][0];if(value!==undefined){marker[setting[key][1]](value)}}}};RangingTool.prototype._off2Ready=function(){this._map.on("click",this._onStart,this,true);this._status=this.STATUS.READY};RangingTool.prototype._ready2Off=function(){this._map.off("click",this._onStart,this);this._status=this.STATUS.OFF};RangingTool.prototype._ready2Working=function(){this._map.on("click",this._onAddNode,this);this._map.on("mousemove",this._onMouseMove,this);this._map.on("rightclick",this._onEnd,this,true);this._map.on("dblclick",this._onEnd,this,true);this._container.addEventListener("keydown",this._keydownEvent);this._status=this.STATUS.WORKING};RangingTool.prototype._working2Off=function(){this._map.off("click",this._onStart,this);this._map.off("click",this._onAddNode,this);this._map.off("mousemove",this._onMouseMove,this);this._map.off("rightclick",this._onEnd,this);this._map.off("dblclick",this._onEnd,this,true);this._container.removeEventListener("keydown",this._keydownEvent);this._status=this.STATUS.OFF};RangingTool.prototype._working2Ready=function(){this._working2Off();this._off2Ready();this._status=this.STATUS.READY};RangingTool.prototype._onStart=function(e){this._map["setStatus"]({allBubble:true});var record={prev:this._lastRecord};var node={_position:e["lnglat"],_marker:null};record._lastNode=node;if(this._lastRecord){this._lastRecord.next=record}this.originDraggable=this._map["getStatus"]()["dragEnable"];this._map["setStatus"]({dragEnable:false});this._lastRecord=record;this._renderMarker(node,this["startMarkerOptions"]);this._renderLabel(node,this["startLabelText"],this["startLabelOffset"],this._getRemoveNodeFunction(node,record));this._ready2Working();var addnodeEvent={position:e["lnglat"],marker:node._marker};this.emit("addnode",addnodeEvent)};RangingTool.prototype._onAddNode=function(e){var record=this._lastRecord;var prevNode=record._lastNode;var newNode={_position:e["lnglat"],prev:prevNode,_marker:null};if(prevNode&&prevNode._position.equals(e["lnglat"])){this._onEnd();return}prevNode.next=newNode;record._lastNode=newNode;this._renderMarker(newNode,this["midMarkerOptions"]);this._renderLabel(newNode,this["midLabelText"],this["midLabelOffset"],this._getRemoveNodeFunction(newNode,record));this._renderLine(record);if(this._tmpLine){this._tmpLine["setPath"]([e["lnglat"],e["lnglat"]])}var addnodeEvent={position:e["lnglat"],marker:newNode._marker};this.emit("addnode",addnodeEvent)};RangingTool.prototype._onMouseMove=function(e){var record=this._lastRecord;var position=record._lastNode._position;if(!this._tmpLine){this._tmpLine=new AMap.Polyline(this["tmpLineOptions"]);this._tmpLine.name="tmpLine";this._map.add(this._tmpLine)}this._tmpLine.isOfficial=true;this._tmpLine["setPath"]([position,e["lnglat"]]);var distance=this._tmpLine["getLength"]();if(record._line){distance+=record._line["getLength"]()}var moveEvent={position:e["lnglat"],distance:distance,target:this};this.emit("move",moveEvent)};RangingTool.prototype._onKeyDown=function(e){if(e.keyCode===27){this._onEnd()}};RangingTool.prototype._onEnd=function(){var record=this._lastRecord;var node=record&&record._lastNode;this._map["setStatus"]({allBubble:false,dragEnable:this.originDraggable});this["endMarkerOptions"]["bubble"]=false;if(node&&node.prev){this._renderMarker(node,this["endMarkerOptions"]);this._renderLabel(node,this["endLabelText"],this["endLabelOffset"],this._getRemoveNodeFunction(node,record),this._getRemoveRecordFunction(record))}else if(record){this._removeRecord(record)}this._working2Ready();if(this._tmpLine){this._map.remove(this._tmpLine);this._tmpLine=null}if(record&&record._line){record._line["setOptions"]({bubble:false});var endEvent={polyline:record._line,points:record._line["getPath"](),distance:record._line["getLength"]()};this.emit("end",endEvent)}else{this.emit("cancel",{obj:false})}};RangingTool.prototype._renderLine=function(record){var path=[];var cur=record._lastNode;while(cur){path.unshift(cur._position);cur=cur.prev}if(path.length<2){this._removeRecord(record)}else{if(record._line){record._line["setPath"](path)}else{record._line=new AMap.Polyline(this["lineOptions"]);record._line.isOfficial=true;record._line.name="recrdLine";record._line["setPath"](path);this._map.add(record._line)}}};RangingTool.prototype._renderMarker=function(node,options){var isNew=!node._marker;var map=this._map;this.merge(options,{position:node._position,bubble:true,innerOverlay:true});if(!isNew){this.updateOptions(node._marker,options)}else{node._marker=new AMap.Marker(options);node._marker.name="marker";this._map.add(node._marker);node._marker.isOfficial=true}};RangingTool.prototype._renderLabel=function(node,text,offset,dnCallback,dlCallback){var content=document.createElement("div");var d=0;if(node._label){this._map.remove(node._label);delete node._label}if(text.match("{d}")){var cur=node.prev;while(cur){var dis=AMap.GeometryUtil.distance(cur._position,cur.next._position);d+=dis;cur=cur.prev}d=(d/this.d).toFixed(this.d===1?1:2);text=text.replace("{d}",d)}content.className="amap-ranging-label";var span=document.createElement("span");span.innerHTML=text;content.appendChild(span);if(dnCallback){content.appendChild(this._getSmallButton(this.dn,dnCallback))}if(dlCallback){content.appendChild(this._getSmallButton(this.dl,dlCallback))}node._label=new AMap.Marker({content:content,position:node._position,offset:offset,cursor:"pointer",zIndex:110,bubble:false});node._label.isOfficial=true;node._marker.name="label";this._map.add(node._label)};RangingTool.prototype._updateLabels=function(record){var cur=record._lastNode;if(cur){this._renderLabel(cur,this["endLabelText"],this["endLabelOffset"],this._getRemoveNodeFunction(cur,record),this._getRemoveRecordFunction(record));while(cur.prev){cur=cur.prev;this._renderLabel(cur,this["midLabelText"],this["midLabelOffset"],this._getRemoveNodeFunction(cur,record))}this._renderLabel(cur,this["startLabelText"],this["startLabelOffset"],this._getRemoveNodeFunction(cur,record))}};RangingTool.prototype._getSmallButton=function(html,callback){var button=document.createElement("span");button.innerHTML=html;button.addEventListener("click",function(e){callback()});button.addEventListener("mousedown",function(e){e.stopPropagation()});return button};RangingTool.prototype._getRemoveNodeFunction=function(node,record){var _this=this;var removeNodeFun=function(){if(_this._status!==_this.STATUS.WORKING){_this._removeNode(node,record)}};return removeNodeFun};RangingTool.prototype._getRemoveRecordFunction=function(record){var self=this;return function(e){if(self._status!==self.STATUS.WORKING){self.emit("delete",{target:self});self._removeRecord(record)}}};RangingTool.prototype._removeNode=function(node,record){if(node.prev){node.prev.next=node.next}else if(node.next){this._renderMarker(node.next,this["startMarkerOptions"])}if(node.next){node.next.prev=node.prev}else if(node.prev){this._renderMarker(node.prev,this["endMarkerOptions"]);record._lastNode=node.prev}node.prev=node.next=null;if(node._marker){this._map.remove(node._marker);node._marker=null}if(node._label){this._map.remove(node._label);node._label=null}this._renderLine(record);this._updateLabels(record);var removenodeEvent={polyline:record._line,points:record._line?record._line["getPath"]():[],distance:record._line?record._line["getLength"]():null,target:this};this.emit("removenode",removenodeEvent)};RangingTool.prototype._removeRecord=function(record){var node=record._lastNode;if(record._line){this._map.remove(record._line);record._line=null}while(node){if(node._marker){this._map.remove(node._marker);node._marker=null}if(node._label){this._map.remove(node._label);node._label=null}node=node.prev}if(record.prev){record.prev.next=record.next}if(record.next){record.next.prev=record.prev}else{this._lastRecord=record.prev}record._lastNode=record.prev=record.next=null};RangingTool.prototype._removeAllRecords=function(){while(this._lastRecord){this._removeRecord(this._lastRecord)}};return RangingTool}(AMap.Event);AMap["RangingTool"]=RangingTool})(); ') \ No newline at end of file diff --git a/src/main.ts b/src/main.ts index 98d56bd4..129f83d4 100644 --- a/src/main.ts +++ b/src/main.ts @@ -14,17 +14,22 @@ import '@fortawesome/fontawesome-free/css/all.css' import '@/styles/index.scss' import '@/assets/font/iconfont.css' import { ElDialog } from 'element-plus' - +// 引入vue-amap +import VueAMap, { initAMapApiLoader } from '@vuemap/vue-amap' +import '@vuemap/vue-amap/dist/style.css' window.XEUtils = XEUtils - const app = createApp(App) +initAMapApiLoader({ + offline: true +}) app.use(router) app.use(pinia) -app.use(ElementPlus); -(app._context.components.ElDialog as typeof ElDialog).props.closeOnClickModal.default = false +app.use(VueAMap) +app.use(ElementPlus) app.use(VXETable) +;(app._context.components.ElDialog as typeof ElDialog).props.closeOnClickModal.default = false registerIcons(app) // icons app.mount('#app') diff --git a/src/views/pms/voltage-sags/overview.vue b/src/views/pms/voltage-sags/overview.vue new file mode 100644 index 00000000..3d95feed --- /dev/null +++ b/src/views/pms/voltage-sags/overview.vue @@ -0,0 +1,28 @@ + + + + + \ No newline at end of file