diff --git a/docs/dist/react-bmap.min.js b/docs/dist/react-bmap.min.js index 5bd4323..4d2cc4d 100644 --- a/docs/dist/react-bmap.min.js +++ b/docs/dist/react-bmap.min.js @@ -1 +1 @@ -!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e(require("react"),require("react-dom")):"function"==typeof define&&define.amd?define(["react","react-dom"],e):"object"==typeof exports?exports.ReactBMap=e(require("react"),require("react-dom")):t.ReactBMap=e(t.React,t.ReactDOM)}("undefined"!=typeof self?self:this,function(t,e){return function(t){function e(i){if(n[i])return n[i].exports;var o=n[i]={i:i,l:!1,exports:{}};return t[i].call(o.exports,o,o.exports,e),o.l=!0,o.exports}var n={};return e.m=t,e.c=n,e.d=function(t,n,i){e.o(t,n)||Object.defineProperty(t,n,{configurable:!1,enumerable:!0,get:i})},e.n=function(t){var n=t&&t.__esModule?function(){return t.default}:function(){return t};return e.d(n,"a",n),n},e.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},e.p="",e(e.s=9)}([function(t,e,n){"use strict";function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function r(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0});var a=function(){function t(t,e){for(var n=0;np&&(t[f]=256*p),u&&u>=s&&u<=l?(t[f-3]=e[u],t[f-2]=e[u+1],t[f-1]=e[u+2]):t[f]=0}function c(t){return t.max||100}function h(t){return t.min||0}function f(t,e,n){var i=c(n),o=h(n),r=n._size;void 0==r&&void 0==(r=n.size)&&(r=13);var a=new l({gradient:n.gradient,max:i,min:o}),s=u(r),p=s.width/2,f=s.height/2,d=e,v={};d.forEach(function(t,e){var n=void 0===t.count?1:t.count,o=Math.min(1,n/i).toFixed(2);v[o]=v[o]||[],v[o].push(t)});for(var y in v)if(!isNaN(y)){var g=v[y];t.beginPath(),n.withoutAlpha||(t.globalAlpha=y),t.strokeStyle=a.getColor(y*i),g.forEach(function(e,o){if(e.geometry){var r=e.geometry._coordinates||e.geometry.coordinates,a=e.geometry.type;if("Point"===a){var l=void 0===e.count?1:e.count;t.globalAlpha=l/i,t.drawImage(s,r[0]-p,r[1]-f)}else if("LineString"===a){var l=void 0===e.count?1:e.count;t.globalAlpha=l/i,t.beginPath(),At.draw(t,e,n),t.stroke()}}})}}function d(t,e,n){if(!(t.canvas.width<=0||t.canvas.height<=0)){var i=n.strength||.3;t.strokeStyle="rgba(0,0,0,"+i+")";var r=new s(t.canvas.width,t.canvas.height),a=r.getContext("2d");a.scale(Ut,Ut),n=n||{};var u=e instanceof o?e.get():e;t.save();var c=new l({gradient:n.gradient});if(f(a,u,n),!n.absolute){var h=a.getImageData(0,0,t.canvas.width,t.canvas.height);p(h.data,c.getImageData(),n),t.putImageData(h,0,0),t.restore()}c=null,r=null}}function v(t,e,n){var i=60*n+30,o=Math.PI/180*i;return[t.x+e*Math.cos(o),t.y+e*Math.sin(o)]}function y(t,e,n){var i=t.createShader(n);return t.shaderSource(i,e),t.compileShader(i),i}function g(t,e,n){var i=y(t,e,t.VERTEX_SHADER),o=y(t,n,t.FRAGMENT_SHADER),r=t.createProgram();return t.attachShader(r,i),t.attachShader(r,o),t.linkProgram(r),t.useProgram(r),r}function m(t){var e=document.createElement("canvas"),n=e.getContext("2d");return e.width=1,e.height=1,n.fillStyle=t,n.fillRect(0,0,1,1),n.getImageData(0,0,1,1).data}function b(t,e,n){if(e){var i=g(t,qt,Vt);t.enable(t.BLEND),t.blendFunc(t.SRC_ALPHA,t.ONE),t.clear(t.COLOR_BUFFER_BIT);var o=t.canvas.width/2,r=t.canvas.height/2,a=t.createBuffer();t.bindBuffer(t.ARRAY_BUFFER,a);var s=t.getAttribLocation(i,"a_Position");t.vertexAttribPointer(s,2,t.FLOAT,!1,0,0),t.enableVertexAttribArray(s);var l=t.getUniformLocation(i,"u_FragColor"),u=m(n.strokeStyle||"red");t.uniform4f(l,u[0]/255,u[1]/255,u[2]/255,u[3]/255),t.lineWidth(n.lineWidth||1);for(var p=0,c=e.length;p1||d<-1||d>1||(u.push(f,d),p++)}var v=new Float32Array(u),y=p,b=t.createBuffer();t.bindBuffer(t.ARRAY_BUFFER,b),t.bufferData(t.ARRAY_BUFFER,v,t.STATIC_DRAW),t.vertexAttribPointer(o,2,t.FLOAT,!1,0,0),t.enableVertexAttribArray(o),t.vertexAttrib1f(r,n._size);var w=m(n.fillStyle||"red");t.uniform4f(a,w[0]/255,w[1]/255,w[2]/255,w[3]/255),t.drawArrays(t.POINTS,0,y)}}function _(t,e,n){n=n||2;var i=e&&e.length,o=i?e[0]*n:t.length,r=x(t,0,o,n,!0),a=[];if(!r)return a;var s,l,u,p,c,h,f;if(i&&(r=z(t,e,r,n)),t.length>80*n){s=u=t[0],l=p=t[1];for(var d=n;du&&(u=c),h>p&&(p=h);f=Math.max(u-s,p-l)}return O(r,a,n,s,l,f),a}function x(t,e,n,i,o){var r,a;if(o===X(t,e,n,i)>0)for(r=e;r=e;r-=i)a=Y(r,t[r],t[r+1],a);return a&&Z(a,a.next)&&($(a),a=a.next),a}function k(t,e){if(!t)return t;e||(e=t);var n,i=t;do{if(n=!1,i.steiner||!Z(i,i.next)&&0!==N(i.prev,i,i.next))i=i.next;else{if($(i),(i=e=i.prev)===i.next)return null;n=!0}}while(n||i!==e);return e}function O(t,e,n,i,o,r,a){if(t){!a&&r&&R(t,i,o,r);for(var s,l,u=t;t.prev!==t.next;)if(s=t.prev,l=t.next,r?M(t,i,o,r):S(t))e.push(s.i/n),e.push(t.i/n),e.push(l.i/n),$(t),t=l.next,u=l.next;else if((t=l)===u){a?1===a?(t=E(t,e,n),O(t,e,n,i,o,r,2)):2===a&&C(t,e,n,i,o,r):O(k(t),e,n,i,o,r,1);break}}}function S(t){var e=t.prev,n=t,i=t.next;if(N(e,n,i)>=0)return!1;for(var o=t.next.next;o!==t.prev;){if(F(e.x,e.y,n.x,n.y,i.x,i.y,o.x,o.y)&&N(o.prev,o,o.next)>=0)return!1;o=o.next}return!0}function M(t,e,n,i){var o=t.prev,r=t,a=t.next;if(N(o,r,a)>=0)return!1;for(var s=o.xr.x?o.x>a.x?o.x:a.x:r.x>a.x?r.x:a.x,p=o.y>r.y?o.y>a.y?o.y:a.y:r.y>a.y?r.y:a.y,c=A(s,l,e,n,i),h=A(u,p,e,n,i),f=t.nextZ;f&&f.z<=h;){if(f!==t.prev&&f!==t.next&&F(o.x,o.y,r.x,r.y,a.x,a.y,f.x,f.y)&&N(f.prev,f,f.next)>=0)return!1;f=f.nextZ}for(f=t.prevZ;f&&f.z>=c;){if(f!==t.prev&&f!==t.next&&F(o.x,o.y,r.x,r.y,a.x,a.y,f.x,f.y)&&N(f.prev,f,f.next)>=0)return!1;f=f.prevZ}return!0}function E(t,e,n){var i=t;do{var o=i.prev,r=i.next.next;!Z(o,r)&&W(o,i,i.next,r)&&V(o,r)&&V(r,o)&&(e.push(o.i/n),e.push(i.i/n),e.push(r.i/n),$(i),$(i.next),i=t=r),i=i.next}while(i!==t);return i}function C(t,e,n,i,o,r){var a=t;do{for(var s=a.next.next;s!==a.prev;){if(a.i!==s.i&&U(a,s)){var l=J(a,s);return a=k(a,a.next),l=k(l,l.next),O(a,e,n,i,o,r),void O(l,e,n,i,o,r)}s=s.next}a=a.next}while(a!==t)}function z(t,e,n,i){var o,r,a,s,l,u=[];for(o=0,r=e.length;o=i.next.y){var s=i.x+(r-i.y)*(i.next.x-i.x)/(i.next.y-i.y);if(s<=o&&s>a){if(a=s,s===o){if(r===i.y)return i;if(r===i.next.y)return i.next}n=i.x=i.x&&i.x>=p&&F(rn.x)&&V(i,t)&&(n=i,h=l),i=i.next;return n}function R(t,e,n,i){var o=t;do{null===o.z&&(o.z=A(o.x,o.y,e,n,i)),o.prevZ=o.prev,o.nextZ=o.next,o=o.next}while(o!==t);o.prevZ.nextZ=null,o.prevZ=null,B(o)}function B(t){var e,n,i,o,r,a,s,l,u=1;do{for(n=t,t=null,r=null,a=0;n;){for(a++,i=n,s=0,e=0;e0||l>0&&i;)0===s?(o=i,i=i.nextZ,l--):0!==l&&i?n.z<=i.z?(o=n,n=n.nextZ,s--):(o=i,i=i.nextZ,l--):(o=n,n=n.nextZ,s--),r?r.nextZ=o:t=o,o.prevZ=r,r=o;n=i}r.nextZ=null,u*=2}while(a>1);return t}function A(t,e,n,i,o){return t=32767*(t-n)/o,e=32767*(e-i)/o,t=16711935&(t|t<<8),t=252645135&(t|t<<4),t=858993459&(t|t<<2),t=1431655765&(t|t<<1),e=16711935&(e|e<<8),e=252645135&(e|e<<4),e=858993459&(e|e<<2),e=1431655765&(e|e<<1),t|e<<1}function I(t){var e=t,n=t;do{e.x=0&&(t-a)*(i-s)-(n-a)*(e-s)>=0&&(n-a)*(r-s)-(o-a)*(i-s)>=0}function U(t,e){return t.next.i!==e.i&&t.prev.i!==e.i&&!q(t,e)&&V(t,e)&&V(e,t)&&H(t,e)}function N(t,e,n){return(e.y-t.y)*(n.x-e.x)-(e.x-t.x)*(n.y-e.y)}function Z(t,e){return t.x===e.x&&t.y===e.y}function W(t,e,n,i){return!!(Z(t,e)&&Z(n,i)||Z(t,i)&&Z(n,e))||N(t,e,n)>0!=N(t,e,i)>0&&N(n,i,t)>0!=N(n,i,e)>0}function q(t,e){var n=t;do{if(n.i!==t.i&&n.next.i!==t.i&&n.i!==e.i&&n.next.i!==e.i&&W(n,n.next,t,e))return!0;n=n.next}while(n!==t);return!1}function V(t,e){return N(t.prev,t,t.next)<0?N(t,e,t.next)>=0&&N(t,t.prev,e)>=0:N(t,e,t.prev)<0||N(t,t.next,e)<0}function H(t,e){var n=t,i=!1,o=(t.x+e.x)/2,r=(t.y+e.y)/2;do{n.y>r!=n.next.y>r&&o<(n.next.x-n.x)*(r-n.y)/(n.next.y-n.y)+n.x&&(i=!i),n=n.next}while(n!==t);return i}function J(t,e){var n=new G(t.i,t.x,t.y),i=new G(e.i,e.x,e.y),o=t.next,r=e.prev;return t.next=e,e.prev=t,n.next=o,o.prev=n,i.next=n,n.prev=i,r.next=i,i.prev=r,i}function Y(t,e,n,i){var o=new G(t,e,n);return i?(o.next=i.next,o.prev=i,i.next.prev=o,i.next=o):(o.prev=o,o.next=o),o}function $(t){t.next.prev=t.prev,t.prev.next=t.next,t.prevZ&&(t.prevZ.nextZ=t.nextZ),t.nextZ&&(t.nextZ.prevZ=t.prevZ)}function G(t,e,n){this.i=t,this.x=e,this.y=n,this.prev=null,this.next=null,this.z=null,this.prevZ=null,this.nextZ=null,this.steiner=!1}function X(t,e,n,i){for(var o=0,r=e,a=n-i;r65536&&(t.bufferData(t.ARRAY_BUFFER,new Float32Array(u),t.STATIC_DRAW),t.bufferData(t.ELEMENT_ARRAY_BUFFER,new Uint16Array(p),t.STATIC_DRAW),t.drawElements(t.TRIANGLES,p.length,t.UNSIGNED_SHORT,0),u.length=0,p.length=0,c=0);for(var y=0;y0&&(n=n.concat(o))}return n}function tt(t,e,n){if(!t||!e)return null;var i,o,r,a,s,l,u=function(t){return 1-2*t+t*t},p=function(t){return 2*t-2*t*t},c=function(t){return t*t},h=[],n=n||40,f=0,d=0;if(void 0===e)return void(void 0!==h&&(h=[]));var v=parseFloat(t.lat),y=parseFloat(e.lat),g=parseFloat(t.lng),m=parseFloat(e.lng);for(m>g&&parseFloat(m-g)>180&&g<0&&(g=parseFloat(360+g),m=parseFloat(360+m)),0,l=0,y==v?(i=0,o=g-m):m==g?(i=Math.PI/2,o=v-y):(i=Math.atan((y-v)/(m-g)),o=(y-v)/Math.sin(i)),0==l&&(l=i+Math.PI/5),r=o/2,s=r*Math.cos(l)+g,a=r*Math.sin(l)+v,f=0;f0?b-360:b,w]),d+=1/n}return h}function et(t){this.splitList=t||{other:1}}function nt(t){this.splitList=t||[{start:0,value:"red"}]}function it(t){this.options=t||{},this.paneName=this.options.paneName||"mapPane",this.context=this.options.context||"2d",this.zIndex=this.options.zIndex||0,this.mixBlendMode=this.options.mixBlendMode||null,this.enableMassClear=this.options.enableMassClear,this._map=t.map,this._lastDrawTime=null,this.show()}function ot(t,e){var n=e[0]-t[0],i=e[1]-t[1],o=360*Math.atan(i/n)/(2*Math.PI);return e[0]o&&i>r}function lt(t,e,n,i,o,r){if(!(o-i<=n)){var a=i+o>>1;ut(t,e,a,i,o,r%2),lt(t,e,n,i,a-1,r+1),lt(t,e,n,a+1,o,r+1)}}function ut(t,e,n,i,o,r){for(;o>i;){if(o-i>600){var a=o-i+1,s=n-i+1,l=Math.log(a),u=.5*Math.exp(2*l/3),p=.5*Math.sqrt(l*u*(a-u)/a)*(s-a/2<0?-1:1);ut(t,e,n,Math.max(i,Math.floor(n-s*u/a+p)),Math.min(o,Math.floor(n+(a-s)*u/a+p)),r)}var c=e[2*n+r],h=i,f=o;for(pt(t,e,i,n),e[2*o+r]>c&&pt(t,e,i,o);hc;)f--}e[2*i+r]===c?pt(t,e,i,f):(f++,pt(t,e,f,o)),f<=n&&(i=f+1),n<=f&&(o=f-1)}}function pt(t,e,n,i){ct(t,n,i),ct(e,2*n,2*i),ct(e,2*n+1,2*i+1)}function ct(t,e,n){var i=t[e];t[e]=t[n],t[n]=i}function ht(t,e,n,i,o,r,a){for(var s,l,u=[0,t.length-1,0],p=[];u.length;){var c=u.pop(),h=u.pop(),f=u.pop();if(h-f<=a)for(var d=f;d<=h;d++)s=e[2*d],l=e[2*d+1],s>=n&&s<=o&&l>=i&&l<=r&&p.push(t[d]);else{var v=Math.floor((f+h)/2);s=e[2*v],l=e[2*v+1],s>=n&&s<=o&&l>=i&&l<=r&&p.push(t[v]);var y=(c+1)%2;(0===c?n<=s:i<=l)&&(u.push(f),u.push(v-1),u.push(y)),(0===c?o>=s:r>=l)&&(u.push(v+1),u.push(h),u.push(y))}}return p}function ft(t,e,n,i,o,r){for(var a=[0,t.length-1,0],s=[],l=o*o;a.length;){var u=a.pop(),p=a.pop(),c=a.pop();if(p-c<=r)for(var h=c;h<=p;h++)dt(e[2*h],e[2*h+1],n,i)<=l&&s.push(t[h]);else{var f=Math.floor((c+p)/2),d=e[2*f],v=e[2*f+1];dt(d,v,n,i)<=l&&s.push(t[f]);var y=(u+1)%2;(0===u?n-o<=d:i-o<=v)&&(a.push(c),a.push(f-1),a.push(y)),(0===u?n+o>=d:i+o>=v)&&(a.push(f+1),a.push(p),a.push(y))}}return s}function dt(t,e,n,i){var o=t-n,r=e-i;return o*o+r*r}function vt(t,e,n,i,o){return{x:t,y:e,zoom:1/0,id:n,parentId:-1,numPoints:i,properties:o}}function yt(t,e){var n=t.geometry.coordinates,i=n[0],o=n[1];return{x:bt(i),y:wt(o),zoom:1/0,index:e,parentId:-1}}function gt(t){return{type:"Feature",id:t.id,properties:mt(t),geometry:{type:"Point",coordinates:[_t(t.x),xt(t.y)]}}}function mt(t){var e=t.numPoints,n=e>=1e4?Math.round(e/1e3)+"k":e>=1e3?Math.round(e/100)/10+"k":e;return kt(kt({},t.properties),{cluster:!0,cluster_id:t.id,point_count:e,point_count_abbreviated:n})}function bt(t){return t/360+.5}function wt(t){var e=Math.sin(t*Math.PI/180),n=.5-.25*Math.log((1+e)/(1-e))/Math.PI;return n<0?0:n>1?1:n}function _t(t){return 360*(t-.5)}function xt(t){var e=(180-360*t)*Math.PI/180;return 360*Math.atan(Math.exp(e))/Math.PI-90}function kt(t,e){for(var n in e)t[n]=e[n];return t}function Pt(t){return t.x}function Ot(t){return t.y}function St(t){requestAnimationFrame(St),oe.update(t)}function Mt(t){function e(t,e){return function(){e.apply(t)}}this.isAdded_=!1,this.isAnimated_=!1,this.paneName_=Mt.DEFAULT_PANE_NAME_,this.updateHandler_=null,this.resizeHandler_=null,this.topLeft_=null,this.centerListener_=null,this.resizeListener_=null,this.needsResize_=!0,this.requestAnimationFrameId_=null;var n=document.createElement("canvas");n.style.position="absolute",n.style.top=0,n.style.left=0,n.style.pointerEvents="none",this.canvas=n,this.canvasCssWidth_=300,this.canvasCssHeight_=150,this.resolutionScale_=1,this.repositionFunction_=e(this,this.repositionCanvas_),this.resizeFunction_=e(this,this.resize_),this.requestUpdateFunction_=e(this,this.update_),t&&this.setOptions(t)}var Lt=function(t){t&&t.clearRect&&t.clearRect(0,0,t.canvas.width,t.canvas.height)},Et=function(t){var e=window.devicePixelRatio||1;t.canvas.width=t.canvas.width*e,t.canvas.height=t.canvas.height*e,t.canvas.style.width=t.canvas.width/e+"px",t.canvas.style.height=t.canvas.height/e+"px",t.scale(e,e)};n.prototype.on=function(t,e){var n=this._subscribers[t];n||(n=[],this._subscribers[t]=n),n.push({callback:e})},n.prototype.off=function(t,e){var n=this._subscribers[t];if(n)for(var i=0;in&&(n=o)}return n}},o.prototype.getSum=function(t){var e=this._data;if(e&&!(e.length<=0)){for(var n=0,i=0;in&&(t=n),te&&(t=e),tn?o+(t-n)/(e-n)*(i-o):i},l.prototype.getLegend=function(t){var e=this.gradient,n=t.width||20,i=t.height||180,o=new s(n,i),r=o.getContext("2d"),a=r.createLinearGradient(0,i,0,0);for(var l in e)a.addColorStop(parseFloat(l),e[l]);return r.fillStyle=a,r.fillRect(0,0,n,i),o};var Ft="undefined"==typeof window?{}:window,Ut=Ft.devicePixelRatio||1,Nt={draw:d},Zt={draw:function(t,e,n){t.save();var i=e instanceof o?e.get():e,r={},a=n._size||n.size||50,s=!("enableCluster"in n)||n.enableCluster,u=n.offset||{x:0,y:0},p=new l({min:n.min||0,max:n.max||100,gradient:n.gradient});if(s){for(var c=0;c1){var w=g-m,_=m+(gk*k+P*P&&(m=_+(1&y?1:-1)/2,y=x)}var O=m+"-"+y,S=c[O];S?S.push(i[h]):(S=c[O]=[i[h]],S.i=m,S.j=y,S.x=(m+(1&y?.5:0))*u,S.y=y*p)}var M=new l({max:n.max||100,maxSize:s,gradient:n.gradient});for(var r in c){var L=c[r];t.beginPath();for(var E=0;E<6;E++){var C=v({x:L.x+a.x,y:L.y+a.y},s,E);t.lineTo(C[0],C[1])}t.closePath();for(var z=0,h=0;h0&&(i+=t[o-1].length,n.holes.push(i))}return n};var Gt=["attribute vec4 a_Position;","void main() {","gl_Position = a_Position;","gl_PointSize = 30.0;","}"].join(""),Xt=["precision mediump float;","uniform vec4 u_FragColor;","void main() {","gl_FragColor = u_FragColor;","}"].join(""),Kt={draw:K},Qt={draw:function(t,e,n){var i=e instanceof o?e.get():e;i.length>0&&("LineString"==i[0].geometry.type?Ht.draw(t,i,n):"Polygon"==i[0].geometry.type||"MultiPolygon"==i[0].geometry.type?Kt.draw(t,i,n):$t.draw(t,i,n))}},te={getPoints:Q},ee=function(){function t(t,e){return t.x*e.x+t.y*e.y}function e(t){return{x:k[t.target].x-k[t.source].x,y:k[t.target].y-k[t.source].y}}function n(t){return Math.sqrt(Math.pow(k[t.source].x-k[t.target].x,2)+Math.pow(k[t.source].y-k[t.target].y,2))}function i(t){return Math.sqrt(Math.pow(t.source.x-t.target.x,2)+Math.pow(t.source.y-t.target.y,2))}function o(t){return{x:(k[t.source].x+k[t.target].x)/2,y:(k[t.source].y+k[t.target].y)/2}}function r(t){for(var e=0,n=1;nB||Math.abs(s.y)>B){var l=1/Math.pow(i({source:M[r[a]][e],target:M[t][e]}),1);o.x+=s.x*l,o.y+=s.y*l}}return o}function f(t,e,i){for(var o=L/(n(O[t])*(e+1)),r=[{x:0,y:0}],a=1;as;){var c=s/p,h=M[e][u-1].x,f=M[e][u-1].y;h+=c*(M[e][u].x-M[e][u-1].x),f+=c*(M[e][u].y-M[e][u-1].y),l.push({x:h,y:f}),p-=s,s=i}s-=p}l.push(k[O[e].target]),M[e]=l}}function v(i,o){return Math.abs(t(e(i),e(o))/(n(i)*n(o)))}function y(t,e){var i=(n(t)+n(e))/2;return 2/(i/Math.min(n(t),n(e))+Math.max(n(t),n(e))/i)}function g(t,e){var i=(n(t)+n(e))/2;return i/(i+a({x:(k[t.source].x+k[t.target].x)/2,y:(k[t.source].y+k[t.target].y)/2},{x:(k[e.source].x+k[e.target].x)/2,y:(k[e.source].y+k[e.target].y)/2}))}function m(t,e){var n=s(k[e.source],{source:k[t.source],target:k[t.target]}),i=s(k[e.target],{source:k[t.source],target:k[t.target]}),o={x:(n.x+i.x)/2,y:(n.y+i.y)/2},r={x:(k[t.source].x+k[t.target].x)/2,y:(k[t.source].y+k[t.target].y)/2};return Math.max(0,1-2*a(r,o)/a(n,i))}function b(t,e){return Math.min(m(t,e),m(e,t))}function w(t,e){return v(t,e)*y(t,e)*g(t,e)*b(t,e)}function _(t,e){return w(t,e)>=R}function x(){for(var t=0;t=n.length-1));r++);this.splitList.other=n[n.length-1]},et.prototype.getLegend=function(t){var e=this.splitList,n=document.createElement("div");n.style.cssText="background:#fff; padding: 5px; border: 1px solid #ccc;";var i="";for(var o in e)i+='
'+o+"
";return n.innerHTML=i,n},nt.prototype.get=function(t){for(var e=this.splitList,n=!1,i=0;i=e[i].start)&&(void 0===e[i].end||void 0!==e[i].end&&t1?1:w,_=f(w);for(u in o)if(void 0!==i[u]){var x=i[u]||0,k=o[u];k instanceof Array?n[u]=d(k,_):("string"==typeof k&&(k="+"===k.charAt(0)||"-"===k.charAt(0)?x+parseFloat(k):parseFloat(k)),"number"==typeof k&&(n[u]=x+(k-x)*_))}if(null!==m&&m.call(n,_),1===w){if(s>0){isFinite(s)&&s--;for(u in r){if("string"==typeof o[u]&&(r[u]=r[u]+parseFloat(o[u])),l){var P=r[u];r[u]=o[u],o[u]=P}i[u]=r[u]}return l&&(p=!p),h=void 0!==e?t+e:t+c,!0}null!==b&&b.call(n,n);for(var O=0,S=v.length;O1?r(t[n],t[n-1],n-i):r(t[o],t[o+1>n?n:o+1],i-o)},Bezier:function(t,e){for(var n=0,i=t.length-1,o=Math.pow,r=oe.Interpolation.Utils.Bernstein,a=0;a<=i;a++)n+=o(1-e,i-a)*o(e,a)*t[a]*r(i,a);return n},CatmullRom:function(t,e){var n=t.length-1,i=n*e,o=Math.floor(i),r=oe.Interpolation.Utils.CatmullRom;return t[0]===t[n]?(e<0&&(o=Math.floor(i=n*(1+e))),r(t[(o-1+n)%n],t[o],t[(o+1)%n],t[(o+2)%n],i-o)):e<0?t[0]-(r(t[0],t[0],t[1],t[1],-i)-t[0]):e>1?t[n]-(r(t[n],t[n],t[n-1],t[n-1],i-n)-t[n]):r(t[o?o-1:0],t[o],t[n1;i--)n*=i;return t[e]=n,n}}(),CatmullRom:function(t,e,n,i,o){var r=.5*(n-t),a=.5*(i-e),s=o*o;return(2*e-2*n+r+a)*(o*s)+(-3*e+3*n-2*r-a)*s+r*o+e}}};var re={},ae={draw:function(t,e,n){var i="http://huiyan.baidu.com/github/tools/gis-drawing/static/images/direction.png";n.arrow&&n.arrow.url&&(i=n.arrow.url),re[i]||(re[i]=null);var r=re[i];if(!r){var a=Array.prototype.slice.call(arguments),s=new Image;return s.onload=function(){re[i]=s,ae.draw.apply(null,a)},void(s.src=i)}var l=e instanceof o?e.get():e;t.save();for(var u in n)t[u]=n[u];for(var p=[],c=null,h=0,f=l.length;h=n;s--){Date.now();r=this._cluster(r,s),this.trees[s]=new fe(r,Pt,Ot,o,Float32Array)}return this},ve.prototype.getClusters=function(t,e){var n=((t[0]+180)%360+360)%360-180,i=Math.max(-90,Math.min(90,t[1])),o=180===t[2]?180:((t[2]+180)%360+360)%360-180,r=Math.max(-90,Math.min(90,t[3]));if(t[2]-t[0]>=360)n=-180,o=180;else if(n>o){var a=this.getClusters([n,i,180,r],e),s=this.getClusters([-180,i,o,r],e);return a.concat(s)}for(var l=this.trees[this._limitZoom(e)],u=l.range(bt(n),wt(r),bt(o),wt(i)),p=[],c=0,h=u;c>5,n=t%32,i="No cluster with the specified id.",o=this.trees[n];if(!o)throw new Error(i);var r=o.points[e];if(!r)throw new Error(i);for(var a=this.options.radius/(this.options.extent*Math.pow(2,n-1)),s=o.within(r.x,r.y,a),l=[],u=0,p=s;u1?this._map(u,!0):null,y=(l<<5)+(e+1),g=0,m=c;g-1){if(t.isPointInStroke&&t.isPointInStroke(r,a))return n[i]}else if(t.isPointInPath(r,a))return n[i]}}},{key:"clickEvent",value:function(t,e){if(this.options.methods){var n=this.isPointInPath(this.getContext(),t);n?this.options.methods.click(n,e):this.options.methods.click(null,e)}}},{key:"mousemoveEvent",value:function(t,e){if(this.options.methods){var n=this.isPointInPath(this.getContext(),t);n?this.options.methods.mousemove(n,e):this.options.methods.mousemove(null,e)}}},{key:"tapEvent",value:function(t,e){if(this.options.methods){var n=this.isPointInPath(this.getContext(),t);n?this.options.methods.tap(n,e):this.options.methods.tap(null,e)}}},{key:"update",value:function(t,e){var n=this,i=t.options,o=n.options;for(var r in i)o[r]=i[r];n.init(o),!1!==e&&n.draw()}},{key:"setOptions",value:function(t){var e=this;e.dataSet.reset(),e.init(t),e.draw()}},{key:"set",value:function(t){var e=this,n=this.getContext(),i=this.getDefaultContextConfig();for(var o in i)n[o]=i[o];e.init(t.options),e.draw()}},{key:"destroy",value:function(){this.unbindEvent(),this.hide()}},{key:"initAnimator",value:function(){var t=this,e=t.options.animation;if("time"==t.options.draw||t.isEnabledTime()){e.stepsRange||(e.stepsRange={start:this.dataSet.getMin("time")||0,end:this.dataSet.getMax("time")||0}),this.steps={step:e.stepsRange.start},t.animator=new oe.Tween(this.steps).onUpdate(function(){t._canvasUpdate(this.step)}).repeat(1/0),this.addAnimatorEvent();var n=1e3*e.duration||5e3;t.animator.to({step:e.stepsRange.end},n),t.animator.start()}else t.animator&&t.animator.stop()}},{key:"addAnimatorEvent",value:function(){}},{key:"animatorMovestartEvent",value:function(){var t=this.options.animation;this.isEnabledTime()&&this.animator&&(this.steps.step=t.stepsRange.start,this.animator.stop())}},{key:"animatorMoveendEvent",value:function(){this.isEnabledTime()&&this.animator&&this.animator.start()}}]),t}(),ge=function(t){function e(t,n,i){Tt(this,e);var o=Bt(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t,n,i));o.map=t,o.options=i||{},o.dataSet=n;var r=new it({map:t,zIndex:o.options.zIndex,update:o._canvasUpdate.bind(o)});o.init(o.options),o.canvasLayer=r,o.transferToMercator();var a=o;return n.on("change",function(){a.transferToMercator(),r.draw()}),o.ctx=r.canvas.getContext("2d"),o.start(),o}return Rt(e,t),jt(e,[{key:"draw",value:function(){this.canvasLayer.draw()}},{key:"init",value:function(t){var e=this;e.options=t,this.initDataRange(t),this.context=e.options.context||"2d",e.options.zIndex&&this.canvasLayer&&this.canvasLayer.setZIndex(e.options.zIndex),e.options.max&&this.intensity.setMax(e.options.max),e.options.min&&this.intensity.setMin(e.options.min),this.initAnimator()}},{key:"transferToMercator",value:function(){var t=this.map.getMapType().getProjection();if("bd09mc"!==this.options.coordType){var e=this.dataSet.get();e=this.dataSet.transferCoordinate(e,function(e){var n=t.lngLatToPoint({lng:e[0],lat:e[1]});return[n.x,n.y]},"coordinates","coordinates_mercator"),this.dataSet._set(e)}}},{key:"_canvasUpdate",value:function(){var t=this.ctx;if(t){var e=this.map,n=Math.pow(2,18-e.getZoom()),i=e.getMapType().getProjection(),o=i.lngLatToPoint(e.getCenter()),r=new BMap.Pixel(o.x-e.getSize().width/2*n,o.y+e.getSize().height/2*n);Lt(t);var a={fromColumn:"bd09mc"==this.options.coordType?"coordinates":"coordinates_mercator",transferCoordinate:function(t){if(t){return[(t[0]-r.x)/n,(r.y-t[1])/n]}}};this.data=this.dataSet.get(a),this.processData(this.data),this.drawAnimation()}}},{key:"drawAnimation",value:function(){var t=this.ctx,e=this.data;if(e){t.save(),t.globalCompositeOperation="destination-out",t.fillStyle="rgba(0, 0, 0, .1)",t.fillRect(0,0,t.canvas.width,t.canvas.height),t.restore(),t.save(),this.options.shadowColor&&(t.shadowColor=this.options.shadowColor),this.options.shadowBlur&&(t.shadowBlur=this.options.shadowBlur),this.options.globalAlpha&&(t.globalAlpha=this.options.globalAlpha),this.options.globalCompositeOperation&&(t.globalCompositeOperation=this.options.globalCompositeOperation);for(var n=this.options,i=0;io&&(e[i]._size=r),t.lineWidth=1,t.strokeStyle=e[i].strokeStyle||e[i]._strokeStyle||n.strokeStyle||"yellow",t.stroke();var a=e[i].fillStyle||e[i]._fillStyle||n.fillStyle;a&&(t.fillStyle=a,t.fill())}else if("LineString"===e[i].geometry.type){t.beginPath();var s=e[i].size||this.options.size||5,r=e[i].minSize||this.options.minSize||0;void 0===e[i]._index&&(e[i]._index=0);var l=e[i]._index;t.arc(e[i].geometry._coordinates[l][0],e[i].geometry._coordinates[l][1],s,0,2*Math.PI,!0),t.closePath(),e[i]._index++,e[i]._index>=e[i].geometry._coordinates.length&&(e[i]._index=0);var u=e[i].strokeStyle||n.strokeStyle,a=e[i].fillStyle||n.fillStyle||"yellow";t.fillStyle=a,t.fill(),u&&n.lineWidth&&(t.lineWidth=n.lineWidth||1,t.strokeStyle=u,t.stroke())}t.restore()}}},{key:"animate",value:function(){this.drawAnimation();var t=this.options.animateTime||100;this.timeout=setTimeout(this.animate.bind(this),t)}},{key:"start",value:function(){this.stop(),this.animate()}},{key:"stop",value:function(){clearTimeout(this.timeout)}},{key:"unbindEvent",value:function(){}},{key:"hide",value:function(){this.canvasLayer.hide(),this.stop()}},{key:"show",value:function(){this.start()}},{key:"clearData",value:function(){this.dataSet&&this.dataSet.clear(),this.update({options:null})}},{key:"destroy",value:function(){this.stop(),this.unbindEvent(),this.clearData(),this.map.removeOverlay(this.canvasLayer),this.canvasLayer=null}}]),e}(ye),me=function(t){function e(t,n,i){Tt(this,e);var o=Bt(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t,n,i)),r=o;i=i||{},o.clickEvent=o.clickEvent.bind(o),o.mousemoveEvent=o.mousemoveEvent.bind(o),o.tapEvent=o.tapEvent.bind(o),r.init(i),r.argCheck(i),r.transferToMercator();var a=o.canvasLayer=new it({map:t,context:o.context,paneName:i.paneName,mixBlendMode:i.mixBlendMode,enableMassClear:i.enableMassClear,zIndex:i.zIndex,update:function(){r._canvasUpdate()}});return n.on("change",function(){r.transferToMercator(),a.draw()}),o}return Rt(e,t),jt(e,[{key:"clickEvent",value:function(t){var n=t.pixel;Dt(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"clickEvent",this).call(this,n,t)}},{key:"mousemoveEvent",value:function(t){var n=t.pixel;Dt(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"mousemoveEvent",this).call(this,n,t)}},{key:"tapEvent",value:function(t){var n=t.pixel;Dt(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"tapEvent",this).call(this,n,t)}},{key:"bindEvent",value:function(t){this.unbindEvent();var e=this.map,n=0,i=this;this.options.methods&&(this.options.methods.click&&(e.setDefaultCursor("default"),e.addEventListener("click",this.clickEvent)),this.options.methods.mousemove&&e.addEventListener("mousemove",this.mousemoveEvent),"ontouchend"in window.document&&this.options.methods.tap&&(e.addEventListener("touchstart",function(t){n=new Date}),e.addEventListener("touchend",function(t){new Date-n<300&&i.tapEvent(t)})))}},{key:"unbindEvent",value:function(t){var e=this.map;this.options.methods&&(this.options.methods.click&&e.removeEventListener("click",this.clickEvent),this.options.methods.mousemove&&e.removeEventListener("mousemove",this.mousemoveEvent))}},{key:"transferToMercator",value:function(t){t||(t=this.dataSet);var e=this.map.getMapType().getProjection();if("bd09mc"!==this.options.coordType){var n=t.get();n=t.transferCoordinate(n,function(t){if(t[0]<-180||t[0]>180||t[1]<-90||t[1]>90)return t;var n=e.lngLatToPoint({lng:t[0],lat:t[1]});return[n.x,n.y]},"coordinates","coordinates_mercator"),t._set(n)}}},{key:"getContext",value:function(){return this.canvasLayer.canvas.getContext(this.context)}},{key:"_canvasUpdate",value:function(t){if(this.canvasLayer){var e=this,n=e.options.animation,i=this.canvasLayer._map,o=Math.pow(2,18-i.getZoom()),r=i.getMapType().getProjection(),a=r.lngLatToPoint(i.getCenter()),s=new BMap.Pixel(a.x-i.getSize().width/2*o,a.y+i.getSize().height/2*o),l=this.getContext();if(e.isEnabledTime()){if(void 0===t)return void Lt(l);"2d"==this.context&&(l.save(),l.globalCompositeOperation="destination-out",l.fillStyle="rgba(0, 0, 0, .1)",l.fillRect(0,0,l.canvas.width,l.canvas.height),l.restore())}else Lt(l);if("2d"==this.context)for(var u in e.options)l[u]=e.options[u];else l.clear(l.COLOR_BUFFER_BIT);if(!(e.options.minZoom&&i.getZoom()e.options.maxZoom)){var p=1;"2d"!=this.context&&(p=this.canvasLayer.devicePixelRatio);var c={fromColumn:"bd09mc"==e.options.coordType?"coordinates":"coordinates_mercator",transferCoordinate:function(t){return[(t[0]-s.x)/o*p,(s.y-t[1])/o*p]}};void 0!==t&&(c.filter=function(e){var i=n.trails||10;return!!(t&&e.time>t-i&&e.timee.options.maxZoom)){var a=1;"2d"!=this.context&&(a=this.canvasLayer.devicePixelRatio);var s=this.map,l=s.getProjection(),a=Math.pow(2,s.zoom)*resolutionScale,u=l.fromLatLngToPoint(this.canvasLayer.getTopLeft()),p={transferCoordinate:function(t){var e=new google.maps.LatLng(t[1],t[0]),n=l.fromLatLngToPoint(e),i={x:(n.x-u.x)*a,y:(n.y-u.y)*a};return[i.x,i.y]}};void 0!==t&&(p.filter=function(e){var i=n.trails||10;return!!(t&&e.time>t-i&&e.timee-n&&t.time0&&void 0!==arguments[0]?arguments[0]:null,n=arguments[1],i=arguments[2];Tt(this,e);var o=Bt(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t,n,i));return o.options=i,o.canvasLayer={canvas:null,devicePixelRatio:window.devicePixelRatio},o.layer_=null,o.initDataRange(i),o.initAnimator(),o.onEvents(),t.on("complete",function(){this.init(t,i),this.argCheck(i)},o),o}return Rt(e,t),jt(e,[{key:"init",value:function(t,e){if(!t)throw new Error("not map object");this.map=t,this.context=this.options.context||"2d",this.getCanvasLayer()}},{key:"_canvasUpdate",value:function(t){this.render(this.canvasLayer.canvas,t)}},{key:"render",value:function(t,e){if(t){var n=this.map,i=t.getContext(this.context),r=this.options.animation;if(this.isEnabledTime()){if(void 0===e)return Lt(i),this;"2d"===this.context&&(i.save(),i.globalCompositeOperation="destination-out",i.fillStyle="rgba(0, 0, 0, .1)",i.fillRect(0,0,i.canvas.width,i.canvas.height),i.restore())}else Lt(i);if("2d"===this.context)for(var a in this.options)i[a]=this.options[a];else i.clear(i.COLOR_BUFFER_BIT);var s={transferCoordinate:function(t){var e=n.lngLatToContainer(new AMap.LngLat(t[0],t[1]));return[e.x,e.y]}};void 0!==e&&(s.filter=function(t){var n=r.trails||10;return!!(e&&t.time>e-n&&t.time0&&void 0!==arguments[0]?arguments[0]:null,n=arguments[1],i=arguments[2];Tt(this,e);var o=Bt(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t,n,i));return o.options=i,o.canvasLayer={canvas:null,devicePixelRatio:window.devicePixelRatio},o.layer_=null,o.previousCursor_=void 0,o.init(t,i),o.argCheck(i),o}return Rt(e,t),jt(e,[{key:"init",value:function(t,e){if(!(t&&t instanceof ol.Map))throw new Error("not map object");this.$Map=t,this.context=this.options.context||"2d",this.getCanvasLayer(),this.initDataRange(e),this.initAnimator(),this.onEvents()}},{key:"_canvasUpdate",value:function(t){this.render(this.canvasLayer.canvas,t)}},{key:"render",value:function(t,e){var n=this.$Map,i=t.getContext(this.context),r=this.options.animation,a=this.options.hasOwnProperty("projection")?this.options.projection:"EPSG:4326";if(this.isEnabledTime()){if(void 0===e)return Lt(i),this;"2d"===this.context&&(i.save(),i.globalCompositeOperation="destination-out",i.fillStyle="rgba(0, 0, 0, .1)",i.fillRect(0,0,i.canvas.width,i.canvas.height),i.restore())}else Lt(i);if("2d"===this.context)for(var s in this.options)i[s]=this.options[s];else i.clear(i.COLOR_BUFFER_BIT);var l={transferCoordinate:function(t){return n.getPixelFromCoordinate(ol.proj.transform(t,a,"EPSG:4326"))}};void 0!==e&&(l.filter=function(t){var n=r.trails||10;return!!(e&&t.time>e-n&&t.timee.options.maxZoom)){var a=o.getBounds(),s=a.getEast()-a.getWest(),l=a.getNorth()-a.getSouth(),u=o.getSize(),p=s/u.x,c=l/u.y,h=this.canvasLayer.getTopLeft(),f=o.latLngToContainerPoint(h),d={transferCoordinate:function(t){var n;n="2d"===e.context?o.latLngToContainerPoint(L.latLng(t[1],t[0])):{x:(t[0]-h.lng)/p,y:(h.lat-t[1])/c};var i={x:n.x-f.x,y:n.y-f.y};return[i.x,i.y]}};void 0!==t&&(d.filter=function(e){var i=n.trails||10;return t&&e.time>t-i&&e.timet-i&&e.time0&&!0===this.props.autoViewport&&t.setViewport(e,this.props.viewportOptions)}}},{key:"getOverlay",value:function(){return null}},{key:"options",get:function(){return["strokeColor","fillColor","strokeWeight","strokeOpacity","fillOpacity","strokeStyle","enableMassClear","enableEditing","enableClicking"]}},{key:"events",get:function(){return["click","dblclick","mousedown","mouseup","mouseout","mouseover","remove","lineupdate"]}}]),e}(l.default);e.default=u},function(t,e,n){"use strict";function i(t){return t&&t.__esModule?t:{default:t}}function o(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function r(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function a(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0});for(var s=(function(){function t(t,e){for(var n=0;n-1&&(v=!1,o=o.replace(/-/,"")),o.indexOf("+")>-1&&(v=!0,o=o.replace("+","")),0==o.length&&(o="_"));var y={display:"flex",justifyContent:"space-between",background:"#FFFFFF",alignItems:"stretch",boxShadow:"0 2px 2px 0 rgba(0, 0, 0, 0.22)",borderRadius:"3px 0 0 3px",minWidth:"155px",minHeight:"50px",marginTop:"-25px"},g={minWidth:"30px",background:"#999999",color:"white",padding:"auto 0",display:"flex",justifyContent:"center",alignItems:"center"};this.props.active&&(g.background="#F5533D"),this.props.leftStyle&&(g=f.obj.merge(g,this.props.leftStyle)),this.props.style&&(y=f.obj.merge(y,this.props.style));var m={flex:"1",padding:"6px",justifyContent:"center",alignItems:"center",fontSize:"12px",color:"#8D93A3",letterSpacing:"0.6px"};this.props.rightStyle&&(m=f.obj.merge(m,this.props.rightStyle));var b=Object.keys(t.props).filter(function(t){return 0==t.indexOf("on")}),w=[];if(b.map(function(e){w[e]=t.props[e]}),c)return p.default.createElement(h.default,{key:JSON.stringify(d)+Math.random(),map:this.props.map,position:d,zIndex:t.props.zIndex},p.default.createElement("div",s({key:JSON.stringify(d)+Math.random(),style:y},w),p.default.createElement("div",{style:g},l),p.default.createElement("div",{style:m},!a&&p.default.createElement("div",null," ",i+"("+o,v?p.default.createElement("img",{style:{width:"8px",height:"auto",margin:"1px"},src:"//huiyan.baidu.com/cms/react-bmap/up.png"}):p.default.createElement("img",{style:{width:"8px",height:"auto",margin:"1px"},src:"//huiyan.baidu.com/cms/react-bmap/down.png"}),")"),a||p.default.createElement("div",null," ",r," "))))}},{key:"render",value:function(){return this.createMarker()}}],[{key:"defaultProps",get:function(){return{autoViewport:!0}}}]),e}(p.default.Component);e.default=d},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=void 0,i=void 0;try{if("string"==typeof t){var o=t.split(",");n=JSON.parse(o[0].match(/[0-9]+\.?[0-9]{0,}/)[0]),i=JSON.parse(o[1].match(/[0-9]+\.?[0-9]{0,}/)[0])}else t instanceof Array?(n=JSON.parse(t[0]),i=JSON.parse(t[1])):t instanceof Object&&(n=t.lng,i=t.lat);if(e)return{lng:n,lat:i};return new BMap.Point(n,i)}catch(t){console.log("create BmapPoint error",'Please input data like this: 1. "114.54,40.33", 2.[114.54,40.33], 3.{lng:114.54,lat:40.33}')}};e.default=i},function(t,e,n){"use strict";function i(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0});var o=n(10);Object.defineProperty(e,"Map",{enumerable:!0,get:function(){return i(o).default}});var r=n(6);Object.defineProperty(e,"Marker",{enumerable:!0,get:function(){return i(r).default}});var a=n(7);Object.defineProperty(e,"MarkerOrderTip",{enumerable:!0,get:function(){return i(a).default}});var s=n(23);Object.defineProperty(e,"InfoWindow",{enumerable:!0,get:function(){return i(s).default}});var l=n(24);Object.defineProperty(e,"NavigationControl",{enumerable:!0,get:function(){return i(l).default}});var u=n(25);Object.defineProperty(e,"OverviewMapControl",{enumerable:!0,get:function(){return i(u).default}});var p=n(26);Object.defineProperty(e,"ScaleControl",{enumerable:!0,get:function(){return i(p).default}});var c=n(27);Object.defineProperty(e,"MapTypeControl",{enumerable:!0,get:function(){return i(c).default}});var h=n(28);Object.defineProperty(e,"PanoramaControl",{enumerable:!0,get:function(){return i(h).default}});var f=n(29);Object.defineProperty(e,"Circle",{enumerable:!0,get:function(){return i(f).default}});var d=n(30);Object.defineProperty(e,"Polyline",{enumerable:!0,get:function(){return i(d).default}});var v=n(31);Object.defineProperty(e,"Polygon",{enumerable:!0,get:function(){return i(v).default}});var y=n(32);Object.defineProperty(e,"Road",{enumerable:!0,get:function(){return i(y).default}});var g=n(36);Object.defineProperty(e,"Boundary",{enumerable:!0,get:function(){return i(g).default}});var m=n(37);Object.defineProperty(e,"MarkerList",{enumerable:!0,get:function(){return i(m).default}});var b=n(39);Object.defineProperty(e,"MapvMarkerList",{enumerable:!0,get:function(){return i(b).default}});var w=n(40);Object.defineProperty(e,"TrafficLayer",{enumerable:!0,get:function(){return i(w).default}});var _=n(41);Object.defineProperty(e,"Merge",{enumerable:!0,get:function(){return i(_).default}});var x=n(42);Object.defineProperty(e,"MapvLayer",{enumerable:!0,get:function(){return i(x).default}});var k=n(43);Object.defineProperty(e,"DrivingRoute",{enumerable:!0,get:function(){return i(k).default}});var P=n(44);Object.defineProperty(e,"PointLabel",{enumerable:!0,get:function(){return i(P).default}});var O=n(47);Object.defineProperty(e,"Arc",{enumerable:!0,get:function(){return i(O).default}});var S=n(48);Object.defineProperty(e,"ThickRay",{enumerable:!0,get:function(){return i(S).default}});var M=n(49);Object.defineProperty(e,"MapListener",{enumerable:!0,get:function(){return i(M).default}})},function(t,e,n){"use strict";function i(t){return t&&t.__esModule?t:{default:t}}function o(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function r(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function a(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0});var s=function(){function t(t,e){for(var n=0;n1&&void 0!==arguments[1]?arguments[1]:new WeakMap,n=void 0,r=t.constructor;switch(r){case RegExp:n=new r(t);break;case Date:n=new r(t.getTime());break;default:if(e.has(t))return e.get(t);n=new r,e.set(t,n)}for(var a in t)n[a]=i(t[a])?o(t[a],e):t[a];return n}Object.defineProperty(e,"__esModule",{value:!0});var r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t};e.default=o},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},o=function(t,e){var n=JSON.parse(JSON.stringify(t));return function t(e,n){for(var o in n)"[object Object]"==Object.prototype.toString.call(n[o])?("object"!==i(e[o])&&(e[o]={}),t(e[o],n[o])):e[o]=n[o]}(n,e),n};e.default=o},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=function(t,e){var n={};return function t(e,n,i){var o={};e&&Object.keys(e).map(function(t){o[t]=!0}),n&&Object.keys(n).map(function(t){o[t]=!0});for(var r in o)if(e[r]&&"[object Object]"==Object.prototype.toString.call(e[r])&&n[r]&&"[object Object]"==Object.prototype.toString.call(n[r]))if(JSON.stringify(e[r])!==JSON.stringify(n[r])){i[r]||(i[r]={});var a=i[r];t(e[r],n[r],a)}else i[r]=n[r];else i[r]=n[r]}(t,e,n),0==Object.keys(n).length&&(n=null),n};e.default=i},function(t,e,n){"use strict";function i(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0});var o=n(8),r=i(o),a=n(18),s=i(a),l={createPoint:r.default,getPoints:s.default};e.default=l},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(8),o=function(t){return t&&t.__esModule?t:{default:t}}(i),r=function(t){var e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=[];return t.split("|").forEach(function(t){for(var i=t?t.split(","):[],r=[],a=0;a=200&&this.status<300?t.success&&t.success(JSON.parse(this.response)):t.fail&&t.fail(this.statusText),t.complete&&t.complete(JSON.parse(this.response)),clearTimeout(a)},n.onerror=function(){t.fail&&t.fail(e.statusText),clearTimeout(a)},{abort:function(){o||(o=!0,n.abort())},params:t}}function r(t){var e="jsonp_"+ +new Date+"_"+parseInt(1e7*Math.random(),10),n=document.createElement("script"),i=!1;t.url+="-1"===t.url.indexOf("?")?"?":"&",t.url+="callback="+e,n.src=t.url,document.head.appendChild(n);var o=setTimeout(function(){null!==window[e]&&(window[e]=null,n.parentElement.removeChild(n),t.fail&&t.fail({error:null,msg:"timeout"}),t.complete&&t.complete(JSON.parse()))},1e4);return n.addEventListener("error",function(r){window[e]=null,n.parentElement.removeChild(n),clearTimeout(o),i||(t.fail&&t.fail({error:r,msg:"loaderror"}),t.complete&&t.complete())}),window[e]=function(r){clearTimeout(o),i||(t.success(r),t.complete&&t.complete()),window[e]=null,n.parentElement.removeChild(n)},{abort:function(){clearTimeout(o),i=!0},params:t}}Object.defineProperty(e,"__esModule",{value:!0});var a={fetch:i,ajax:o,jsonp:r};e.default=a},function(t,e,n){"use strict";function i(t,e){var n=document.createElement("a");n.style.display="none";var i=new Blob([t]);n.href=URL.createObjectURL(i),n.href=t,e&&(n.download=e),document.body.appendChild(n),n.click(),document.body.removeChild(n)}Object.defineProperty(e,"__esModule",{value:!0}),e.default=i},function(t,e,n){"use strict";function i(t,e,n){this.options=n||{},this._point=t,this.content=e}Object.defineProperty(e,"__esModule",{value:!0}),i.prototype=new BMap.Overlay,i.prototype.initialize=function(t){this._map=t;var e=this._div=document.createElement("div");e.setAttribute("tag","customoverlay"),e.style.position="absolute";var n=this.options.zIndex||BMap.Overlay.getZIndex(this._point.lat);e.style.zIndex=n,e.addEventListener("touchstart",function(t){t.stopPropagation(),console.log("touchstart")}),e.addEventListener("touchend",function(t){t.stopPropagation(),console.log("touchend")}),"[object String]"==Object.prototype.toString.call(this.content)?e.innerHTML=this.content:e.appendChild(this.content);var i=this.options.pane||"labelPane";return t.getPanes()[i].appendChild(e),e},i.prototype.draw=function(){var t=this._map,e=t.pointToOverlayPixel(this._point),n=this.options.offset||new BMap.Size(0,0);this._div.style.left=e.x+n.width+"px",this._div.style.top=e.y+n.height+"px"},e.default=i},function(t,e,n){"use strict";function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function r(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0});var a=function(){function t(t,e){for(var n=0;n0&&!1!==this.props.autoViewport&&this.props.map.setViewport(e,this.props.viewportOptions)}},{key:"getRoadGroup",value:function(t,e,n){var t=t,e=e,n=n,i={},o=[];if(e)for(var r=0;r1)for(var n=1;n3&&void 0!==arguments[3]?arguments[3]:{},r=t.getZoom(),a=o.lineWidth||5,s=void 0===o.level?1:o.level,l=null,u=0,p=0,c=[],h=[],f=[],d=0,v=0;e.beginPath();var y,g=Math.pow(2,18-t.getZoom()),m=t.getMapType().getProjection(),b=m.lngLatToPoint(t.getCenter()),w=new BMap.Pixel(b.x-t.getSize().width/2*g,b.y+t.getSize().height/2*g);return n.forEach(function(n,i){var r=null;l=null;for(var a=n.split(","),s=0;s=50&&(f.push(b),d%=50))}l=y,0===s?(r=r||y,e.moveTo(y.x,y.y)):(p>15||s>=a.length-2)&&(p=0,e.lineTo(y.x,y.y))}if(o.arrow&&i===n.length-1&&v<100){var k=c[Math.ceil(c.length/2)];for(var P in c)if(c[P].totalDepth>=v/2){k=c[P+1]?c[P+1]:c[P];break}var O=c[c.length-1];k.end=O.end,f=[],f.push(k)}}),o.line&&(e.lineCap=o.lineCap||"round",e.lineJoin="round",o.border&&(e.strokeStyle=o.border.color||"white",e.lineWidth=(r<=13?a-2:a)+(2*o.border.lineWidth||4),e.stroke()),e.strokeStyle=o.color||i[s]||"#fc2c2b",e.lineWidth=r<=13?a-2:a,e.stroke()),o.arrow&&this.drawArrow(e,f,o),h},drawArrow:function(t,e,n){t.beginPath(),e.forEach(function(i){var o=i.start.x,r=i.start.y,a=i.end.x,s=i.end.y,l=a-o,u=s-r,p=[0,-1],c=[i.end.x-i.start.x,i.end.y-i.start.y],h=p[0]*c[0]+p[1]*c[1],f=Math.sqrt(p[0]*p[0]+p[1]*p[1]),d=Math.sqrt(c[0]*c[0]+c[1]*c[1]),v=Math.acos(h/(f*d));c[0]<0&&(v=2*Math.PI-v);for(var y=n.arrow.width/2||2,g=n.arrow.height||y,m=0;i.offset+50*m<=i.depth;){var b=i.offset+50*m,w=b/i.depth;t.save(),t.translate(o+l*w,r+u*w),t.rotate(v),t.moveTo(1.618*-y,g),t.lineTo(0,0),t.lineTo(1.618*y,g),t.restore(),m+=1}1===e.length&&i.offset>i.depth&&(t.save(),t.translate(o,r),t.rotate(v),t.moveTo(1.618*-y,g),t.lineTo(0,0),t.lineTo(1.618*y,g),t.restore())}),t.strokeStyle=n.arrow.color||"#fff",t.lineWidth=3,t.stroke()}};e.default=o},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i={mergeRoadPath:function(t,e){for(var n=[],i=0;i=Math.min(o.lng,r.lng)&&t.lng<=Math.max(o.lng,r.lng)&&t.lat>=Math.min(o.lat,r.lat)&&t.lat<=Math.max(o.lat,r.lat)){var a=(o.lng-t.lng)*(r.lat-t.lat)-(r.lng-t.lng)*(o.lat-t.lat),s=2e-10;if(s=2e-9,a-s)return!0}}return!1}};e.default=i},function(t,e,n){"use strict";function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function r(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0});var a=function(){function t(t,e){for(var n=0;n0&&!1!==i.props.autoViewport&&n.setViewport(o,i.props.viewportOptions)}}var e=this.props.data,n=this.props.map;if(e){this._request={};var i=this,o=new BMap.Boundary,r=[];e.forEach(function(t,e){i._request[t.name]=!1,i._backData[t.name]&&(r=r.concat(i._backData[t.name]),i._request[t.name]=!0)}),t(),e.forEach(function(e,n){i._request[e.name]||i._allRequest[e.name]||(i._allRequest[e.name]=!0,o.get(e.name,function(n){for(var o=[],a=0;a=10||this.props.mini)&&(n.isShowNumber=!1,n.size=10,n.strokeStyle=f,n.lineWidth=3,n.strokeOpacity=.4));var d=new h.default(n);d.addEventListener("click",function(e,n){t.props.onClick&&t.props.onClick(n-1)}),d.addEventListener("mouseover",function(e,n){t.props.onMouseOver&&t.props.onMouseOver(n-1)}),d.addEventListener("mouseout",function(e,n){t.props.onMouseOut&&t.props.onMouseOut(n-1)}),d.index=l,this.markers.push(d),s.push({geometry:{type:"Point",coordinates:[u[0],u[1]]},count:a[l].count,text:a[l].text})}for(var v=this.markers.length;v--;)e.addOverlay(this.markers[v]);this.props.mini?this.dataSet.set(s):this.dataSet.set(s.splice(0,10)),this.setViewport()}}},{key:"setViewport",value:function(){var t=this.props.map;if(t){for(var e=this.props.data,n=t.getMapType().getProjection(),i=[],o=0;o0&&!1!==this.props.autoViewport&&t.setViewport(i,this.props.viewportOptions)}}}],[{key:"defaultProps",get:function(){return{autoViewport:!0}}}]),e}(u.default);e.default=f},function(t,e,n){"use strict";function i(t){this.options=t||{},this._point=t.point,this._fillColor=t.fillStyle||"#1495ff",this._size=t.size||30,this._lineWidth=void 0===t.lineWidth?2:t.lineWidth,this._strokeStyle=t.strokeStyle||"#ffffff",t.strokeOpacity&&(this._strokeStyle=o(this._strokeStyle,.4))}function o(t,e){var n=/^#([0-9a-fA-f]{3}|[0-9a-fA-f]{6})$/,i=t.toLowerCase();if(i&&n.test(i)){if(4===i.length){for(var o="#",r=1;r<4;r+=1)o+=i.slice(r,r+1).concat(i.slice(r,r+1));i=o}for(var a=[],r=1;r<7;r+=2)a.push(parseInt("0x"+i.slice(r,r+2)));return e?(a.push(e),"rgba("+a.join(",")+")"):"rgb("+a.join(",")+")"}return i}Object.defineProperty(e,"__esModule",{value:!0}),i.prototype=new BMap.Overlay,i.prototype.initialize=function(t){this._map=t;var e=this._div=document.createElement("div"),n=e.style;n.position="absolute",n.backgroundClip="padding-box",n.zIndex=this.options.zIndex||BMap.Overlay.getZIndex(this._point.lat),n.backgroundColor=this._fillColor,!1!==this.options.isShowShadow&&(n.boxShadow="0 0 5px rgba(0, 0, 0, 0.5)"),n.border=this._lineWidth+"px solid "+this._strokeStyle,n.color="white",n.textShadow="0px 0px 5px #fff",n.width=this._size+"px",n.boxSizing="content-box",n.borderRadius="30px",n.height=this._size+"px",n.lineHeight=this._size+"px",n.fontSize="12px",n.cursor="pointer",n.textAlign="center",n.MozUserSelect="none",this.options.number&&!1!==this.options.isShowNumber&&(e.innerHTML=this.options.number);var i=this;return e.addEventListener("mouseover",function(){i.dispatchEvent("mouseover",i.options.number),n.backgroundColor="#1495ff"}),e.addEventListener("mouseout",function(){i.dispatchEvent("mouseout",i.options.number),n.backgroundColor=i._fillColor}),e.addEventListener("click",function(){i.dispatchEvent("click",i.options.number)}),t.getPanes().markerPane.appendChild(e),e},i.prototype.draw=function(){var t=this._map,e=t.pointToOverlayPixel(this._point);this._div.style.left=e.x-(this._size+this._lineWidth)/2-1+"px",this._div.style.top=e.y-(this._size+this._lineWidth)/2-2+"px"},e.default=i},function(t,e,n){"use strict";function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function r(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0});var a=function(){function t(t,e){for(var n=0;n0&&(t.forEach(function(t,l){var u=t.location.split(","),p=e.project.pointToLngLat(new BMap.Pixel(u[0],u[1]));s.push(p),l<10?(n.push({geometry:{type:"Point",coordinates:[u[0],u[1]]},count:parseInt(t.count)}),i.push({geometry:{type:"Point",coordinates:[u[0],u[1]]},id:l,count:parseInt(t.count),text:parseInt(l)+1}),o.push({geometry:{type:"Point",coordinates:[u[0],u[1]]},count:parseInt(t.count),text:t.text})):(r.push({geometry:{type:"Point",coordinates:[u[0],u[1]]},id:l,count:parseInt(t.count)}),a.push({geometry:{type:"Point",coordinates:[u[0],u[1]]},count:parseInt(t.count)}))}),this.shadowSet.set(n),this.circleSet.set(i),this.textSet.set(o),this.numSet.set(i),this.otherSet.set(r),this.otherShadowSet.set(a),s.length>0&&!1!==this.props.autoViewport&&map.setViewport(s,self.props.viewportOptions))}},{key:"createLayers",value:function(){this._createLayer=!0;var t=this.map;this.project=t.getMapType().getProjection();var e=this,n=this.shadowSet=new u.DataSet([]),i=this.circleSet=new u.DataSet([]),o=this.textSet=new u.DataSet([]),r=this.numSet=new u.DataSet([]),a=this.otherSet=new u.DataSet([]),s=this.otherShadowSet=new u.DataSet([]);this.layers=[];var l={coordType:"bd09mc",splitList:{4:"#d53938",3:"#fe6261",2:"#ffb02d",other:"#80db69"},shadowBlur:10,size:5,max:30,methods:{click:function(t){t&&e.handleClick(t.id)},mousemove:function(t){a.update(function(t){t.fillStyle=null}),t?(e.isSmallPath=!0,e.props.map.setDefaultCursor("pointer"),a.update(function(t){t.fillStyle="#1495ff"},{id:t.id})):(e.isSmallPath=!1,e.isSmallPath||e.isBigPath||e.props.map.setDefaultCursor("auto"))}},draw:"category"},p={splitList:{4:"#d53938",3:"#fe6261",2:"#ffb02d",1:"#80db69"},styleType:"fill",globalAlpha:.4,coordType:"bd09mc",size:8,minSize:5,draw:"category"};if(this.layers.push(new u.baiduMapLayer(t,s,p)),this.layers.push(new u.baiduMapLayer(t,a,l)),!0===this.props.animation){var c={splitList:{4:"#d53938",3:"#fe6261",2:"#ffb02d",1:"#80db69"},styleType:"stroke",globalAlpha:.4,coordType:"bd09mc",size:20,minSize:10,draw:"category"};this.layers.push(new u.baiduMapAnimationLayer(t,n,c))}var h={splitList:{1:"#80db69",4:"#d53938",3:"#fe6261",2:"#ffb02d"},fillStyle:"red",coordType:"bd09mc",size:10,draw:"category",methods:{click:function(t){t&&e.handleClick(t.id)},mousemove:function(t){i.update(function(t){t.fillStyle=null}),t?(e.isBigPath=!0,e.map.setDefaultCursor("pointer"),i.update(function(t){t.fillStyle="#1495ff"},{id:t.id})):(e.isBigPath=!1,e.isBigPath||e.isSmallPath||e.map.setDefaultCursor("auto"))}}};this.layers.push(new u.baiduMapLayer(t,i,h));var f={coordType:"bd09mc",draw:"text",font:"13px Arial",fillStyle:"#ffffff",shadowColor:"#ffffff",shadowBlur:10};this.layers.push(new u.baiduMapLayer(t,r,f));var d={coordType:"bd09mc",font:"13px Arial",fillStyle:"#666",shadowColor:"#ffffff",shadowBlur:10,draw:"text",avoid:!0,textAlign:"left",offset:{x:10,y:0}};this.layers.push(new u.baiduMapLayer(t,o,d))}},{key:"render",value:function(){return null}}],[{key:"defaultProps",get:function(){return{autoViewport:!0}}}]),e}(l.default);e.default=p},function(t,e,n){"use strict";function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function r(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0});var a=function(){function t(t,e){for(var n=0;nthis.minX&&t.lat>this.minY&&t.lngthis.minX&&t.minY>this.minY&&t.maxX=Math.min(o.lng,r.lng)&&t.lng<=Math.max(o.lng,r.lng)&&t.lat>=Math.min(o.lat,r.lat)&&t.lat<=Math.max(o.lat,r.lat)){var a=(o.lng-t.lng)*(r.lat-t.lat)-(r.lng-t.lng)*(o.lat-t.lat),s=2e-10;if(s=2e-9,a-s)return!0}}return!1},e.default=o},function(t,e,n){"use strict";function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function r(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0});var a=function(){function t(t,e){for(var n=0;n0&&!1!==t.props.autoViewport&&e.setViewport(o,t.props.viewportOptions)})}this.lineDataSet.set(n),this.lineLayer.update({options:this.props.lineOptions||{draw:"simple",strokeStyle:"#5E87DB",lineWidth:3}}),this.pointDataSet.set(i),this.pointLayer.update({options:this.props.pointOptions||{coordType:this.props.coordType,draw:"simple",fillStyle:"#5E87DB",size:5}}),this.textLayer.update({options:this.props.textOptions||{coordType:this.props.coordType,draw:"text",font:"18px Arial",offset:{x:0,y:12},fillStyle:"#333",size:12}}),this.props.enableAnimation?this.animationLayer.update({options:this.props.animationOptions||{coordType:this.props.coordType,fillStyle:"rgba(255, 250, 250, 0.9)",lineWidth:0,size:4,animateTime:50,draw:"simple"}}):this.animationLayer&&this.animationLayer.hide()}}}],[{key:"defaultProps",get:function(){return{}}}]),e}(p.default);e.default=h},function(t,e,n){"use strict";function i(t){return t&&t.__esModule?t:{default:t}}function o(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function r(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function a(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0});var s=function(){function t(t,e){for(var n=0;n0&&!1!==t.props.autoViewport&&e.setViewport(r,t.props.viewportOptions)})}this.lineDataSet.set(n),this.lineLayer.update({options:this.props.lineOptions||{coordType:this.props.coordType,draw:"simple",strokeStyle:"#5E87DB",globalCompositeOperation:"lighter",shadowColor:"rgba(255, 255, 255, 0.5)",shadowBlur:60,lineWidth:2}}),this.pointDataSet.set(i),this.pointLayer.update({options:this.props.pointOptions||{coordType:this.props.coordType,draw:"simple",fillStyle:"#5E87DB",size:5,shadowColor:"#5E87DB",shadowBlur:20}}),this.textLayer.update({options:this.props.textOptions||{coordType:this.props.coordType,draw:"text",font:"18px Arial",offset:{x:0,y:12},fillStyle:"#333",size:12}})}}}],[{key:"defaultProps",get:function(){return{}}}]),e}(p.default);e.default=h},function(t,e,n){"use strict";function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function r(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}function a(t,e){var n=null;return function(){var i=this,o=arguments;n&&clearTimeout(n),n=setTimeout(function(){t.apply(i,o)},e)}}function s(t,e){var n=void 0,i=arguments,o=void 0;return function r(){var a=this,s=Date.now();o||(o=s),n&&clearTimeout(n),s-o>=e?(t.apply(a,i),o=s):n=setTimeout(function(){r.apply(a,i)},50)}}Object.defineProperty(e,"__esModule",{value:!0});var l=function(){function t(t,e){for(var n=0;np&&(t[f]=256*p),u&&u>=s&&u<=l?(t[f-3]=e[u],t[f-2]=e[u+1],t[f-1]=e[u+2]):t[f]=0}function c(t){return t.max||100}function h(t){return t.min||0}function f(t,e,n){var i=c(n),o=h(n),r=n._size;void 0==r&&void 0==(r=n.size)&&(r=13);var a=new l({gradient:n.gradient,max:i,min:o}),s=u(r),p=s.width/2,f=s.height/2,d=e,v={};d.forEach(function(t,e){var n=void 0===t.count?1:t.count,o=Math.min(1,n/i).toFixed(2);v[o]=v[o]||[],v[o].push(t)});for(var y in v)if(!isNaN(y)){var g=v[y];t.beginPath(),n.withoutAlpha||(t.globalAlpha=y),t.strokeStyle=a.getColor(y*i),g.forEach(function(e,o){if(e.geometry){var r=e.geometry._coordinates||e.geometry.coordinates,a=e.geometry.type;if("Point"===a){var l=void 0===e.count?1:e.count;t.globalAlpha=l/i,t.drawImage(s,r[0]-p,r[1]-f)}else if("LineString"===a){var l=void 0===e.count?1:e.count;t.globalAlpha=l/i,t.beginPath(),At.draw(t,e,n),t.stroke()}}})}}function d(t,e,n){if(!(t.canvas.width<=0||t.canvas.height<=0)){var i=n.strength||.3;t.strokeStyle="rgba(0,0,0,"+i+")";var r=new s(t.canvas.width,t.canvas.height),a=r.getContext("2d");a.scale(Ut,Ut),n=n||{};var u=e instanceof o?e.get():e;t.save();var c=new l({gradient:n.gradient});if(f(a,u,n),!n.absolute){var h=a.getImageData(0,0,t.canvas.width,t.canvas.height);p(h.data,c.getImageData(),n),t.putImageData(h,0,0),t.restore()}c=null,r=null}}function v(t,e,n){var i=60*n+30,o=Math.PI/180*i;return[t.x+e*Math.cos(o),t.y+e*Math.sin(o)]}function y(t,e,n){var i=t.createShader(n);return t.shaderSource(i,e),t.compileShader(i),i}function g(t,e,n){var i=y(t,e,t.VERTEX_SHADER),o=y(t,n,t.FRAGMENT_SHADER),r=t.createProgram();return t.attachShader(r,i),t.attachShader(r,o),t.linkProgram(r),t.useProgram(r),r}function m(t){var e=document.createElement("canvas"),n=e.getContext("2d");return e.width=1,e.height=1,n.fillStyle=t,n.fillRect(0,0,1,1),n.getImageData(0,0,1,1).data}function b(t,e,n){if(e){var i=g(t,qt,Vt);t.enable(t.BLEND),t.blendFunc(t.SRC_ALPHA,t.ONE),t.clear(t.COLOR_BUFFER_BIT);var o=t.canvas.width/2,r=t.canvas.height/2,a=t.createBuffer();t.bindBuffer(t.ARRAY_BUFFER,a);var s=t.getAttribLocation(i,"a_Position");t.vertexAttribPointer(s,2,t.FLOAT,!1,0,0),t.enableVertexAttribArray(s);var l=t.getUniformLocation(i,"u_FragColor"),u=m(n.strokeStyle||"red");t.uniform4f(l,u[0]/255,u[1]/255,u[2]/255,u[3]/255),t.lineWidth(n.lineWidth||1);for(var p=0,c=e.length;p1||d<-1||d>1||(u.push(f,d),p++)}var v=new Float32Array(u),y=p,b=t.createBuffer();t.bindBuffer(t.ARRAY_BUFFER,b),t.bufferData(t.ARRAY_BUFFER,v,t.STATIC_DRAW),t.vertexAttribPointer(o,2,t.FLOAT,!1,0,0),t.enableVertexAttribArray(o),t.vertexAttrib1f(r,n._size);var w=m(n.fillStyle||"red");t.uniform4f(a,w[0]/255,w[1]/255,w[2]/255,w[3]/255),t.drawArrays(t.POINTS,0,y)}}function _(t,e,n){n=n||2;var i=e&&e.length,o=i?e[0]*n:t.length,r=x(t,0,o,n,!0),a=[];if(!r)return a;var s,l,u,p,c,h,f;if(i&&(r=z(t,e,r,n)),t.length>80*n){s=u=t[0],l=p=t[1];for(var d=n;du&&(u=c),h>p&&(p=h);f=Math.max(u-s,p-l)}return O(r,a,n,s,l,f),a}function x(t,e,n,i,o){var r,a;if(o===X(t,e,n,i)>0)for(r=e;r=e;r-=i)a=Y(r,t[r],t[r+1],a);return a&&Z(a,a.next)&&($(a),a=a.next),a}function k(t,e){if(!t)return t;e||(e=t);var n,i=t;do{if(n=!1,i.steiner||!Z(i,i.next)&&0!==N(i.prev,i,i.next))i=i.next;else{if($(i),(i=e=i.prev)===i.next)return null;n=!0}}while(n||i!==e);return e}function O(t,e,n,i,o,r,a){if(t){!a&&r&&R(t,i,o,r);for(var s,l,u=t;t.prev!==t.next;)if(s=t.prev,l=t.next,r?M(t,i,o,r):S(t))e.push(s.i/n),e.push(t.i/n),e.push(l.i/n),$(t),t=l.next,u=l.next;else if((t=l)===u){a?1===a?(t=E(t,e,n),O(t,e,n,i,o,r,2)):2===a&&C(t,e,n,i,o,r):O(k(t),e,n,i,o,r,1);break}}}function S(t){var e=t.prev,n=t,i=t.next;if(N(e,n,i)>=0)return!1;for(var o=t.next.next;o!==t.prev;){if(F(e.x,e.y,n.x,n.y,i.x,i.y,o.x,o.y)&&N(o.prev,o,o.next)>=0)return!1;o=o.next}return!0}function M(t,e,n,i){var o=t.prev,r=t,a=t.next;if(N(o,r,a)>=0)return!1;for(var s=o.xr.x?o.x>a.x?o.x:a.x:r.x>a.x?r.x:a.x,p=o.y>r.y?o.y>a.y?o.y:a.y:r.y>a.y?r.y:a.y,c=A(s,l,e,n,i),h=A(u,p,e,n,i),f=t.nextZ;f&&f.z<=h;){if(f!==t.prev&&f!==t.next&&F(o.x,o.y,r.x,r.y,a.x,a.y,f.x,f.y)&&N(f.prev,f,f.next)>=0)return!1;f=f.nextZ}for(f=t.prevZ;f&&f.z>=c;){if(f!==t.prev&&f!==t.next&&F(o.x,o.y,r.x,r.y,a.x,a.y,f.x,f.y)&&N(f.prev,f,f.next)>=0)return!1;f=f.prevZ}return!0}function E(t,e,n){var i=t;do{var o=i.prev,r=i.next.next;!Z(o,r)&&W(o,i,i.next,r)&&V(o,r)&&V(r,o)&&(e.push(o.i/n),e.push(i.i/n),e.push(r.i/n),$(i),$(i.next),i=t=r),i=i.next}while(i!==t);return i}function C(t,e,n,i,o,r){var a=t;do{for(var s=a.next.next;s!==a.prev;){if(a.i!==s.i&&U(a,s)){var l=J(a,s);return a=k(a,a.next),l=k(l,l.next),O(a,e,n,i,o,r),void O(l,e,n,i,o,r)}s=s.next}a=a.next}while(a!==t)}function z(t,e,n,i){var o,r,a,s,l,u=[];for(o=0,r=e.length;o=i.next.y){var s=i.x+(r-i.y)*(i.next.x-i.x)/(i.next.y-i.y);if(s<=o&&s>a){if(a=s,s===o){if(r===i.y)return i;if(r===i.next.y)return i.next}n=i.x=i.x&&i.x>=p&&F(rn.x)&&V(i,t)&&(n=i,h=l),i=i.next;return n}function R(t,e,n,i){var o=t;do{null===o.z&&(o.z=A(o.x,o.y,e,n,i)),o.prevZ=o.prev,o.nextZ=o.next,o=o.next}while(o!==t);o.prevZ.nextZ=null,o.prevZ=null,B(o)}function B(t){var e,n,i,o,r,a,s,l,u=1;do{for(n=t,t=null,r=null,a=0;n;){for(a++,i=n,s=0,e=0;e0||l>0&&i;)0===s?(o=i,i=i.nextZ,l--):0!==l&&i?n.z<=i.z?(o=n,n=n.nextZ,s--):(o=i,i=i.nextZ,l--):(o=n,n=n.nextZ,s--),r?r.nextZ=o:t=o,o.prevZ=r,r=o;n=i}r.nextZ=null,u*=2}while(a>1);return t}function A(t,e,n,i,o){return t=32767*(t-n)/o,e=32767*(e-i)/o,t=16711935&(t|t<<8),t=252645135&(t|t<<4),t=858993459&(t|t<<2),t=1431655765&(t|t<<1),e=16711935&(e|e<<8),e=252645135&(e|e<<4),e=858993459&(e|e<<2),e=1431655765&(e|e<<1),t|e<<1}function I(t){var e=t,n=t;do{e.x=0&&(t-a)*(i-s)-(n-a)*(e-s)>=0&&(n-a)*(r-s)-(o-a)*(i-s)>=0}function U(t,e){return t.next.i!==e.i&&t.prev.i!==e.i&&!q(t,e)&&V(t,e)&&V(e,t)&&H(t,e)}function N(t,e,n){return(e.y-t.y)*(n.x-e.x)-(e.x-t.x)*(n.y-e.y)}function Z(t,e){return t.x===e.x&&t.y===e.y}function W(t,e,n,i){return!!(Z(t,e)&&Z(n,i)||Z(t,i)&&Z(n,e))||N(t,e,n)>0!=N(t,e,i)>0&&N(n,i,t)>0!=N(n,i,e)>0}function q(t,e){var n=t;do{if(n.i!==t.i&&n.next.i!==t.i&&n.i!==e.i&&n.next.i!==e.i&&W(n,n.next,t,e))return!0;n=n.next}while(n!==t);return!1}function V(t,e){return N(t.prev,t,t.next)<0?N(t,e,t.next)>=0&&N(t,t.prev,e)>=0:N(t,e,t.prev)<0||N(t,t.next,e)<0}function H(t,e){var n=t,i=!1,o=(t.x+e.x)/2,r=(t.y+e.y)/2;do{n.y>r!=n.next.y>r&&o<(n.next.x-n.x)*(r-n.y)/(n.next.y-n.y)+n.x&&(i=!i),n=n.next}while(n!==t);return i}function J(t,e){var n=new G(t.i,t.x,t.y),i=new G(e.i,e.x,e.y),o=t.next,r=e.prev;return t.next=e,e.prev=t,n.next=o,o.prev=n,i.next=n,n.prev=i,r.next=i,i.prev=r,i}function Y(t,e,n,i){var o=new G(t,e,n);return i?(o.next=i.next,o.prev=i,i.next.prev=o,i.next=o):(o.prev=o,o.next=o),o}function $(t){t.next.prev=t.prev,t.prev.next=t.next,t.prevZ&&(t.prevZ.nextZ=t.nextZ),t.nextZ&&(t.nextZ.prevZ=t.prevZ)}function G(t,e,n){this.i=t,this.x=e,this.y=n,this.prev=null,this.next=null,this.z=null,this.prevZ=null,this.nextZ=null,this.steiner=!1}function X(t,e,n,i){for(var o=0,r=e,a=n-i;r65536&&(t.bufferData(t.ARRAY_BUFFER,new Float32Array(u),t.STATIC_DRAW),t.bufferData(t.ELEMENT_ARRAY_BUFFER,new Uint16Array(p),t.STATIC_DRAW),t.drawElements(t.TRIANGLES,p.length,t.UNSIGNED_SHORT,0),u.length=0,p.length=0,c=0);for(var y=0;y0&&(n=n.concat(o))}return n}function tt(t,e,n){if(!t||!e)return null;var i,o,r,a,s,l,u=function(t){return 1-2*t+t*t},p=function(t){return 2*t-2*t*t},c=function(t){return t*t},h=[],n=n||40,f=0,d=0;if(void 0===e)return void(void 0!==h&&(h=[]));var v=parseFloat(t.lat),y=parseFloat(e.lat),g=parseFloat(t.lng),m=parseFloat(e.lng);for(m>g&&parseFloat(m-g)>180&&g<0&&(g=parseFloat(360+g),m=parseFloat(360+m)),0,l=0,y==v?(i=0,o=g-m):m==g?(i=Math.PI/2,o=v-y):(i=Math.atan((y-v)/(m-g)),o=(y-v)/Math.sin(i)),0==l&&(l=i+Math.PI/5),r=o/2,s=r*Math.cos(l)+g,a=r*Math.sin(l)+v,f=0;f0?b-360:b,w]),d+=1/n}return h}function et(t){this.splitList=t||{other:1}}function nt(t){this.splitList=t||[{start:0,value:"red"}]}function it(t){this.options=t||{},this.paneName=this.options.paneName||"mapPane",this.context=this.options.context||"2d",this.zIndex=this.options.zIndex||0,this.mixBlendMode=this.options.mixBlendMode||null,this.enableMassClear=this.options.enableMassClear,this._map=t.map,this._lastDrawTime=null,this.show()}function ot(t,e){var n=e[0]-t[0],i=e[1]-t[1],o=360*Math.atan(i/n)/(2*Math.PI);return e[0]o&&i>r}function lt(t,e,n,i,o,r){if(!(o-i<=n)){var a=i+o>>1;ut(t,e,a,i,o,r%2),lt(t,e,n,i,a-1,r+1),lt(t,e,n,a+1,o,r+1)}}function ut(t,e,n,i,o,r){for(;o>i;){if(o-i>600){var a=o-i+1,s=n-i+1,l=Math.log(a),u=.5*Math.exp(2*l/3),p=.5*Math.sqrt(l*u*(a-u)/a)*(s-a/2<0?-1:1);ut(t,e,n,Math.max(i,Math.floor(n-s*u/a+p)),Math.min(o,Math.floor(n+(a-s)*u/a+p)),r)}var c=e[2*n+r],h=i,f=o;for(pt(t,e,i,n),e[2*o+r]>c&&pt(t,e,i,o);hc;)f--}e[2*i+r]===c?pt(t,e,i,f):(f++,pt(t,e,f,o)),f<=n&&(i=f+1),n<=f&&(o=f-1)}}function pt(t,e,n,i){ct(t,n,i),ct(e,2*n,2*i),ct(e,2*n+1,2*i+1)}function ct(t,e,n){var i=t[e];t[e]=t[n],t[n]=i}function ht(t,e,n,i,o,r,a){for(var s,l,u=[0,t.length-1,0],p=[];u.length;){var c=u.pop(),h=u.pop(),f=u.pop();if(h-f<=a)for(var d=f;d<=h;d++)s=e[2*d],l=e[2*d+1],s>=n&&s<=o&&l>=i&&l<=r&&p.push(t[d]);else{var v=Math.floor((f+h)/2);s=e[2*v],l=e[2*v+1],s>=n&&s<=o&&l>=i&&l<=r&&p.push(t[v]);var y=(c+1)%2;(0===c?n<=s:i<=l)&&(u.push(f),u.push(v-1),u.push(y)),(0===c?o>=s:r>=l)&&(u.push(v+1),u.push(h),u.push(y))}}return p}function ft(t,e,n,i,o,r){for(var a=[0,t.length-1,0],s=[],l=o*o;a.length;){var u=a.pop(),p=a.pop(),c=a.pop();if(p-c<=r)for(var h=c;h<=p;h++)dt(e[2*h],e[2*h+1],n,i)<=l&&s.push(t[h]);else{var f=Math.floor((c+p)/2),d=e[2*f],v=e[2*f+1];dt(d,v,n,i)<=l&&s.push(t[f]);var y=(u+1)%2;(0===u?n-o<=d:i-o<=v)&&(a.push(c),a.push(f-1),a.push(y)),(0===u?n+o>=d:i+o>=v)&&(a.push(f+1),a.push(p),a.push(y))}}return s}function dt(t,e,n,i){var o=t-n,r=e-i;return o*o+r*r}function vt(t,e,n,i,o){return{x:t,y:e,zoom:1/0,id:n,parentId:-1,numPoints:i,properties:o}}function yt(t,e){var n=t.geometry.coordinates,i=n[0],o=n[1];return{x:bt(i),y:wt(o),zoom:1/0,index:e,parentId:-1}}function gt(t){return{type:"Feature",id:t.id,properties:mt(t),geometry:{type:"Point",coordinates:[_t(t.x),xt(t.y)]}}}function mt(t){var e=t.numPoints,n=e>=1e4?Math.round(e/1e3)+"k":e>=1e3?Math.round(e/100)/10+"k":e;return kt(kt({},t.properties),{cluster:!0,cluster_id:t.id,point_count:e,point_count_abbreviated:n})}function bt(t){return t/360+.5}function wt(t){var e=Math.sin(t*Math.PI/180),n=.5-.25*Math.log((1+e)/(1-e))/Math.PI;return n<0?0:n>1?1:n}function _t(t){return 360*(t-.5)}function xt(t){var e=(180-360*t)*Math.PI/180;return 360*Math.atan(Math.exp(e))/Math.PI-90}function kt(t,e){for(var n in e)t[n]=e[n];return t}function Pt(t){return t.x}function Ot(t){return t.y}function St(t){requestAnimationFrame(St),oe.update(t)}function Mt(t){function e(t,e){return function(){e.apply(t)}}this.isAdded_=!1,this.isAnimated_=!1,this.paneName_=Mt.DEFAULT_PANE_NAME_,this.updateHandler_=null,this.resizeHandler_=null,this.topLeft_=null,this.centerListener_=null,this.resizeListener_=null,this.needsResize_=!0,this.requestAnimationFrameId_=null;var n=document.createElement("canvas");n.style.position="absolute",n.style.top=0,n.style.left=0,n.style.pointerEvents="none",this.canvas=n,this.canvasCssWidth_=300,this.canvasCssHeight_=150,this.resolutionScale_=1,this.repositionFunction_=e(this,this.repositionCanvas_),this.resizeFunction_=e(this,this.resize_),this.requestUpdateFunction_=e(this,this.update_),t&&this.setOptions(t)}var Lt=function(t){t&&t.clearRect&&t.clearRect(0,0,t.canvas.width,t.canvas.height)},Et=function(t){var e=window.devicePixelRatio||1;t.canvas.width=t.canvas.width*e,t.canvas.height=t.canvas.height*e,t.canvas.style.width=t.canvas.width/e+"px",t.canvas.style.height=t.canvas.height/e+"px",t.scale(e,e)};n.prototype.on=function(t,e){var n=this._subscribers[t];n||(n=[],this._subscribers[t]=n),n.push({callback:e})},n.prototype.off=function(t,e){var n=this._subscribers[t];if(n)for(var i=0;in&&(n=o)}return n}},o.prototype.getSum=function(t){var e=this._data;if(e&&!(e.length<=0)){for(var n=0,i=0;in&&(t=n),te&&(t=e),tn?o+(t-n)/(e-n)*(i-o):i},l.prototype.getLegend=function(t){var e=this.gradient,n=t.width||20,i=t.height||180,o=new s(n,i),r=o.getContext("2d"),a=r.createLinearGradient(0,i,0,0);for(var l in e)a.addColorStop(parseFloat(l),e[l]);return r.fillStyle=a,r.fillRect(0,0,n,i),o};var Ft="undefined"==typeof window?{}:window,Ut=Ft.devicePixelRatio||1,Nt={draw:d},Zt={draw:function(t,e,n){t.save();var i=e instanceof o?e.get():e,r={},a=n._size||n.size||50,s=!("enableCluster"in n)||n.enableCluster,u=n.offset||{x:0,y:0},p=new l({min:n.min||0,max:n.max||100,gradient:n.gradient});if(s){for(var c=0;c1){var w=g-m,_=m+(gk*k+P*P&&(m=_+(1&y?1:-1)/2,y=x)}var O=m+"-"+y,S=c[O];S?S.push(i[h]):(S=c[O]=[i[h]],S.i=m,S.j=y,S.x=(m+(1&y?.5:0))*u,S.y=y*p)}var M=new l({max:n.max||100,maxSize:s,gradient:n.gradient});for(var r in c){var L=c[r];t.beginPath();for(var E=0;E<6;E++){var C=v({x:L.x+a.x,y:L.y+a.y},s,E);t.lineTo(C[0],C[1])}t.closePath();for(var z=0,h=0;h0&&(i+=t[o-1].length,n.holes.push(i))}return n};var Gt=["attribute vec4 a_Position;","void main() {","gl_Position = a_Position;","gl_PointSize = 30.0;","}"].join(""),Xt=["precision mediump float;","uniform vec4 u_FragColor;","void main() {","gl_FragColor = u_FragColor;","}"].join(""),Kt={draw:K},Qt={draw:function(t,e,n){var i=e instanceof o?e.get():e;i.length>0&&("LineString"==i[0].geometry.type?Ht.draw(t,i,n):"Polygon"==i[0].geometry.type||"MultiPolygon"==i[0].geometry.type?Kt.draw(t,i,n):$t.draw(t,i,n))}},te={getPoints:Q},ee=function(){function t(t,e){return t.x*e.x+t.y*e.y}function e(t){return{x:k[t.target].x-k[t.source].x,y:k[t.target].y-k[t.source].y}}function n(t){return Math.sqrt(Math.pow(k[t.source].x-k[t.target].x,2)+Math.pow(k[t.source].y-k[t.target].y,2))}function i(t){return Math.sqrt(Math.pow(t.source.x-t.target.x,2)+Math.pow(t.source.y-t.target.y,2))}function o(t){return{x:(k[t.source].x+k[t.target].x)/2,y:(k[t.source].y+k[t.target].y)/2}}function r(t){for(var e=0,n=1;nB||Math.abs(s.y)>B){var l=1/Math.pow(i({source:M[r[a]][e],target:M[t][e]}),1);o.x+=s.x*l,o.y+=s.y*l}}return o}function f(t,e,i){for(var o=L/(n(O[t])*(e+1)),r=[{x:0,y:0}],a=1;as;){var c=s/p,h=M[e][u-1].x,f=M[e][u-1].y;h+=c*(M[e][u].x-M[e][u-1].x),f+=c*(M[e][u].y-M[e][u-1].y),l.push({x:h,y:f}),p-=s,s=i}s-=p}l.push(k[O[e].target]),M[e]=l}}function v(i,o){return Math.abs(t(e(i),e(o))/(n(i)*n(o)))}function y(t,e){var i=(n(t)+n(e))/2;return 2/(i/Math.min(n(t),n(e))+Math.max(n(t),n(e))/i)}function g(t,e){var i=(n(t)+n(e))/2;return i/(i+a({x:(k[t.source].x+k[t.target].x)/2,y:(k[t.source].y+k[t.target].y)/2},{x:(k[e.source].x+k[e.target].x)/2,y:(k[e.source].y+k[e.target].y)/2}))}function m(t,e){var n=s(k[e.source],{source:k[t.source],target:k[t.target]}),i=s(k[e.target],{source:k[t.source],target:k[t.target]}),o={x:(n.x+i.x)/2,y:(n.y+i.y)/2},r={x:(k[t.source].x+k[t.target].x)/2,y:(k[t.source].y+k[t.target].y)/2};return Math.max(0,1-2*a(r,o)/a(n,i))}function b(t,e){return Math.min(m(t,e),m(e,t))}function w(t,e){return v(t,e)*y(t,e)*g(t,e)*b(t,e)}function _(t,e){return w(t,e)>=R}function x(){for(var t=0;t=n.length-1));r++);this.splitList.other=n[n.length-1]},et.prototype.getLegend=function(t){var e=this.splitList,n=document.createElement("div");n.style.cssText="background:#fff; padding: 5px; border: 1px solid #ccc;";var i="";for(var o in e)i+='
'+o+"
";return n.innerHTML=i,n},nt.prototype.get=function(t){for(var e=this.splitList,n=!1,i=0;i=e[i].start)&&(void 0===e[i].end||void 0!==e[i].end&&t1?1:w,_=f(w);for(u in o)if(void 0!==i[u]){var x=i[u]||0,k=o[u];k instanceof Array?n[u]=d(k,_):("string"==typeof k&&(k="+"===k.charAt(0)||"-"===k.charAt(0)?x+parseFloat(k):parseFloat(k)),"number"==typeof k&&(n[u]=x+(k-x)*_))}if(null!==m&&m.call(n,_),1===w){if(s>0){isFinite(s)&&s--;for(u in r){if("string"==typeof o[u]&&(r[u]=r[u]+parseFloat(o[u])),l){var P=r[u];r[u]=o[u],o[u]=P}i[u]=r[u]}return l&&(p=!p),h=void 0!==e?t+e:t+c,!0}null!==b&&b.call(n,n);for(var O=0,S=v.length;O1?r(t[n],t[n-1],n-i):r(t[o],t[o+1>n?n:o+1],i-o)},Bezier:function(t,e){for(var n=0,i=t.length-1,o=Math.pow,r=oe.Interpolation.Utils.Bernstein,a=0;a<=i;a++)n+=o(1-e,i-a)*o(e,a)*t[a]*r(i,a);return n},CatmullRom:function(t,e){var n=t.length-1,i=n*e,o=Math.floor(i),r=oe.Interpolation.Utils.CatmullRom;return t[0]===t[n]?(e<0&&(o=Math.floor(i=n*(1+e))),r(t[(o-1+n)%n],t[o],t[(o+1)%n],t[(o+2)%n],i-o)):e<0?t[0]-(r(t[0],t[0],t[1],t[1],-i)-t[0]):e>1?t[n]-(r(t[n],t[n],t[n-1],t[n-1],i-n)-t[n]):r(t[o?o-1:0],t[o],t[n1;i--)n*=i;return t[e]=n,n}}(),CatmullRom:function(t,e,n,i,o){var r=.5*(n-t),a=.5*(i-e),s=o*o;return(2*e-2*n+r+a)*(o*s)+(-3*e+3*n-2*r-a)*s+r*o+e}}};var re={},ae={draw:function(t,e,n){var i="http://huiyan.baidu.com/github/tools/gis-drawing/static/images/direction.png";n.arrow&&n.arrow.url&&(i=n.arrow.url),re[i]||(re[i]=null);var r=re[i];if(!r){var a=Array.prototype.slice.call(arguments),s=new Image;return s.onload=function(){re[i]=s,ae.draw.apply(null,a)},void(s.src=i)}var l=e instanceof o?e.get():e;t.save();for(var u in n)t[u]=n[u];for(var p=[],c=null,h=0,f=l.length;h=n;s--){Date.now();r=this._cluster(r,s),this.trees[s]=new fe(r,Pt,Ot,o,Float32Array)}return this},ve.prototype.getClusters=function(t,e){var n=((t[0]+180)%360+360)%360-180,i=Math.max(-90,Math.min(90,t[1])),o=180===t[2]?180:((t[2]+180)%360+360)%360-180,r=Math.max(-90,Math.min(90,t[3]));if(t[2]-t[0]>=360)n=-180,o=180;else if(n>o){var a=this.getClusters([n,i,180,r],e),s=this.getClusters([-180,i,o,r],e);return a.concat(s)}for(var l=this.trees[this._limitZoom(e)],u=l.range(bt(n),wt(r),bt(o),wt(i)),p=[],c=0,h=u;c>5,n=t%32,i="No cluster with the specified id.",o=this.trees[n];if(!o)throw new Error(i);var r=o.points[e];if(!r)throw new Error(i);for(var a=this.options.radius/(this.options.extent*Math.pow(2,n-1)),s=o.within(r.x,r.y,a),l=[],u=0,p=s;u1?this._map(u,!0):null,y=(l<<5)+(e+1),g=0,m=c;g-1){if(t.isPointInStroke&&t.isPointInStroke(r,a))return n[i]}else if(t.isPointInPath(r,a))return n[i]}}},{key:"clickEvent",value:function(t,e){if(this.options.methods){var n=this.isPointInPath(this.getContext(),t);n?this.options.methods.click(n,e):this.options.methods.click(null,e)}}},{key:"mousemoveEvent",value:function(t,e){if(this.options.methods){var n=this.isPointInPath(this.getContext(),t);n?this.options.methods.mousemove(n,e):this.options.methods.mousemove(null,e)}}},{key:"tapEvent",value:function(t,e){if(this.options.methods){var n=this.isPointInPath(this.getContext(),t);n?this.options.methods.tap(n,e):this.options.methods.tap(null,e)}}},{key:"update",value:function(t,e){var n=this,i=t.options,o=n.options;for(var r in i)o[r]=i[r];n.init(o),!1!==e&&n.draw()}},{key:"setOptions",value:function(t){var e=this;e.dataSet.reset(),e.init(t),e.draw()}},{key:"set",value:function(t){var e=this,n=this.getContext(),i=this.getDefaultContextConfig();for(var o in i)n[o]=i[o];e.init(t.options),e.draw()}},{key:"destroy",value:function(){this.unbindEvent(),this.hide()}},{key:"initAnimator",value:function(){var t=this,e=t.options.animation;if("time"==t.options.draw||t.isEnabledTime()){e.stepsRange||(e.stepsRange={start:this.dataSet.getMin("time")||0,end:this.dataSet.getMax("time")||0}),this.steps={step:e.stepsRange.start},t.animator=new oe.Tween(this.steps).onUpdate(function(){t._canvasUpdate(this.step)}).repeat(1/0),this.addAnimatorEvent();var n=1e3*e.duration||5e3;t.animator.to({step:e.stepsRange.end},n),t.animator.start()}else t.animator&&t.animator.stop()}},{key:"addAnimatorEvent",value:function(){}},{key:"animatorMovestartEvent",value:function(){var t=this.options.animation;this.isEnabledTime()&&this.animator&&(this.steps.step=t.stepsRange.start,this.animator.stop())}},{key:"animatorMoveendEvent",value:function(){this.isEnabledTime()&&this.animator&&this.animator.start()}}]),t}(),ge=function(t){function e(t,n,i){Tt(this,e);var o=Bt(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t,n,i));o.map=t,o.options=i||{},o.dataSet=n;var r=new it({map:t,zIndex:o.options.zIndex,update:o._canvasUpdate.bind(o)});o.init(o.options),o.canvasLayer=r,o.transferToMercator();var a=o;return n.on("change",function(){a.transferToMercator(),r.draw()}),o.ctx=r.canvas.getContext("2d"),o.start(),o}return Rt(e,t),jt(e,[{key:"draw",value:function(){this.canvasLayer.draw()}},{key:"init",value:function(t){var e=this;e.options=t,this.initDataRange(t),this.context=e.options.context||"2d",e.options.zIndex&&this.canvasLayer&&this.canvasLayer.setZIndex(e.options.zIndex),e.options.max&&this.intensity.setMax(e.options.max),e.options.min&&this.intensity.setMin(e.options.min),this.initAnimator()}},{key:"transferToMercator",value:function(){var t=this.map.getMapType().getProjection();if("bd09mc"!==this.options.coordType){var e=this.dataSet.get();e=this.dataSet.transferCoordinate(e,function(e){var n=t.lngLatToPoint({lng:e[0],lat:e[1]});return[n.x,n.y]},"coordinates","coordinates_mercator"),this.dataSet._set(e)}}},{key:"_canvasUpdate",value:function(){var t=this.ctx;if(t){var e=this.map,n=Math.pow(2,18-e.getZoom()),i=e.getMapType().getProjection(),o=i.lngLatToPoint(e.getCenter()),r=new BMap.Pixel(o.x-e.getSize().width/2*n,o.y+e.getSize().height/2*n);Lt(t);var a={fromColumn:"bd09mc"==this.options.coordType?"coordinates":"coordinates_mercator",transferCoordinate:function(t){if(t){return[(t[0]-r.x)/n,(r.y-t[1])/n]}}};this.data=this.dataSet.get(a),this.processData(this.data),this.drawAnimation()}}},{key:"drawAnimation",value:function(){var t=this.ctx,e=this.data;if(e){t.save(),t.globalCompositeOperation="destination-out",t.fillStyle="rgba(0, 0, 0, .1)",t.fillRect(0,0,t.canvas.width,t.canvas.height),t.restore(),t.save(),this.options.shadowColor&&(t.shadowColor=this.options.shadowColor),this.options.shadowBlur&&(t.shadowBlur=this.options.shadowBlur),this.options.globalAlpha&&(t.globalAlpha=this.options.globalAlpha),this.options.globalCompositeOperation&&(t.globalCompositeOperation=this.options.globalCompositeOperation);for(var n=this.options,i=0;io&&(e[i]._size=r),t.lineWidth=1,t.strokeStyle=e[i].strokeStyle||e[i]._strokeStyle||n.strokeStyle||"yellow",t.stroke();var a=e[i].fillStyle||e[i]._fillStyle||n.fillStyle;a&&(t.fillStyle=a,t.fill())}else if("LineString"===e[i].geometry.type){t.beginPath();var s=e[i].size||this.options.size||5,r=e[i].minSize||this.options.minSize||0;void 0===e[i]._index&&(e[i]._index=0);var l=e[i]._index;t.arc(e[i].geometry._coordinates[l][0],e[i].geometry._coordinates[l][1],s,0,2*Math.PI,!0),t.closePath(),e[i]._index++,e[i]._index>=e[i].geometry._coordinates.length&&(e[i]._index=0);var u=e[i].strokeStyle||n.strokeStyle,a=e[i].fillStyle||n.fillStyle||"yellow";t.fillStyle=a,t.fill(),u&&n.lineWidth&&(t.lineWidth=n.lineWidth||1,t.strokeStyle=u,t.stroke())}t.restore()}}},{key:"animate",value:function(){this.drawAnimation();var t=this.options.animateTime||100;this.timeout=setTimeout(this.animate.bind(this),t)}},{key:"start",value:function(){this.stop(),this.animate()}},{key:"stop",value:function(){clearTimeout(this.timeout)}},{key:"unbindEvent",value:function(){}},{key:"hide",value:function(){this.canvasLayer.hide(),this.stop()}},{key:"show",value:function(){this.start()}},{key:"clearData",value:function(){this.dataSet&&this.dataSet.clear(),this.update({options:null})}},{key:"destroy",value:function(){this.stop(),this.unbindEvent(),this.clearData(),this.map.removeOverlay(this.canvasLayer),this.canvasLayer=null}}]),e}(ye),me=function(t){function e(t,n,i){Tt(this,e);var o=Bt(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t,n,i)),r=o;i=i||{},o.clickEvent=o.clickEvent.bind(o),o.mousemoveEvent=o.mousemoveEvent.bind(o),o.tapEvent=o.tapEvent.bind(o),r.init(i),r.argCheck(i),r.transferToMercator();var a=o.canvasLayer=new it({map:t,context:o.context,paneName:i.paneName,mixBlendMode:i.mixBlendMode,enableMassClear:i.enableMassClear,zIndex:i.zIndex,update:function(){r._canvasUpdate()}});return n.on("change",function(){r.transferToMercator(),a.draw()}),o}return Rt(e,t),jt(e,[{key:"clickEvent",value:function(t){var n=t.pixel;Dt(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"clickEvent",this).call(this,n,t)}},{key:"mousemoveEvent",value:function(t){var n=t.pixel;Dt(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"mousemoveEvent",this).call(this,n,t)}},{key:"tapEvent",value:function(t){var n=t.pixel;Dt(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"tapEvent",this).call(this,n,t)}},{key:"bindEvent",value:function(t){this.unbindEvent();var e=this.map,n=0,i=this;this.options.methods&&(this.options.methods.click&&(e.setDefaultCursor("default"),e.addEventListener("click",this.clickEvent)),this.options.methods.mousemove&&e.addEventListener("mousemove",this.mousemoveEvent),"ontouchend"in window.document&&this.options.methods.tap&&(e.addEventListener("touchstart",function(t){n=new Date}),e.addEventListener("touchend",function(t){new Date-n<300&&i.tapEvent(t)})))}},{key:"unbindEvent",value:function(t){var e=this.map;this.options.methods&&(this.options.methods.click&&e.removeEventListener("click",this.clickEvent),this.options.methods.mousemove&&e.removeEventListener("mousemove",this.mousemoveEvent))}},{key:"transferToMercator",value:function(t){t||(t=this.dataSet);var e=this.map.getMapType().getProjection();if("bd09mc"!==this.options.coordType){var n=t.get();n=t.transferCoordinate(n,function(t){if(t[0]<-180||t[0]>180||t[1]<-90||t[1]>90)return t;var n=e.lngLatToPoint({lng:t[0],lat:t[1]});return[n.x,n.y]},"coordinates","coordinates_mercator"),t._set(n)}}},{key:"getContext",value:function(){return this.canvasLayer.canvas.getContext(this.context)}},{key:"_canvasUpdate",value:function(t){if(this.canvasLayer){var e=this,n=e.options.animation,i=this.canvasLayer._map,o=Math.pow(2,18-i.getZoom()),r=i.getMapType().getProjection(),a=r.lngLatToPoint(i.getCenter()),s=new BMap.Pixel(a.x-i.getSize().width/2*o,a.y+i.getSize().height/2*o),l=this.getContext();if(e.isEnabledTime()){if(void 0===t)return void Lt(l);"2d"==this.context&&(l.save(),l.globalCompositeOperation="destination-out",l.fillStyle="rgba(0, 0, 0, .1)",l.fillRect(0,0,l.canvas.width,l.canvas.height),l.restore())}else Lt(l);if("2d"==this.context)for(var u in e.options)l[u]=e.options[u];else l.clear(l.COLOR_BUFFER_BIT);if(!(e.options.minZoom&&i.getZoom()e.options.maxZoom)){var p=1;"2d"!=this.context&&(p=this.canvasLayer.devicePixelRatio);var c={fromColumn:"bd09mc"==e.options.coordType?"coordinates":"coordinates_mercator",transferCoordinate:function(t){return[(t[0]-s.x)/o*p,(s.y-t[1])/o*p]}};void 0!==t&&(c.filter=function(e){var i=n.trails||10;return!!(t&&e.time>t-i&&e.timee.options.maxZoom)){var a=1;"2d"!=this.context&&(a=this.canvasLayer.devicePixelRatio);var s=this.map,l=s.getProjection(),a=Math.pow(2,s.zoom)*resolutionScale,u=l.fromLatLngToPoint(this.canvasLayer.getTopLeft()),p={transferCoordinate:function(t){var e=new google.maps.LatLng(t[1],t[0]),n=l.fromLatLngToPoint(e),i={x:(n.x-u.x)*a,y:(n.y-u.y)*a};return[i.x,i.y]}};void 0!==t&&(p.filter=function(e){var i=n.trails||10;return!!(t&&e.time>t-i&&e.timee-n&&t.time0&&void 0!==arguments[0]?arguments[0]:null,n=arguments[1],i=arguments[2];Tt(this,e);var o=Bt(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t,n,i));return o.options=i,o.canvasLayer={canvas:null,devicePixelRatio:window.devicePixelRatio},o.layer_=null,o.initDataRange(i),o.initAnimator(),o.onEvents(),t.on("complete",function(){this.init(t,i),this.argCheck(i)},o),o}return Rt(e,t),jt(e,[{key:"init",value:function(t,e){if(!t)throw new Error("not map object");this.map=t,this.context=this.options.context||"2d",this.getCanvasLayer()}},{key:"_canvasUpdate",value:function(t){this.render(this.canvasLayer.canvas,t)}},{key:"render",value:function(t,e){if(t){var n=this.map,i=t.getContext(this.context),r=this.options.animation;if(this.isEnabledTime()){if(void 0===e)return Lt(i),this;"2d"===this.context&&(i.save(),i.globalCompositeOperation="destination-out",i.fillStyle="rgba(0, 0, 0, .1)",i.fillRect(0,0,i.canvas.width,i.canvas.height),i.restore())}else Lt(i);if("2d"===this.context)for(var a in this.options)i[a]=this.options[a];else i.clear(i.COLOR_BUFFER_BIT);var s={transferCoordinate:function(t){var e=n.lngLatToContainer(new AMap.LngLat(t[0],t[1]));return[e.x,e.y]}};void 0!==e&&(s.filter=function(t){var n=r.trails||10;return!!(e&&t.time>e-n&&t.time0&&void 0!==arguments[0]?arguments[0]:null,n=arguments[1],i=arguments[2];Tt(this,e);var o=Bt(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t,n,i));return o.options=i,o.canvasLayer={canvas:null,devicePixelRatio:window.devicePixelRatio},o.layer_=null,o.previousCursor_=void 0,o.init(t,i),o.argCheck(i),o}return Rt(e,t),jt(e,[{key:"init",value:function(t,e){if(!(t&&t instanceof ol.Map))throw new Error("not map object");this.$Map=t,this.context=this.options.context||"2d",this.getCanvasLayer(),this.initDataRange(e),this.initAnimator(),this.onEvents()}},{key:"_canvasUpdate",value:function(t){this.render(this.canvasLayer.canvas,t)}},{key:"render",value:function(t,e){var n=this.$Map,i=t.getContext(this.context),r=this.options.animation,a=this.options.hasOwnProperty("projection")?this.options.projection:"EPSG:4326";if(this.isEnabledTime()){if(void 0===e)return Lt(i),this;"2d"===this.context&&(i.save(),i.globalCompositeOperation="destination-out",i.fillStyle="rgba(0, 0, 0, .1)",i.fillRect(0,0,i.canvas.width,i.canvas.height),i.restore())}else Lt(i);if("2d"===this.context)for(var s in this.options)i[s]=this.options[s];else i.clear(i.COLOR_BUFFER_BIT);var l={transferCoordinate:function(t){return n.getPixelFromCoordinate(ol.proj.transform(t,a,"EPSG:4326"))}};void 0!==e&&(l.filter=function(t){var n=r.trails||10;return!!(e&&t.time>e-n&&t.timee.options.maxZoom)){var a=o.getBounds(),s=a.getEast()-a.getWest(),l=a.getNorth()-a.getSouth(),u=o.getSize(),p=s/u.x,c=l/u.y,h=this.canvasLayer.getTopLeft(),f=o.latLngToContainerPoint(h),d={transferCoordinate:function(t){var n;n="2d"===e.context?o.latLngToContainerPoint(L.latLng(t[1],t[0])):{x:(t[0]-h.lng)/p,y:(h.lat-t[1])/c};var i={x:n.x-f.x,y:n.y-f.y};return[i.x,i.y]}};void 0!==t&&(d.filter=function(e){var i=n.trails||10;return t&&e.time>t-i&&e.timet-i&&e.time0&&!0===this.props.autoViewport&&t.setViewport(e,this.props.viewportOptions)}}},{key:"getOverlay",value:function(){return null}},{key:"options",get:function(){return["strokeColor","fillColor","strokeWeight","strokeOpacity","fillOpacity","strokeStyle","enableMassClear","enableEditing","enableClicking"]}},{key:"events",get:function(){return["click","dblclick","mousedown","mouseup","mouseout","mouseover","remove","lineupdate"]}}]),e}(l.default);e.default=u},function(t,e,n){"use strict";function i(t){return t&&t.__esModule?t:{default:t}}function o(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function r(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function a(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0});for(var s=(function(){function t(t,e){for(var n=0;n-1&&(v=!1,o=o.replace(/-/,"")),o.indexOf("+")>-1&&(v=!0,o=o.replace("+","")),0==o.length&&(o="_"));var y={display:"flex",justifyContent:"space-between",background:"#FFFFFF",alignItems:"stretch",boxShadow:"0 2px 2px 0 rgba(0, 0, 0, 0.22)",borderRadius:"3px 0 0 3px",minWidth:"155px",minHeight:"50px",marginTop:"-25px"},g={minWidth:"30px",background:"#999999",color:"white",padding:"auto 0",display:"flex",justifyContent:"center",alignItems:"center"};this.props.active&&(g.background="#F5533D"),this.props.leftStyle&&(g=f.obj.merge(g,this.props.leftStyle)),this.props.style&&(y=f.obj.merge(y,this.props.style));var m={flex:"1",padding:"6px",justifyContent:"center",alignItems:"center",fontSize:"12px",color:"#8D93A3",letterSpacing:"0.6px"};this.props.rightStyle&&(m=f.obj.merge(m,this.props.rightStyle));var b=Object.keys(t.props).filter(function(t){return 0==t.indexOf("on")}),w=[];if(b.map(function(e){w[e]=t.props[e]}),c)return p.default.createElement(h.default,{key:JSON.stringify(d)+Math.random(),map:this.props.map,position:d,zIndex:t.props.zIndex},p.default.createElement("div",s({key:JSON.stringify(d)+Math.random(),style:y},w),p.default.createElement("div",{style:g},l),p.default.createElement("div",{style:m},!a&&p.default.createElement("div",null," ",i+"("+o,v?p.default.createElement("img",{style:{width:"8px",height:"auto",margin:"1px"},src:"//huiyan.baidu.com/cms/react-bmap/up.png"}):p.default.createElement("img",{style:{width:"8px",height:"auto",margin:"1px"},src:"//huiyan.baidu.com/cms/react-bmap/down.png"}),")"),a||p.default.createElement("div",null," ",r," "))))}},{key:"render",value:function(){return this.createMarker()}}],[{key:"defaultProps",get:function(){return{autoViewport:!0}}}]),e}(p.default.Component);e.default=d},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=void 0,i=void 0;try{if("string"==typeof t){var o=t.split(",");n=JSON.parse(o[0].match(/[0-9]+\.?[0-9]{0,}/)[0]),i=JSON.parse(o[1].match(/[0-9]+\.?[0-9]{0,}/)[0])}else t instanceof Array?(n=JSON.parse(t[0]),i=JSON.parse(t[1])):t instanceof Object&&(n=t.lng,i=t.lat);if(e)return{lng:n,lat:i};return new BMap.Point(n,i)}catch(t){console.log("create BmapPoint error",'Please input data like this: 1. "114.54,40.33", 2.[114.54,40.33], 3.{lng:114.54,lat:40.33}')}};e.default=i},function(t,e,n){"use strict";function i(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0});var o=n(10);Object.defineProperty(e,"Map",{enumerable:!0,get:function(){return i(o).default}});var r=n(6);Object.defineProperty(e,"Marker",{enumerable:!0,get:function(){return i(r).default}});var a=n(7);Object.defineProperty(e,"MarkerOrderTip",{enumerable:!0,get:function(){return i(a).default}});var s=n(23);Object.defineProperty(e,"InfoWindow",{enumerable:!0,get:function(){return i(s).default}});var l=n(24);Object.defineProperty(e,"NavigationControl",{enumerable:!0,get:function(){return i(l).default}});var u=n(25);Object.defineProperty(e,"OverviewMapControl",{enumerable:!0,get:function(){return i(u).default}});var p=n(26);Object.defineProperty(e,"ScaleControl",{enumerable:!0,get:function(){return i(p).default}});var c=n(27);Object.defineProperty(e,"MapTypeControl",{enumerable:!0,get:function(){return i(c).default}});var h=n(28);Object.defineProperty(e,"PanoramaControl",{enumerable:!0,get:function(){return i(h).default}});var f=n(29);Object.defineProperty(e,"Circle",{enumerable:!0,get:function(){return i(f).default}});var d=n(30);Object.defineProperty(e,"Polyline",{enumerable:!0,get:function(){return i(d).default}});var v=n(31);Object.defineProperty(e,"Polygon",{enumerable:!0,get:function(){return i(v).default}});var y=n(32);Object.defineProperty(e,"Road",{enumerable:!0,get:function(){return i(y).default}});var g=n(36);Object.defineProperty(e,"Boundary",{enumerable:!0,get:function(){return i(g).default}});var m=n(37);Object.defineProperty(e,"MarkerList",{enumerable:!0,get:function(){return i(m).default}});var b=n(39);Object.defineProperty(e,"MapvMarkerList",{enumerable:!0,get:function(){return i(b).default}});var w=n(40);Object.defineProperty(e,"TrafficLayer",{enumerable:!0,get:function(){return i(w).default}});var _=n(41);Object.defineProperty(e,"Merge",{enumerable:!0,get:function(){return i(_).default}});var x=n(42);Object.defineProperty(e,"MapvLayer",{enumerable:!0,get:function(){return i(x).default}});var k=n(43);Object.defineProperty(e,"DrivingRoute",{enumerable:!0,get:function(){return i(k).default}});var P=n(44);Object.defineProperty(e,"PointLabel",{enumerable:!0,get:function(){return i(P).default}});var O=n(47);Object.defineProperty(e,"Arc",{enumerable:!0,get:function(){return i(O).default}});var S=n(48);Object.defineProperty(e,"ThickRay",{enumerable:!0,get:function(){return i(S).default}});var M=n(49);Object.defineProperty(e,"MapListener",{enumerable:!0,get:function(){return i(M).default}})},function(t,e,n){"use strict";function i(t){return t&&t.__esModule?t:{default:t}}function o(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function r(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function a(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0});var s=function(){function t(t,e){for(var n=0;n1&&void 0!==arguments[1]?arguments[1]:new WeakMap,n=void 0,r=t.constructor;switch(r){case RegExp:n=new r(t);break;case Date:n=new r(t.getTime());break;default:if(e.has(t))return e.get(t);n=new r,e.set(t,n)}for(var a in t)n[a]=i(t[a])?o(t[a],e):t[a];return n}Object.defineProperty(e,"__esModule",{value:!0});var r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t};e.default=o},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},o=function(t,e){var n=JSON.parse(JSON.stringify(t));return function t(e,n){for(var o in n)"[object Object]"==Object.prototype.toString.call(n[o])?("object"!==i(e[o])&&(e[o]={}),t(e[o],n[o])):e[o]=n[o]}(n,e),n};e.default=o},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=function(t,e){var n={};return function t(e,n,i){var o={};e&&Object.keys(e).map(function(t){o[t]=!0}),n&&Object.keys(n).map(function(t){o[t]=!0});for(var r in o)if(e[r]&&"[object Object]"==Object.prototype.toString.call(e[r])&&n[r]&&"[object Object]"==Object.prototype.toString.call(n[r]))if(JSON.stringify(e[r])!==JSON.stringify(n[r])){i[r]||(i[r]={});var a=i[r];t(e[r],n[r],a)}else i[r]=n[r];else i[r]=n[r]}(t,e,n),0==Object.keys(n).length&&(n=null),n};e.default=i},function(t,e,n){"use strict";function i(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0});var o=n(8),r=i(o),a=n(18),s=i(a),l={createPoint:r.default,getPoints:s.default};e.default=l},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(8),o=function(t){return t&&t.__esModule?t:{default:t}}(i),r=function(t){var e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=[];return t.split("|").forEach(function(t){for(var i=t?t.split(","):[],r=[],a=0;a=200&&this.status<300?t.success&&t.success(JSON.parse(this.response)):t.fail&&t.fail(this.statusText),t.complete&&t.complete(JSON.parse(this.response)),clearTimeout(a)},n.onerror=function(){t.fail&&t.fail(e.statusText),clearTimeout(a)},{abort:function(){o||(o=!0,n.abort())},params:t}}function r(t){var e="jsonp_"+ +new Date+"_"+parseInt(1e7*Math.random(),10),n=document.createElement("script"),i=!1;t.url+="-1"===t.url.indexOf("?")?"?":"&",t.url+="callback="+e,n.src=t.url,document.head.appendChild(n);var o=setTimeout(function(){null!==window[e]&&(window[e]=null,n.parentElement.removeChild(n),t.fail&&t.fail({error:null,msg:"timeout"}),t.complete&&t.complete(JSON.parse()))},1e4);return n.addEventListener("error",function(r){window[e]=null,n.parentElement.removeChild(n),clearTimeout(o),i||(t.fail&&t.fail({error:r,msg:"loaderror"}),t.complete&&t.complete())}),window[e]=function(r){clearTimeout(o),i||(t.success(r),t.complete&&t.complete()),window[e]=null,n.parentElement.removeChild(n)},{abort:function(){clearTimeout(o),i=!0},params:t}}Object.defineProperty(e,"__esModule",{value:!0});var a={fetch:i,ajax:o,jsonp:r};e.default=a},function(t,e,n){"use strict";function i(t,e){var n=document.createElement("a");n.style.display="none";var i=new Blob([t]);n.href=URL.createObjectURL(i),n.href=t,e&&(n.download=e),document.body.appendChild(n),n.click(),document.body.removeChild(n)}Object.defineProperty(e,"__esModule",{value:!0}),e.default=i},function(t,e,n){"use strict";function i(t,e,n){this.options=n||{},this._point=t,this.content=e}Object.defineProperty(e,"__esModule",{value:!0}),i.prototype=new BMap.Overlay,i.prototype.initialize=function(t){this._map=t;var e=this._div=document.createElement("div");e.setAttribute("tag","customoverlay"),e.style.position="absolute";var n=this.options.zIndex||BMap.Overlay.getZIndex(this._point.lat);e.style.zIndex=n,e.addEventListener("touchstart",function(t){t.stopPropagation(),console.log("touchstart")}),e.addEventListener("touchend",function(t){t.stopPropagation(),console.log("touchend")}),"[object String]"==Object.prototype.toString.call(this.content)?e.innerHTML=this.content:e.appendChild(this.content);var i=this.options.pane||"labelPane";return t.getPanes()[i].appendChild(e),e},i.prototype.draw=function(){var t=this._map,e=t.pointToOverlayPixel(this._point),n=this.options.offset||new BMap.Size(0,0);this._div.style.left=e.x+n.width+"px",this._div.style.top=e.y+n.height+"px"},e.default=i},function(t,e,n){"use strict";function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function r(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0});var a=function(){function t(t,e){for(var n=0;n0&&!1!==this.props.autoViewport&&this.props.map.setViewport(e,this.props.viewportOptions)}},{key:"getRoadGroup",value:function(t,e,n){var t=t,e=e,n=n,i={},o=[];if(e)for(var r=0;r1)for(var n=1;n3&&void 0!==arguments[3]?arguments[3]:{},r=t.getZoom(),a=o.lineWidth||5,s=void 0===o.level?1:o.level,l=null,u=0,p=0,c=[],h=[],f=[],d=0,v=0;e.beginPath();var y,g=Math.pow(2,18-t.getZoom()),m=t.getMapType().getProjection(),b=m.lngLatToPoint(t.getCenter()),w=new BMap.Pixel(b.x-t.getSize().width/2*g,b.y+t.getSize().height/2*g);return n.forEach(function(n,i){var r=null;l=null;for(var a=n.split(","),s=0;s=50&&(f.push(b),d%=50))}l=y,0===s?(r=r||y,e.moveTo(y.x,y.y)):(p>15||s>=a.length-2)&&(p=0,e.lineTo(y.x,y.y))}if(o.arrow&&i===n.length-1&&v<100){var k=c[Math.ceil(c.length/2)];for(var P in c)if(c[P].totalDepth>=v/2){k=c[P+1]?c[P+1]:c[P];break}var O=c[c.length-1];k.end=O.end,f=[],f.push(k)}}),o.line&&(e.lineCap=o.lineCap||"round",e.lineJoin="round",o.border&&(e.strokeStyle=o.border.color||"white",e.lineWidth=(r<=13?a-2:a)+(2*o.border.lineWidth||4),e.stroke()),e.strokeStyle=o.color||i[s]||"#fc2c2b",e.lineWidth=r<=13?a-2:a,e.stroke()),o.arrow&&this.drawArrow(e,f,o),h},drawArrow:function(t,e,n){t.beginPath(),e.forEach(function(i){var o=i.start.x,r=i.start.y,a=i.end.x,s=i.end.y,l=a-o,u=s-r,p=[0,-1],c=[i.end.x-i.start.x,i.end.y-i.start.y],h=p[0]*c[0]+p[1]*c[1],f=Math.sqrt(p[0]*p[0]+p[1]*p[1]),d=Math.sqrt(c[0]*c[0]+c[1]*c[1]),v=Math.acos(h/(f*d));c[0]<0&&(v=2*Math.PI-v);for(var y=n.arrow.width/2||2,g=n.arrow.height||y,m=0;i.offset+50*m<=i.depth;){var b=i.offset+50*m,w=b/i.depth;t.save(),t.translate(o+l*w,r+u*w),t.rotate(v),t.moveTo(1.618*-y,g),t.lineTo(0,0),t.lineTo(1.618*y,g),t.restore(),m+=1}1===e.length&&i.offset>i.depth&&(t.save(),t.translate(o,r),t.rotate(v),t.moveTo(1.618*-y,g),t.lineTo(0,0),t.lineTo(1.618*y,g),t.restore())}),t.strokeStyle=n.arrow.color||"#fff",t.lineWidth=3,t.stroke()}};e.default=o},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i={mergeRoadPath:function(t,e){for(var n=[],i=0;i=Math.min(o.lng,r.lng)&&t.lng<=Math.max(o.lng,r.lng)&&t.lat>=Math.min(o.lat,r.lat)&&t.lat<=Math.max(o.lat,r.lat)){var a=(o.lng-t.lng)*(r.lat-t.lat)-(r.lng-t.lng)*(o.lat-t.lat),s=2e-10;if(s=2e-9,a-s)return!0}}return!1}};e.default=i},function(t,e,n){"use strict";function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function r(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0});var a=function(){function t(t,e){for(var n=0;n0&&!1!==i.props.autoViewport&&n.setViewport(o,i.props.viewportOptions)}}var e=this.props.data,n=this.props.map;if(e){this._request={};var i=this,o=new BMap.Boundary,r=[];e.forEach(function(t,e){i._request[t.name]=!1,i._backData[t.name]&&(r=r.concat(i._backData[t.name]),i._request[t.name]=!0)}),t(),e.forEach(function(e,n){i._request[e.name]||i._allRequest[e.name]||(i._allRequest[e.name]=!0,o.get(e.name,function(n){for(var o=[],a=0;a=10||this.props.mini)&&(n.isShowNumber=!1,n.size=10,n.strokeStyle=f,n.lineWidth=3,n.strokeOpacity=.4));var d=new h.default(n);d.addEventListener("click",function(e,n){t.props.onClick&&t.props.onClick(n-1)}),d.addEventListener("mouseover",function(e,n){t.props.onMouseOver&&t.props.onMouseOver(n-1)}),d.addEventListener("mouseout",function(e,n){t.props.onMouseOut&&t.props.onMouseOut(n-1)}),d.index=l,this.markers.push(d),s.push({geometry:{type:"Point",coordinates:[u[0],u[1]]},count:a[l].count,text:a[l].text})}for(var v=this.markers.length;v--;)e.addOverlay(this.markers[v]);this.props.mini?this.dataSet.set(s):this.dataSet.set(s.splice(0,10)),this.setViewport()}}},{key:"setViewport",value:function(){var t=this.props.map;if(t){for(var e=this.props.data,n=t.getMapType().getProjection(),i=[],o=0;o0&&!1!==this.props.autoViewport&&t.setViewport(i,this.props.viewportOptions)}}}],[{key:"defaultProps",get:function(){return{autoViewport:!0}}}]),e}(u.default);e.default=f},function(t,e,n){"use strict";function i(t){this.options=t||{},this._point=t.point,this._fillColor=t.fillStyle||"#1495ff",this._size=t.size||30,this._lineWidth=void 0===t.lineWidth?2:t.lineWidth,this._strokeStyle=t.strokeStyle||"#ffffff",t.strokeOpacity&&(this._strokeStyle=o(this._strokeStyle,.4))}function o(t,e){var n=/^#([0-9a-fA-f]{3}|[0-9a-fA-f]{6})$/,i=t.toLowerCase();if(i&&n.test(i)){if(4===i.length){for(var o="#",r=1;r<4;r+=1)o+=i.slice(r,r+1).concat(i.slice(r,r+1));i=o}for(var a=[],r=1;r<7;r+=2)a.push(parseInt("0x"+i.slice(r,r+2)));return e?(a.push(e),"rgba("+a.join(",")+")"):"rgb("+a.join(",")+")"}return i}Object.defineProperty(e,"__esModule",{value:!0}),i.prototype=new BMap.Overlay,i.prototype.initialize=function(t){this._map=t;var e=this._div=document.createElement("div"),n=e.style;n.position="absolute",n.backgroundClip="padding-box",n.zIndex=this.options.zIndex||BMap.Overlay.getZIndex(this._point.lat),n.backgroundColor=this._fillColor,!1!==this.options.isShowShadow&&(n.boxShadow="0 0 5px rgba(0, 0, 0, 0.5)"),n.border=this._lineWidth+"px solid "+this._strokeStyle,n.color="white",n.textShadow="0px 0px 5px #fff",n.width=this._size+"px",n.boxSizing="content-box",n.borderRadius="30px",n.height=this._size+"px",n.lineHeight=this._size+"px",n.fontSize="12px",n.cursor="pointer",n.textAlign="center",n.MozUserSelect="none",this.options.number&&!1!==this.options.isShowNumber&&(e.innerHTML=this.options.number);var i=this;return e.addEventListener("mouseover",function(){i.dispatchEvent("mouseover",i.options.number),n.backgroundColor="#1495ff"}),e.addEventListener("mouseout",function(){i.dispatchEvent("mouseout",i.options.number),n.backgroundColor=i._fillColor}),e.addEventListener("click",function(){i.dispatchEvent("click",i.options.number)}),t.getPanes().markerPane.appendChild(e),e},i.prototype.draw=function(){var t=this._map,e=t.pointToOverlayPixel(this._point);this._div.style.left=e.x-(this._size+this._lineWidth)/2-1+"px",this._div.style.top=e.y-(this._size+this._lineWidth)/2-2+"px"},e.default=i},function(t,e,n){"use strict";function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function r(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0});var a=function(){function t(t,e){for(var n=0;n0&&(t.forEach(function(t,l){var u=t.location.split(","),p=e.project.pointToLngLat(new BMap.Pixel(u[0],u[1]));s.push(p),l<10?(n.push({geometry:{type:"Point",coordinates:[u[0],u[1]]},count:parseInt(t.count)}),i.push({geometry:{type:"Point",coordinates:[u[0],u[1]]},id:l,count:parseInt(t.count),text:parseInt(l)+1}),o.push({geometry:{type:"Point",coordinates:[u[0],u[1]]},count:parseInt(t.count),text:t.text})):(r.push({geometry:{type:"Point",coordinates:[u[0],u[1]]},id:l,count:parseInt(t.count)}),a.push({geometry:{type:"Point",coordinates:[u[0],u[1]]},count:parseInt(t.count)}))}),this.shadowSet.set(n),this.circleSet.set(i),this.textSet.set(o),this.numSet.set(i),this.otherSet.set(r),this.otherShadowSet.set(a),s.length>0&&!1!==this.props.autoViewport&&map.setViewport(s,self.props.viewportOptions))}},{key:"createLayers",value:function(){this._createLayer=!0;var t=this.map;this.project=t.getMapType().getProjection();var e=this,n=this.shadowSet=new u.DataSet([]),i=this.circleSet=new u.DataSet([]),o=this.textSet=new u.DataSet([]),r=this.numSet=new u.DataSet([]),a=this.otherSet=new u.DataSet([]),s=this.otherShadowSet=new u.DataSet([]);this.layers=[];var l={coordType:"bd09mc",splitList:{4:"#d53938",3:"#fe6261",2:"#ffb02d",other:"#80db69"},shadowBlur:10,size:5,max:30,methods:{click:function(t){t&&e.handleClick(t.id)},mousemove:function(t){a.update(function(t){t.fillStyle=null}),t?(e.isSmallPath=!0,e.props.map.setDefaultCursor("pointer"),a.update(function(t){t.fillStyle="#1495ff"},{id:t.id})):(e.isSmallPath=!1,e.isSmallPath||e.isBigPath||e.props.map.setDefaultCursor("auto"))}},draw:"category"},p={splitList:{4:"#d53938",3:"#fe6261",2:"#ffb02d",1:"#80db69"},styleType:"fill",globalAlpha:.4,coordType:"bd09mc",size:8,minSize:5,draw:"category"};if(this.layers.push(new u.baiduMapLayer(t,s,p)),this.layers.push(new u.baiduMapLayer(t,a,l)),!0===this.props.animation){var c={splitList:{4:"#d53938",3:"#fe6261",2:"#ffb02d",1:"#80db69"},styleType:"stroke",globalAlpha:.4,coordType:"bd09mc",size:20,minSize:10,draw:"category"};this.layers.push(new u.baiduMapAnimationLayer(t,n,c))}var h={splitList:{1:"#80db69",4:"#d53938",3:"#fe6261",2:"#ffb02d"},fillStyle:"red",coordType:"bd09mc",size:10,draw:"category",methods:{click:function(t){t&&e.handleClick(t.id)},mousemove:function(t){i.update(function(t){t.fillStyle=null}),t?(e.isBigPath=!0,e.map.setDefaultCursor("pointer"),i.update(function(t){t.fillStyle="#1495ff"},{id:t.id})):(e.isBigPath=!1,e.isBigPath||e.isSmallPath||e.map.setDefaultCursor("auto"))}}};this.layers.push(new u.baiduMapLayer(t,i,h));var f={coordType:"bd09mc",draw:"text",font:"13px Arial",fillStyle:"#ffffff",shadowColor:"#ffffff",shadowBlur:10};this.layers.push(new u.baiduMapLayer(t,r,f));var d={coordType:"bd09mc",font:"13px Arial",fillStyle:"#666",shadowColor:"#ffffff",shadowBlur:10,draw:"text",avoid:!0,textAlign:"left",offset:{x:10,y:0}};this.layers.push(new u.baiduMapLayer(t,o,d))}},{key:"render",value:function(){return null}}],[{key:"defaultProps",get:function(){return{autoViewport:!0}}}]),e}(l.default);e.default=p},function(t,e,n){"use strict";function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function r(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0});var a=function(){function t(t,e){for(var n=0;nthis.minX&&t.lat>this.minY&&t.lngthis.minX&&t.minY>this.minY&&t.maxX=Math.min(o.lng,r.lng)&&t.lng<=Math.max(o.lng,r.lng)&&t.lat>=Math.min(o.lat,r.lat)&&t.lat<=Math.max(o.lat,r.lat)){var a=(o.lng-t.lng)*(r.lat-t.lat)-(r.lng-t.lng)*(o.lat-t.lat),s=2e-10;if(s=2e-9,a-s)return!0}}return!1},e.default=o},function(t,e,n){"use strict";function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function r(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0});var a=function(){function t(t,e){for(var n=0;n0&&!1!==t.props.autoViewport&&e.setViewport(o,t.props.viewportOptions)})}this.lineDataSet.set(n),this.lineLayer.update({options:this.props.lineOptions||{draw:"simple",strokeStyle:"#5E87DB",lineWidth:3}}),this.pointDataSet.set(i),this.pointLayer.update({options:this.props.pointOptions||{coordType:this.props.coordType,draw:"simple",fillStyle:"#5E87DB",size:5}}),this.textLayer.update({options:this.props.textOptions||{coordType:this.props.coordType,draw:"text",font:"18px Arial",offset:{x:0,y:12},fillStyle:"#333",size:12}}),this.props.enableAnimation?this.animationLayer.update({options:this.props.animationOptions||{coordType:this.props.coordType,fillStyle:"rgba(255, 250, 250, 0.9)",lineWidth:0,size:4,animateTime:50,draw:"simple"}}):this.animationLayer&&this.animationLayer.hide()}}}],[{key:"defaultProps",get:function(){return{}}}]),e}(p.default);e.default=h},function(t,e,n){"use strict";function i(t){return t&&t.__esModule?t:{default:t}}function o(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function r(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function a(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0});var s=function(){function t(t,e){for(var n=0;n0&&!1!==t.props.autoViewport&&e.setViewport(r,t.props.viewportOptions)})}this.lineDataSet.set(n),this.lineLayer.update({options:this.props.lineOptions||{coordType:this.props.coordType,draw:"simple",strokeStyle:"#5E87DB",globalCompositeOperation:"lighter",shadowColor:"rgba(255, 255, 255, 0.5)",shadowBlur:60,lineWidth:2}}),this.pointDataSet.set(i),this.pointLayer.update({options:this.props.pointOptions||{coordType:this.props.coordType,draw:"simple",fillStyle:"#5E87DB",size:5,shadowColor:"#5E87DB",shadowBlur:20}}),this.textLayer.update({options:this.props.textOptions||{coordType:this.props.coordType,draw:"text",font:"18px Arial",offset:{x:0,y:12},fillStyle:"#333",size:12}})}}}],[{key:"defaultProps",get:function(){return{}}}]),e}(p.default);e.default=h},function(t,e,n){"use strict";function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function r(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}function a(t,e){var n=null;return function(){var i=this,o=arguments;n&&clearTimeout(n),n=setTimeout(function(){t.apply(i,o)},e)}}function s(t,e){var n=void 0,i=arguments,o=void 0;return function r(){var a=this,s=Date.now();o||(o=s),n&&clearTimeout(n),s-o>=e?(t.apply(a,i),o=s):n=setTimeout(function(){r.apply(a,i)},50)}}Object.defineProperty(e,"__esModule",{value:!0});var l=function(){function t(t,e){for(var n=0;n