From 244f3d7843680866dddfbecd22551f585c6d5440 Mon Sep 17 00:00:00 2001 From: plainheart Date: Fri, 19 Mar 2021 17:46:09 +0800 Subject: [PATCH] [release] prepare release 1.9.3 --- README.md | 4 ++-- README.zh-CN.md | 4 ++-- dist/echarts-extension-amap.cjs.js | 4 ++-- dist/echarts-extension-amap.esm.js | 4 ++-- dist/echarts-extension-amap.js | 4 ++-- dist/echarts-extension-amap.min.js | 4 ++-- examples/heatmap.html | 2 +- examples/heatmap_zh_CN.html | 2 +- examples/lines.html | 2 +- examples/lines_zh_CN.html | 2 +- examples/scatter.html | 2 +- examples/scatter_zh_CN.html | 2 +- package-lock.json | 4 ++-- package.json | 2 +- types.d.ts | 2 +- 15 files changed, 22 insertions(+), 22 deletions(-) diff --git a/README.md b/README.md index 40bd903..569636e 100644 --- a/README.md +++ b/README.md @@ -70,7 +70,7 @@ Use the latest version Use a specific version -[https://cdn.jsdelivr.net/npm/echarts-extension-amap@1.9.2/dist/echarts-extension-amap.min.js](https://cdn.jsdelivr.net/npm/echarts-extension-amap@1.9.2/dist/echarts-extension-amap.min.js) +[https://cdn.jsdelivr.net/npm/echarts-extension-amap@1.9.3/dist/echarts-extension-amap.min.js](https://cdn.jsdelivr.net/npm/echarts-extension-amap@1.9.3/dist/echarts-extension-amap.min.js) [**unpkg**](https://unpkg.com/) @@ -80,7 +80,7 @@ Use the latest version Use a specific version -[https://unpkg.com/echarts-extension-amap@1.9.2/dist/echarts-extension-amap.min.js](https://unpkg.com/echarts-extension-amap@1.9.2/dist/echarts-extension-amap.min.js) +[https://unpkg.com/echarts-extension-amap@1.9.3/dist/echarts-extension-amap.min.js](https://unpkg.com/echarts-extension-amap@1.9.3/dist/echarts-extension-amap.min.js) This extension will register itself as a component of `echarts` after it is imported. diff --git a/README.zh-CN.md b/README.zh-CN.md index f2b2ebf..b3de322 100644 --- a/README.zh-CN.md +++ b/README.zh-CN.md @@ -70,7 +70,7 @@ import 'echarts-extension-amap'; 使用指定版本 -[https://cdn.jsdelivr.net/npm/echarts-extension-amap@1.9.2/dist/echarts-extension-amap.min.js](https://cdn.jsdelivr.net/npm/echarts-extension-amap@1.9.2/dist/echarts-extension-amap.min.js) +[https://cdn.jsdelivr.net/npm/echarts-extension-amap@1.9.3/dist/echarts-extension-amap.min.js](https://cdn.jsdelivr.net/npm/echarts-extension-amap@1.9.3/dist/echarts-extension-amap.min.js) [**unpkg**](https://unpkg.com/) @@ -80,7 +80,7 @@ import 'echarts-extension-amap'; 使用指定版本 -[https://unpkg.com/echarts-extension-amap@1.9.2/dist/echarts-extension-amap.min.js](https://unpkg.com/echarts-extension-amap@1.9.2/dist/echarts-extension-amap.min.js) +[https://unpkg.com/echarts-extension-amap@1.9.3/dist/echarts-extension-amap.min.js](https://unpkg.com/echarts-extension-amap@1.9.3/dist/echarts-extension-amap.min.js) 插件会自动注册相应的组件。 diff --git a/dist/echarts-extension-amap.cjs.js b/dist/echarts-extension-amap.cjs.js index 7f39476..e5fc59c 100644 --- a/dist/echarts-extension-amap.cjs.js +++ b/dist/echarts-extension-amap.cjs.js @@ -1,6 +1,6 @@ /*! * echarts-extension-amap - * @version 1.9.2 + * @version 1.9.3 * @author plainheart * * MIT License @@ -837,7 +837,7 @@ var AMapView = { var AMapView$1 = isV5 ? echarts.ComponentView.extend(AMapView) : AMapView; var name = "echarts-extension-amap"; -var version = "1.9.2"; +var version = "1.9.3"; /** * AMap component extension diff --git a/dist/echarts-extension-amap.esm.js b/dist/echarts-extension-amap.esm.js index ec61627..e132514 100644 --- a/dist/echarts-extension-amap.esm.js +++ b/dist/echarts-extension-amap.esm.js @@ -1,6 +1,6 @@ /*! * echarts-extension-amap - * @version 1.9.2 + * @version 1.9.3 * @author plainheart * * MIT License @@ -834,7 +834,7 @@ var AMapView = { var AMapView$1 = isV5 ? ComponentView.extend(AMapView) : AMapView; var name = "echarts-extension-amap"; -var version = "1.9.2"; +var version = "1.9.3"; /** * AMap component extension diff --git a/dist/echarts-extension-amap.js b/dist/echarts-extension-amap.js index 29c5013..15b2078 100644 --- a/dist/echarts-extension-amap.js +++ b/dist/echarts-extension-amap.js @@ -1,6 +1,6 @@ /*! * echarts-extension-amap - * @version 1.9.2 + * @version 1.9.3 * @author plainheart * * MIT License @@ -837,7 +837,7 @@ var AMapView$1 = isV5 ? echarts.ComponentView.extend(AMapView) : AMapView; var name = "echarts-extension-amap"; - var version = "1.9.2"; + var version = "1.9.3"; /** * AMap component extension diff --git a/dist/echarts-extension-amap.min.js b/dist/echarts-extension-amap.min.js index 1f986c5..82c7699 100644 --- a/dist/echarts-extension-amap.min.js +++ b/dist/echarts-extension-amap.min.js @@ -1,6 +1,6 @@ /*! * echarts-extension-amap - * @version 1.9.2 + * @version 1.9.3 * @author plainheart * * MIT License @@ -26,5 +26,5 @@ * SOFTWARE. * */ -!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("echarts/lib/echarts")):"function"==typeof define&&define.amd?define(["exports","echarts"],t):t(((e="undefined"!=typeof globalThis?globalThis:e||self).echarts=e.echarts||{},e.echarts.amap={}),e.echarts)}(this,(function(e,t){"use strict";function n(e,n){return n=n||[0,0],t.util.map([0,1],(function(t){var o=n[t],a=e[t]/2,i=[],r=[];return i[t]=o-a,r[t]=o+a,i[1-t]=r[1-t]=n[1-t],Math.abs(this.dataToPoint(i)[t]-this.dataToPoint(r)[t])}),this)}var o=["echartsLayerZIndex","echartsLayerInteractive","renderOnMoving","largeMode","layers"];function a(e,t){this._amap=e,this._api=t,this._mapOffset=[0,0]}var i=a.prototype;i.setZoom=function(e){this._zoom=e},i.setCenter=function(e){var t=new AMap.LngLat(e[0],e[1]);this._center=this._amap.lngLatToContainer(t)},i.setMapOffset=function(e){this._mapOffset=e},i.setAMap=function(e){this._amap=e},i.getAMap=function(){return this._amap},i.dataToPoint=function(e){var t=new AMap.LngLat(e[0],e[1]),n=this._amap.lngLatToContainer(t),o=this._mapOffset;return[n.x-o[0],n.y-o[1]]},i.pointToData=function(e){var t=this._mapOffset,n=this._amap.containerToLngLat(new AMap.Pixel(e[0]+t[0],e[1]+t[1]));return[n.lng,n.lat]},i.getViewRect=function(){var e=this._api;return new t.graphic.BoundingRect(0,0,e.getWidth(),e.getHeight())},i.getRoamTransform=function(){return t.matrix.create()},i.prepareCustoms=function(){var e=this.getViewRect();return{coordSys:{type:"amap",x:e.x,y:e.y,width:e.width,height:e.height},api:{coord:t.util.bind(this.dataToPoint,this),size:t.util.bind(n,this)}}},a.create=function(e,n){var i;e.eachComponent("amap",(function(e){if("undefined"==typeof AMap)throw new Error("AMap api is not loaded");if(i)throw new Error("Only one amap component can exist");var r=e.getAMap(),s=e.get("echartsLayerInteractive");if(!r){var f=n.getDom(),c=n.getZr().painter,p=c.getViewportRoot();p.style.visibility="hidden";var u=f.querySelector(".ec-extension-amap");u&&(p.style.left="0px",p.style.top="0px",f.removeChild(u)),(u=document.createElement("div")).className="ec-extension-amap",u.style.cssText="position:absolute;top:0;left:0;bottom:0;right:0;",f.appendChild(u);var d=t.util.clone(e.get());"echartsLayerZIndex"in d&&console.warn("[ECharts][Extension][AMap] DEPRECATED: the option `echartsLayerZIndex` has been removed since v1.9.0, use `echartsLayerInteractive` instead."),t.util.each(o,(function(e){delete d[e]})),r=new AMap.Map(u,d),e.setAMap(r),r.on("complete",(function(){u.querySelector(".amap-maps").appendChild(p),p.style.visibility=""})),e.setEChartsLayer(p),c.getViewportRootOffset=function(){return{offsetLeft:0,offsetTop:0}}}e.__echartsLayerInteractive!==s&&(e.setEChartsLayerInteractive(s),e.__echartsLayerInteractive=s);var l=e.get("center"),m=e.get("zoom");if(l&&m){var h=r.getCenter(),v=r.getZoom();e.centerOrZoomChanged([h.lng,h.lat],v)&&r.setZoomAndCenter(m,new AMap.LngLat(l[0],l[1]))}var y=e.__mapStyle,g=e.get("mapStyle");if(y!==g&&(r.setMapStyle(g),e.__mapStyle=g),r.setLang){var _=e.__mapLang,L=e.get("lang");_!==L&&(r.setLang(L),e.__mapLang=L)}(i=new a(r,n)).setMapOffset(e.__mapOffset||[0,0]),i.setZoom(m),i.setCenter(l),e.coordinateSystem=i})),e.eachSeries((function(e){"amap"===e.get("coordinateSystem")&&(e.coordinateSystem=i)}))},i.dimensions=a.dimensions=["lng","lat"];var r=t.version.split(".")[0]>4;var s={type:"amap",setAMap:function(e){this.__amap=e},getAMap:function(){return this.__amap},setEChartsLayer:function(e){this.__echartsLayer=e},getEChartsLayer:function(){return this.__echartsLayer},setEChartsLayerVisiblity:function(e){this.__echartsLayer.style.display=e?"block":"none"},setEChartsLayerInteractive:function(e){this.option.echartsLayerInteractive=!!e,this.__echartsLayer.style.pointerEvents=e?"auto":"none"},setCenterAndZoom:function(e,t){this.option.center=e,this.option.zoom=t},centerOrZoomChanged:function(e,t){var n,o,a=this.option;return o=a.center,!((n=e)&&o&&n[0]===o[0]&&n[1]===o[1]&&t===a.zoom)},defaultOption:{center:[116.397428,39.90923],zoom:5,isHotspot:!1,resizeEnable:!0,echartsLayerInteractive:!0,renderOnMoving:!0,largeMode:!1}},f=r?t.ComponentModel.extend(s):s,c="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},p=/^\s+|\s+$/g,u=/^[-+]0x[0-9a-f]+$/i,d=/^0b[01]+$/i,l=/^0o[0-7]+$/i,m=parseInt,h="object"==typeof self&&self&&self.Object===Object&&self,v="object"==typeof c&&c&&c.Object===Object&&c||h||Function("return this")(),y=Object.prototype.toString,g=Math.max,_=Math.min,L=function(){return v.Date.now()};function M(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function b(e){if("number"==typeof e)return e;if(function(e){return"symbol"==typeof e||function(e){return!!e&&"object"==typeof e}(e)&&"[object Symbol]"==y.call(e)}(e))return NaN;if(M(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=M(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=e.replace(p,"");var n=d.test(e);return n||l.test(e)?m(e.slice(2),n?2:8):u.test(e)?NaN:+e}var C=function(e,t,n){var o,a,i,r,s,f,c=0,p=!1,u=!1,d=!0;if("function"!=typeof e)throw new TypeError("Expected a function");function l(t){var n=o,i=a;return o=a=void 0,c=t,r=e.apply(i,n)}function m(e){return c=e,s=setTimeout(v,t),p?l(e):r}function h(e){var n=e-f;return void 0===f||n>=t||n<0||u&&e-c>=i}function v(){var e=L();if(h(e))return y(e);s=setTimeout(v,function(e){var n=t-(e-f);return u?_(n,i-(e-c)):n}(e))}function y(e){return s=void 0,d&&o?l(e):(o=a=void 0,r)}function C(){var e=L(),n=h(e);if(o=arguments,a=this,f=e,n){if(void 0===s)return m(f);if(u)return s=setTimeout(v,t),l(f)}return void 0===s&&(s=setTimeout(v,t)),r}return t=b(t)||0,M(n)&&(p=!!n.leading,i=(u="maxWait"in n)?g(b(n.maxWait)||0,t):i,d="trailing"in n?!!n.trailing:d),C.cancel=function(){void 0!==s&&clearTimeout(s),c=0,o=f=a=s=void 0},C.flush=function(){return void 0===s?r:y(L())},C},w={type:"amap",init:function(){this._isFirstRender=!0},render:function(e,n,o){var a=!0,i=e.getAMap(),r=o.getZr().painter.getViewportRoot(),s=i.getContainer(),f=e.coordinateSystem,c=e.get("renderOnMoving"),p=e.get("resizeEnable"),u=e.get("largeMode"),d=AMap.version>=2,l="3D"===i.getViewMode_(),m=function(){if(!a){var t=s.style,n=[-parseInt(t.left,10)||0,-parseInt(t.top,10)||0],i=r.style,c=n[0]+"px",p=n[1]+"px";i.left!==c&&(i.left=c),i.top!==p&&(i.top=p),f.setMapOffset(e.__mapOffset=n),o.dispatchAction({type:"amapRoam",animation:{duration:0}})}};if(i.off("mapmove",this._moveHandler),i.off("moveend",this._moveHandler),i.off("viewchange",this._moveHandler),i.off("camerachange",this._moveHandler),i.off("zoom",this._moveHandler),this._resizeHandler&&i.off("resize",this._resizeHandler),this._moveStartHandler&&i.off("movestart",this._moveStartHandler),this._moveEndHandler&&(i.off("moveend",this._moveEndHandler),i.off("zoomend",this._moveEndHandler)),i.on(c?d?"viewchange":l?"camerachange":"mapmove":"moveend",!d&&u?m=C(m,20):m),this._moveHandler=m,!c||d&&l||i.on("zoom",m),!c){i.on("movestart",this._moveStartHandler=function(t){setTimeout((function(){e.setEChartsLayerVisiblity(!1)}),0)});var h=this._moveEndHandler=function(t){(!t||"moveend"!==t.type)&&m(),setTimeout((function(){e.setEChartsLayerVisiblity(!0)}),d||!u?0:20)};if(i.on("moveend",h),i.on("zoomend",h),this._isFirstRender&&l){var v=i.setPitch,y=i.setRotation;i.setPitch=function(){v.apply(this,arguments),h()},i.setRotation=function(){y.apply(this,arguments),h()}}}if(p){var g=function(){t.getInstanceByDom(o.getDom()).resize()};!d&&u&&(g=C(g,20)),i.on("resize",this._resizeHandler=g)}this._isFirstRender=a=!1},dispose:function(e){var t=e.getComponent("amap");t&&(t.getAMap().destroy(),t.setAMap(null),t.setEChartsLayer(null),t.coordinateSystem&&(t.coordinateSystem.setAMap(null),t.coordinateSystem=null),delete this._moveHandler,delete this._resizeHandler,delete this._moveStartHandler,delete this._moveEndHandler)}},x=r?t.ComponentView.extend(w):w;function E(e){r?e.registerComponentModel(f):e.extendComponentModel(f),r?e.registerComponentView(x):e.extendComponentView(x),e.registerCoordinateSystem("amap",a),e.registerAction({type:"amapRoam",event:"amapRoam",update:"updateLayout"},(function(e,t){t.eachComponent("amap",(function(e){var t=e.getAMap(),n=t.getCenter();e.setCenterAndZoom([n.lng,n.lat],t.getZoom())}))}))}r?t.use(E):E(t),e.name="echarts-extension-amap",e.version="1.9.2",Object.defineProperty(e,"__esModule",{value:!0})})); +!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("echarts/lib/echarts")):"function"==typeof define&&define.amd?define(["exports","echarts"],t):t(((e="undefined"!=typeof globalThis?globalThis:e||self).echarts=e.echarts||{},e.echarts.amap={}),e.echarts)}(this,(function(e,t){"use strict";function n(e,n){return n=n||[0,0],t.util.map([0,1],(function(t){var o=n[t],a=e[t]/2,i=[],r=[];return i[t]=o-a,r[t]=o+a,i[1-t]=r[1-t]=n[1-t],Math.abs(this.dataToPoint(i)[t]-this.dataToPoint(r)[t])}),this)}var o=["echartsLayerZIndex","echartsLayerInteractive","renderOnMoving","largeMode","layers"];function a(e,t){this._amap=e,this._api=t,this._mapOffset=[0,0]}var i=a.prototype;i.setZoom=function(e){this._zoom=e},i.setCenter=function(e){var t=new AMap.LngLat(e[0],e[1]);this._center=this._amap.lngLatToContainer(t)},i.setMapOffset=function(e){this._mapOffset=e},i.setAMap=function(e){this._amap=e},i.getAMap=function(){return this._amap},i.dataToPoint=function(e){var t=new AMap.LngLat(e[0],e[1]),n=this._amap.lngLatToContainer(t),o=this._mapOffset;return[n.x-o[0],n.y-o[1]]},i.pointToData=function(e){var t=this._mapOffset,n=this._amap.containerToLngLat(new AMap.Pixel(e[0]+t[0],e[1]+t[1]));return[n.lng,n.lat]},i.getViewRect=function(){var e=this._api;return new t.graphic.BoundingRect(0,0,e.getWidth(),e.getHeight())},i.getRoamTransform=function(){return t.matrix.create()},i.prepareCustoms=function(){var e=this.getViewRect();return{coordSys:{type:"amap",x:e.x,y:e.y,width:e.width,height:e.height},api:{coord:t.util.bind(this.dataToPoint,this),size:t.util.bind(n,this)}}},a.create=function(e,n){var i;e.eachComponent("amap",(function(e){if("undefined"==typeof AMap)throw new Error("AMap api is not loaded");if(i)throw new Error("Only one amap component can exist");var r=e.getAMap(),s=e.get("echartsLayerInteractive");if(!r){var f=n.getDom(),c=n.getZr().painter,p=c.getViewportRoot();p.style.visibility="hidden";var u=f.querySelector(".ec-extension-amap");u&&(p.style.left="0px",p.style.top="0px",f.removeChild(u)),(u=document.createElement("div")).className="ec-extension-amap",u.style.cssText="position:absolute;top:0;left:0;bottom:0;right:0;",f.appendChild(u);var d=t.util.clone(e.get());"echartsLayerZIndex"in d&&console.warn("[ECharts][Extension][AMap] DEPRECATED: the option `echartsLayerZIndex` has been removed since v1.9.0, use `echartsLayerInteractive` instead."),t.util.each(o,(function(e){delete d[e]})),r=new AMap.Map(u,d),e.setAMap(r),r.on("complete",(function(){u.querySelector(".amap-maps").appendChild(p),p.style.visibility=""})),e.setEChartsLayer(p),c.getViewportRootOffset=function(){return{offsetLeft:0,offsetTop:0}}}e.__echartsLayerInteractive!==s&&(e.setEChartsLayerInteractive(s),e.__echartsLayerInteractive=s);var l=e.get("center"),m=e.get("zoom");if(l&&m){var h=r.getCenter(),v=r.getZoom();e.centerOrZoomChanged([h.lng,h.lat],v)&&r.setZoomAndCenter(m,new AMap.LngLat(l[0],l[1]))}var y=e.__mapStyle,g=e.get("mapStyle");if(y!==g&&(r.setMapStyle(g),e.__mapStyle=g),r.setLang){var _=e.__mapLang,L=e.get("lang");_!==L&&(r.setLang(L),e.__mapLang=L)}(i=new a(r,n)).setMapOffset(e.__mapOffset||[0,0]),i.setZoom(m),i.setCenter(l),e.coordinateSystem=i})),e.eachSeries((function(e){"amap"===e.get("coordinateSystem")&&(e.coordinateSystem=i)}))},i.dimensions=a.dimensions=["lng","lat"];var r=t.version.split(".")[0]>4;var s={type:"amap",setAMap:function(e){this.__amap=e},getAMap:function(){return this.__amap},setEChartsLayer:function(e){this.__echartsLayer=e},getEChartsLayer:function(){return this.__echartsLayer},setEChartsLayerVisiblity:function(e){this.__echartsLayer.style.display=e?"block":"none"},setEChartsLayerInteractive:function(e){this.option.echartsLayerInteractive=!!e,this.__echartsLayer.style.pointerEvents=e?"auto":"none"},setCenterAndZoom:function(e,t){this.option.center=e,this.option.zoom=t},centerOrZoomChanged:function(e,t){var n,o,a=this.option;return o=a.center,!((n=e)&&o&&n[0]===o[0]&&n[1]===o[1]&&t===a.zoom)},defaultOption:{center:[116.397428,39.90923],zoom:5,isHotspot:!1,resizeEnable:!0,echartsLayerInteractive:!0,renderOnMoving:!0,largeMode:!1}},f=r?t.ComponentModel.extend(s):s,c="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},p=/^\s+|\s+$/g,u=/^[-+]0x[0-9a-f]+$/i,d=/^0b[01]+$/i,l=/^0o[0-7]+$/i,m=parseInt,h="object"==typeof self&&self&&self.Object===Object&&self,v="object"==typeof c&&c&&c.Object===Object&&c||h||Function("return this")(),y=Object.prototype.toString,g=Math.max,_=Math.min,L=function(){return v.Date.now()};function M(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function b(e){if("number"==typeof e)return e;if(function(e){return"symbol"==typeof e||function(e){return!!e&&"object"==typeof e}(e)&&"[object Symbol]"==y.call(e)}(e))return NaN;if(M(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=M(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=e.replace(p,"");var n=d.test(e);return n||l.test(e)?m(e.slice(2),n?2:8):u.test(e)?NaN:+e}var C=function(e,t,n){var o,a,i,r,s,f,c=0,p=!1,u=!1,d=!0;if("function"!=typeof e)throw new TypeError("Expected a function");function l(t){var n=o,i=a;return o=a=void 0,c=t,r=e.apply(i,n)}function m(e){return c=e,s=setTimeout(v,t),p?l(e):r}function h(e){var n=e-f;return void 0===f||n>=t||n<0||u&&e-c>=i}function v(){var e=L();if(h(e))return y(e);s=setTimeout(v,function(e){var n=t-(e-f);return u?_(n,i-(e-c)):n}(e))}function y(e){return s=void 0,d&&o?l(e):(o=a=void 0,r)}function C(){var e=L(),n=h(e);if(o=arguments,a=this,f=e,n){if(void 0===s)return m(f);if(u)return s=setTimeout(v,t),l(f)}return void 0===s&&(s=setTimeout(v,t)),r}return t=b(t)||0,M(n)&&(p=!!n.leading,i=(u="maxWait"in n)?g(b(n.maxWait)||0,t):i,d="trailing"in n?!!n.trailing:d),C.cancel=function(){void 0!==s&&clearTimeout(s),c=0,o=f=a=s=void 0},C.flush=function(){return void 0===s?r:y(L())},C},w={type:"amap",init:function(){this._isFirstRender=!0},render:function(e,n,o){var a=!0,i=e.getAMap(),r=o.getZr().painter.getViewportRoot(),s=i.getContainer(),f=e.coordinateSystem,c=e.get("renderOnMoving"),p=e.get("resizeEnable"),u=e.get("largeMode"),d=AMap.version>=2,l="3D"===i.getViewMode_(),m=function(){if(!a){var t=s.style,n=[-parseInt(t.left,10)||0,-parseInt(t.top,10)||0],i=r.style,c=n[0]+"px",p=n[1]+"px";i.left!==c&&(i.left=c),i.top!==p&&(i.top=p),f.setMapOffset(e.__mapOffset=n),o.dispatchAction({type:"amapRoam",animation:{duration:0}})}};if(i.off("mapmove",this._moveHandler),i.off("moveend",this._moveHandler),i.off("viewchange",this._moveHandler),i.off("camerachange",this._moveHandler),i.off("zoom",this._moveHandler),this._resizeHandler&&i.off("resize",this._resizeHandler),this._moveStartHandler&&i.off("movestart",this._moveStartHandler),this._moveEndHandler&&(i.off("moveend",this._moveEndHandler),i.off("zoomend",this._moveEndHandler)),i.on(c?d?"viewchange":l?"camerachange":"mapmove":"moveend",!d&&u?m=C(m,20):m),this._moveHandler=m,!c||d&&l||i.on("zoom",m),!c){i.on("movestart",this._moveStartHandler=function(t){setTimeout((function(){e.setEChartsLayerVisiblity(!1)}),0)});var h=this._moveEndHandler=function(t){(!t||"moveend"!==t.type)&&m(),setTimeout((function(){e.setEChartsLayerVisiblity(!0)}),d||!u?0:20)};if(i.on("moveend",h),i.on("zoomend",h),this._isFirstRender&&l){var v=i.setPitch,y=i.setRotation;i.setPitch=function(){v.apply(this,arguments),h()},i.setRotation=function(){y.apply(this,arguments),h()}}}if(p){var g=function(){t.getInstanceByDom(o.getDom()).resize()};!d&&u&&(g=C(g,20)),i.on("resize",this._resizeHandler=g)}this._isFirstRender=a=!1},dispose:function(e){var t=e.getComponent("amap");t&&(t.getAMap().destroy(),t.setAMap(null),t.setEChartsLayer(null),t.coordinateSystem&&(t.coordinateSystem.setAMap(null),t.coordinateSystem=null),delete this._moveHandler,delete this._resizeHandler,delete this._moveStartHandler,delete this._moveEndHandler)}},x=r?t.ComponentView.extend(w):w;function E(e){r?e.registerComponentModel(f):e.extendComponentModel(f),r?e.registerComponentView(x):e.extendComponentView(x),e.registerCoordinateSystem("amap",a),e.registerAction({type:"amapRoam",event:"amapRoam",update:"updateLayout"},(function(e,t){t.eachComponent("amap",(function(e){var t=e.getAMap(),n=t.getCenter();e.setCenterAndZoom([n.lng,n.lat],t.getZoom())}))}))}r?t.use(E):E(t),e.name="echarts-extension-amap",e.version="1.9.3",Object.defineProperty(e,"__esModule",{value:!0})})); //# sourceMappingURL=echarts-extension-amap.min.js.map diff --git a/examples/heatmap.html b/examples/heatmap.html index 9abd2da..18194f8 100644 --- a/examples/heatmap.html +++ b/examples/heatmap.html @@ -31,7 +31,7 @@ - +