diff --git a/examples/react/covid/demo/covid_bubble.tsx b/examples/react/covid/demo/covid_bubble.tsx index f816b68c8a..5fbffd80dd 100644 --- a/examples/react/covid/demo/covid_bubble.tsx +++ b/examples/react/covid/demo/covid_bubble.tsx @@ -264,7 +264,7 @@ const World = React.memo(function Map() { }} style={{ opacity: 1, - strokeOpacity: 0, + strokeOpacity: 1, strokeWidth: 0, }} > diff --git a/lerna.json b/lerna.json index b0ae635879..2a7cc4724f 100644 --- a/lerna.json +++ b/lerna.json @@ -14,7 +14,7 @@ "message": "chore: publish" } }, - "version": "2.0.36", + "version": "2.1.0", "npmClient": "yarn", "useWorkspaces": true, "publishConfig": { diff --git a/packages/component/package.json b/packages/component/package.json index 29f29dbab5..0191784823 100644 --- a/packages/component/package.json +++ b/packages/component/package.json @@ -1,6 +1,6 @@ { "name": "@antv/l7-component", - "version": "2.0.36", + "version": "2.1.0", "description": "", "main": "lib/index.js", "module": "es/index.js", @@ -24,7 +24,7 @@ "author": "lzxue", "license": "ISC", "dependencies": { - "@antv/l7-core": "^2.0.36", + "@antv/l7-core": "^2.1.0", "@antv/l7-utils": "^2.0.36", "@babel/runtime": "^7.7.7", "eventemitter3": "^4.0.0", diff --git a/packages/core/package.json b/packages/core/package.json index 75e007a3dd..8da51d22fb 100644 --- a/packages/core/package.json +++ b/packages/core/package.json @@ -1,6 +1,6 @@ { "name": "@antv/l7-core", - "version": "2.0.36", + "version": "2.1.0", "description": "", "main": "lib/index.js", "module": "es/index.js", diff --git a/packages/core/src/services/interaction/InteractionService.ts b/packages/core/src/services/interaction/InteractionService.ts index 83daafc089..a602b450a6 100644 --- a/packages/core/src/services/interaction/InteractionService.ts +++ b/packages/core/src/services/interaction/InteractionService.ts @@ -61,6 +61,7 @@ export default class InteractionService extends EventEmitter // hammertime.on('panmove', this.onPanmove); // hammertime.on('panend', this.onPanend); // hammertime.on('pinch', this.onPinch); + $containter.addEventListener('touchstart', this.onTouch); $containter.addEventListener('mousemove', this.onHover); $containter.addEventListener('click', this.onHover); $containter.addEventListener('mousedown', this.onHover); @@ -85,6 +86,15 @@ export default class InteractionService extends EventEmitter $containter.removeEventListener('contextmenu', this.onHover); } } + private onTouch = (target: TouchEvent) => { + const touch = target.touches[0]; + // @ts-ignore + this.onHover({ + x: touch.pageX, + y: touch.pageY, + type: 'touch', + }); + }; private onHover = ({ x, y, type }: MouseEvent) => { const $containter = this.mapService.getMapContainer(); @@ -120,7 +130,9 @@ export default class InteractionService extends EventEmitter } return; } - + if (type === 'touch') { + type = 'click'; + } this.emit(InteractionEvent.Hover, { x, y, lngLat, type }); }; } diff --git a/packages/l7/demo/polygon.html b/packages/l7/demo/polygon.html index 12a8a2a2d5..05b669618e 100644 --- a/packages/l7/demo/polygon.html +++ b/packages/l7/demo/polygon.html @@ -11,9 +11,10 @@ } #map { position: absolute; - top: 0; - bottom: 0; - width: 100%; + top: 0, + left: 0, + right: 0, + bottom: 0, } { + alert('加载完成'); + + const color = [ 'rgb(255,255,217)', 'rgb(237,248,177)', 'rgb(199,233,180)', 'rgb(127,205,187)', 'rgb(65,182,196)', 'rgb(29,145,192)', 'rgb(34,94,168)', 'rgb(12,44,132)' ]; const layer = new L7.PolygonLayer({}) .source(data) @@ -115,6 +120,7 @@ opacity: 1.0 }); scene.addLayer(layer); + }); diff --git a/packages/l7/package.json b/packages/l7/package.json index f3b914c262..4e6039cbd2 100644 --- a/packages/l7/package.json +++ b/packages/l7/package.json @@ -1,6 +1,6 @@ { "name": "@antv/l7", - "version": "2.0.36", + "version": "2.1.0", "description": "A Large-scale WebGL-powered Geospatial Data Visualization", "main": "lib/index.js", "module": "es/index.js", @@ -24,11 +24,11 @@ "author": "antv", "license": "MIT", "dependencies": { - "@antv/l7-component": "^2.0.36", - "@antv/l7-core": "^2.0.36", - "@antv/l7-layers": "^2.0.36", - "@antv/l7-maps": "^2.0.36", - "@antv/l7-scene": "^2.0.36", + "@antv/l7-component": "^2.1.0", + "@antv/l7-core": "^2.1.0", + "@antv/l7-layers": "^2.1.0", + "@antv/l7-maps": "^2.1.0", + "@antv/l7-scene": "^2.1.0", "@babel/runtime": "^7.7.7" }, "gitHead": "a5d354b66873f700730248d015c5e539c54b34b7", diff --git a/packages/layers/package.json b/packages/layers/package.json index 8a36c0ec1b..0c94c5478d 100644 --- a/packages/layers/package.json +++ b/packages/layers/package.json @@ -1,6 +1,6 @@ { "name": "@antv/l7-layers", - "version": "2.0.36", + "version": "2.1.0", "description": "L7's collection of built-in layers", "main": "lib/index.js", "module": "es/index.js", @@ -23,8 +23,8 @@ "license": "ISC", "dependencies": { "@antv/async-hook": "^2.1.0", - "@antv/l7-core": "^2.0.36", - "@antv/l7-source": "^2.0.36", + "@antv/l7-core": "^2.1.0", + "@antv/l7-source": "^2.1.0", "@antv/l7-utils": "^2.0.36", "@babel/runtime": "^7.7.7", "@mapbox/martini": "^0.1.0", diff --git a/packages/maps/package.json b/packages/maps/package.json index 2e308acfcb..d150d87f44 100644 --- a/packages/maps/package.json +++ b/packages/maps/package.json @@ -1,6 +1,6 @@ { "name": "@antv/l7-maps", - "version": "2.0.36", + "version": "2.1.0", "description": "", "main": "lib/index.js", "module": "es/index.js", @@ -23,7 +23,7 @@ "author": "xiaoiver", "license": "ISC", "dependencies": { - "@antv/l7-core": "^2.0.36", + "@antv/l7-core": "^2.1.0", "@antv/l7-utils": "^2.0.36", "@babel/runtime": "^7.7.7", "@types/amap-js-api": "^1.4.6", diff --git a/packages/react/package.json b/packages/react/package.json index b25e108289..c34bc121d1 100644 --- a/packages/react/package.json +++ b/packages/react/package.json @@ -1,6 +1,6 @@ { "name": "@antv/l7-react", - "version": "2.0.36", + "version": "2.1.0", "description": "", "main": "lib/index.js", "module": "es/index.js", @@ -24,8 +24,8 @@ "author": "lzxue", "license": "ISC", "dependencies": { - "@antv/l7": "^2.0.36", - "@antv/l7-maps": "^2.0.36", + "@antv/l7": "^2.1.0", + "@antv/l7-maps": "^2.1.0", "@babel/runtime": "^7.7.7", "load-styles": "^2.0.0" }, diff --git a/packages/renderer/package.json b/packages/renderer/package.json index 34030f8637..eaf15005e8 100644 --- a/packages/renderer/package.json +++ b/packages/renderer/package.json @@ -1,6 +1,6 @@ { "name": "@antv/l7-renderer", - "version": "2.0.36", + "version": "2.1.0", "description": "", "main": "lib/index.js", "module": "es/index.js", @@ -25,12 +25,12 @@ "gl": "^4.4.0" }, "dependencies": { - "@antv/l7-core": "^2.0.36", + "@antv/l7-core": "^2.1.0", "@babel/runtime": "^7.7.7", "inversify": "^5.0.1", "lodash": "^4.17.15", "reflect-metadata": "^0.1.13", - "regl": "^1.3.11" + "regl": "1.3.11" }, "gitHead": "a5d354b66873f700730248d015c5e539c54b34b7", "publishConfig": { diff --git a/packages/scene/package.json b/packages/scene/package.json index a45dc8d169..830d6cfd74 100644 --- a/packages/scene/package.json +++ b/packages/scene/package.json @@ -1,6 +1,6 @@ { "name": "@antv/l7-scene", - "version": "2.0.36", + "version": "2.1.0", "description": "", "main": "lib/index.js", "module": "es/index.js", @@ -22,10 +22,10 @@ "author": "xiaoiver", "license": "ISC", "dependencies": { - "@antv/l7-component": "^2.0.36", - "@antv/l7-core": "^2.0.36", - "@antv/l7-maps": "^2.0.36", - "@antv/l7-renderer": "^2.0.36", + "@antv/l7-component": "^2.1.0", + "@antv/l7-core": "^2.1.0", + "@antv/l7-maps": "^2.1.0", + "@antv/l7-renderer": "^2.1.0", "@antv/l7-utils": "^2.0.36", "@babel/runtime": "^7.7.7", "inversify": "^5.0.1", diff --git a/packages/source/package.json b/packages/source/package.json index fa73cd9298..1eb95bbf8d 100644 --- a/packages/source/package.json +++ b/packages/source/package.json @@ -1,6 +1,6 @@ { "name": "@antv/l7-source", - "version": "2.0.36", + "version": "2.1.0", "description": "", "main": "lib/index.js", "module": "es/index.js", @@ -25,7 +25,7 @@ "license": "ISC", "dependencies": { "@antv/async-hook": "^2.1.0", - "@antv/l7-core": "^2.0.36", + "@antv/l7-core": "^2.1.0", "@antv/l7-utils": "^2.0.36", "@babel/runtime": "^7.7.7", "@mapbox/geojson-rewind": "^0.4.0", diff --git a/site/pages/index.zh.tsx b/site/pages/index.zh.tsx index c98ec604d9..c20f77931c 100644 --- a/site/pages/index.zh.tsx +++ b/site/pages/index.zh.tsx @@ -90,9 +90,9 @@ const IndexPage = () => { const notifications = [ { type: t('推荐'), - title: t('如何用L7制作省市下钻疫情地图'), - date: '2020.01.31', - link: 'https://www.yuque.com/xiaofengcanyue/scpehq/zf094u', + title: t('如何制作不一样的疫情世界地图-酷炫、动感的地理可视化'), + date: '2020.03.12', + link: 'https://www.yuque.com/antv/blog/wigku2', }, { type: t('新版发布'),