fix: merge conflict

This commit is contained in:
thinkinggis 2020-03-15 20:11:21 +08:00
commit e4fc523233
24 changed files with 166 additions and 56 deletions

View File

@ -3,6 +3,15 @@
All notable changes to this project will be documented in this file. All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
## [2.1.1](https://github.com/antvis/L7/compare/v2.0.36...v2.1.1) (2020-03-15)
### Bug Fixes
- ios 12 点击事件问题 & regl 版本锁定 ([ad52e8e](https://github.com/antvis/L7/commit/ad52e8e8fde4a7b4b3e16d86a6035bd7c07fb80c))
- mapbox 光照问题 ([20d2a6d](https://github.com/antvis/L7/commit/20d2a6d8b803ca3ad87cc1ef69a59d1e3d348cef))
- mapbox 光照问题 ([88aa585](https://github.com/antvis/L7/commit/88aa585c2a8339f6eb7518a92e5544733ba356e3))
- update demo style ([c1960b5](https://github.com/antvis/L7/commit/c1960b50ef3e3d3aed6eb0f1934515678c2dbde8))
## [2.0.34](https://github.com/antvis/L7/compare/v2.0.32...v2.0.34) (2020-03-02) ## [2.0.34](https://github.com/antvis/L7/compare/v2.0.32...v2.0.34) (2020-03-02)
### Bug Fixes ### Bug Fixes

View File

@ -14,7 +14,7 @@
"message": "chore: publish" "message": "chore: publish"
} }
}, },
"version": "2.1.0", "version": "2.1.1",
"npmClient": "yarn", "npmClient": "yarn",
"useWorkspaces": true, "useWorkspaces": true,
"publishConfig": { "publishConfig": {

View File

@ -3,6 +3,17 @@
All notable changes to this project will be documented in this file. All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
## [2.1.1](https://github.com/antvis/L7/compare/v2.0.36...v2.1.1) (2020-03-15)
### Bug Fixes
* mapbox 光照问题 ([20d2a6d](https://github.com/antvis/L7/commit/20d2a6d8b803ca3ad87cc1ef69a59d1e3d348cef))
## [2.0.34](https://github.com/antvis/L7/compare/v2.0.32...v2.0.34) (2020-03-02) ## [2.0.34](https://github.com/antvis/L7/compare/v2.0.32...v2.0.34) (2020-03-02)
**Note:** Version bump only for package @antv/l7-component **Note:** Version bump only for package @antv/l7-component

View File

@ -1,6 +1,6 @@
{ {
"name": "@antv/l7-component", "name": "@antv/l7-component",
"version": "2.1.0", "version": "2.1.1",
"description": "", "description": "",
"main": "lib/index.js", "main": "lib/index.js",
"module": "es/index.js", "module": "es/index.js",
@ -24,8 +24,8 @@
"author": "lzxue", "author": "lzxue",
"license": "ISC", "license": "ISC",
"dependencies": { "dependencies": {
"@antv/l7-core": "^2.1.0", "@antv/l7-core": "^2.1.1",
"@antv/l7-utils": "^2.0.36", "@antv/l7-utils": "^2.1.1",
"@babel/runtime": "^7.7.7", "@babel/runtime": "^7.7.7",
"eventemitter3": "^4.0.0", "eventemitter3": "^4.0.0",
"inversify": "^5.0.1", "inversify": "^5.0.1",

View File

@ -3,6 +3,18 @@
All notable changes to this project will be documented in this file. All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
## [2.1.1](https://github.com/antvis/L7/compare/v2.0.36...v2.1.1) (2020-03-15)
### Bug Fixes
* ios 12 点击事件问题 & regl 版本锁定 ([ad52e8e](https://github.com/antvis/L7/commit/ad52e8e8fde4a7b4b3e16d86a6035bd7c07fb80c))
* mapbox 光照问题 ([20d2a6d](https://github.com/antvis/L7/commit/20d2a6d8b803ca3ad87cc1ef69a59d1e3d348cef))
## [2.0.34](https://github.com/antvis/L7/compare/v2.0.32...v2.0.34) (2020-03-02) ## [2.0.34](https://github.com/antvis/L7/compare/v2.0.32...v2.0.34) (2020-03-02)
**Note:** Version bump only for package @antv/l7-core **Note:** Version bump only for package @antv/l7-core

View File

@ -1,6 +1,6 @@
{ {
"name": "@antv/l7-core", "name": "@antv/l7-core",
"version": "2.1.0", "version": "2.1.1",
"description": "", "description": "",
"main": "lib/index.js", "main": "lib/index.js",
"module": "es/index.js", "module": "es/index.js",
@ -23,7 +23,7 @@
"license": "ISC", "license": "ISC",
"dependencies": { "dependencies": {
"@antv/async-hook": "^2.1.0", "@antv/async-hook": "^2.1.0",
"@antv/l7-utils": "^2.0.36", "@antv/l7-utils": "^2.1.1",
"@babel/runtime": "^7.7.7", "@babel/runtime": "^7.7.7",
"@mapbox/tiny-sdf": "^1.1.1", "@mapbox/tiny-sdf": "^1.1.1",
"ajv": "^6.10.2", "ajv": "^6.10.2",

View File

@ -61,6 +61,7 @@ export default class InteractionService extends EventEmitter
// hammertime.on('panmove', this.onPanmove); // hammertime.on('panmove', this.onPanmove);
// hammertime.on('panend', this.onPanend); // hammertime.on('panend', this.onPanend);
// hammertime.on('pinch', this.onPinch); // hammertime.on('pinch', this.onPinch);
$containter.addEventListener('touchstart', this.onTouch);
$containter.addEventListener('mousemove', this.onHover); $containter.addEventListener('mousemove', this.onHover);
$containter.addEventListener('click', this.onHover); $containter.addEventListener('click', this.onHover);
$containter.addEventListener('mousedown', this.onHover); $containter.addEventListener('mousedown', this.onHover);
@ -85,6 +86,15 @@ export default class InteractionService extends EventEmitter
$containter.removeEventListener('contextmenu', this.onHover); $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) => { private onHover = ({ x, y, type }: MouseEvent) => {
const $containter = this.mapService.getMapContainer(); const $containter = this.mapService.getMapContainer();
@ -120,7 +130,9 @@ export default class InteractionService extends EventEmitter
} }
return; return;
} }
if (type === 'touch') {
type = 'click';
}
this.emit(InteractionEvent.Hover, { x, y, lngLat, type }); this.emit(InteractionEvent.Hover, { x, y, lngLat, type });
}; };
} }

View File

@ -3,6 +3,17 @@
All notable changes to this project will be documented in this file. All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
## [2.1.1](https://github.com/antvis/L7/compare/v2.0.36...v2.1.1) (2020-03-15)
### Bug Fixes
* ios 12 点击事件问题 & regl 版本锁定 ([ad52e8e](https://github.com/antvis/L7/commit/ad52e8e8fde4a7b4b3e16d86a6035bd7c07fb80c))
## [2.0.34](https://github.com/antvis/L7/compare/v2.0.32...v2.0.34) (2020-03-02) ## [2.0.34](https://github.com/antvis/L7/compare/v2.0.32...v2.0.34) (2020-03-02)
**Note:** Version bump only for package @antv/l7 **Note:** Version bump only for package @antv/l7

View File

@ -11,9 +11,10 @@
} }
#map { #map {
position: absolute; position: absolute;
top: 0; top: 0,
bottom: 0; left: 0,
width: 100%; right: 0,
bottom: 0,
} }
</style> </style>
<link <link
@ -93,16 +94,11 @@
zoom: 3, zoom: 3,
pitch: 0, pitch: 0,
}) })
}); })
document.body.addEventListener('touchstart', ()=>{
//alert('touchstart!');
});
document.body.addEventListener('click', ()=>{
// alert('Click!');
});
scene.on('loaded',()=>{ scene.on('loaded',()=>{
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 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({}) const layer = new L7.PolygonLayer({})
.source(data) .source(data)
@ -123,14 +119,8 @@
.style({ .style({
opacity: 1.0 opacity: 1.0
}); });
scene.addLayer(layer); scene.addLayer(layer);
layer.on('click',()=>{ });
console.log('click')
})
layer.on('dblclick',()=>{
console.log('dblclickww')
})
})
</script> </script>
</body> </body>
</html> </html>

View File

@ -1,6 +1,6 @@
{ {
"name": "@antv/l7", "name": "@antv/l7",
"version": "2.1.0", "version": "2.1.1",
"description": "A Large-scale WebGL-powered Geospatial Data Visualization", "description": "A Large-scale WebGL-powered Geospatial Data Visualization",
"main": "lib/index.js", "main": "lib/index.js",
"module": "es/index.js", "module": "es/index.js",
@ -24,11 +24,11 @@
"author": "antv", "author": "antv",
"license": "MIT", "license": "MIT",
"dependencies": { "dependencies": {
"@antv/l7-component": "^2.1.0", "@antv/l7-component": "^2.1.1",
"@antv/l7-core": "^2.1.0", "@antv/l7-core": "^2.1.1",
"@antv/l7-layers": "^2.1.0", "@antv/l7-layers": "^2.1.1",
"@antv/l7-maps": "^2.1.0", "@antv/l7-maps": "^2.1.1",
"@antv/l7-scene": "^2.1.0", "@antv/l7-scene": "^2.1.1",
"@babel/runtime": "^7.7.7" "@babel/runtime": "^7.7.7"
}, },
"gitHead": "a5d354b66873f700730248d015c5e539c54b34b7", "gitHead": "a5d354b66873f700730248d015c5e539c54b34b7",

View File

@ -3,6 +3,14 @@
All notable changes to this project will be documented in this file. All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
## [2.1.1](https://github.com/antvis/L7/compare/v2.0.36...v2.1.1) (2020-03-15)
**Note:** Version bump only for package @antv/l7-layers
## [2.0.34](https://github.com/antvis/L7/compare/v2.0.32...v2.0.34) (2020-03-02) ## [2.0.34](https://github.com/antvis/L7/compare/v2.0.32...v2.0.34) (2020-03-02)
**Note:** Version bump only for package @antv/l7-layers **Note:** Version bump only for package @antv/l7-layers

View File

@ -1,6 +1,6 @@
{ {
"name": "@antv/l7-layers", "name": "@antv/l7-layers",
"version": "2.1.0", "version": "2.1.1",
"description": "L7's collection of built-in layers", "description": "L7's collection of built-in layers",
"main": "lib/index.js", "main": "lib/index.js",
"module": "es/index.js", "module": "es/index.js",
@ -23,9 +23,9 @@
"license": "ISC", "license": "ISC",
"dependencies": { "dependencies": {
"@antv/async-hook": "^2.1.0", "@antv/async-hook": "^2.1.0",
"@antv/l7-core": "^2.1.0", "@antv/l7-core": "^2.1.1",
"@antv/l7-source": "^2.1.0", "@antv/l7-source": "^2.1.1",
"@antv/l7-utils": "^2.0.36", "@antv/l7-utils": "^2.1.1",
"@babel/runtime": "^7.7.7", "@babel/runtime": "^7.7.7",
"@mapbox/martini": "^0.1.0", "@mapbox/martini": "^0.1.0",
"@turf/meta": "^6.0.2", "@turf/meta": "^6.0.2",

View File

@ -3,6 +3,17 @@
All notable changes to this project will be documented in this file. All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
## [2.1.1](https://github.com/antvis/L7/compare/v2.0.36...v2.1.1) (2020-03-15)
### Bug Fixes
* mapbox 光照问题 ([20d2a6d](https://github.com/antvis/L7/commit/20d2a6d8b803ca3ad87cc1ef69a59d1e3d348cef))
## [2.0.34](https://github.com/antvis/L7/compare/v2.0.32...v2.0.34) (2020-03-02) ## [2.0.34](https://github.com/antvis/L7/compare/v2.0.32...v2.0.34) (2020-03-02)

View File

@ -1,6 +1,6 @@
{ {
"name": "@antv/l7-maps", "name": "@antv/l7-maps",
"version": "2.1.0", "version": "2.1.1",
"description": "", "description": "",
"main": "lib/index.js", "main": "lib/index.js",
"module": "es/index.js", "module": "es/index.js",
@ -23,8 +23,8 @@
"author": "xiaoiver", "author": "xiaoiver",
"license": "ISC", "license": "ISC",
"dependencies": { "dependencies": {
"@antv/l7-core": "^2.1.0", "@antv/l7-core": "^2.1.1",
"@antv/l7-utils": "^2.0.36", "@antv/l7-utils": "^2.1.1",
"@babel/runtime": "^7.7.7", "@babel/runtime": "^7.7.7",
"@types/amap-js-api": "^1.4.6", "@types/amap-js-api": "^1.4.6",
"gl-matrix": "^3.1.0", "gl-matrix": "^3.1.0",

View File

@ -3,6 +3,14 @@
All notable changes to this project will be documented in this file. All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
## [2.1.1](https://github.com/antvis/L7/compare/v2.0.36...v2.1.1) (2020-03-15)
**Note:** Version bump only for package @antv/l7-react
## [2.0.34](https://github.com/antvis/L7/compare/v2.0.32...v2.0.34) (2020-03-02) ## [2.0.34](https://github.com/antvis/L7/compare/v2.0.32...v2.0.34) (2020-03-02)

View File

@ -1,6 +1,6 @@
{ {
"name": "@antv/l7-react", "name": "@antv/l7-react",
"version": "2.1.0", "version": "2.1.1",
"description": "", "description": "",
"main": "lib/index.js", "main": "lib/index.js",
"module": "es/index.js", "module": "es/index.js",
@ -24,8 +24,8 @@
"author": "lzxue", "author": "lzxue",
"license": "ISC", "license": "ISC",
"dependencies": { "dependencies": {
"@antv/l7": "^2.1.0", "@antv/l7": "^2.1.1",
"@antv/l7-maps": "^2.1.0", "@antv/l7-maps": "^2.1.1",
"@babel/runtime": "^7.7.7", "@babel/runtime": "^7.7.7",
"load-styles": "^2.0.0" "load-styles": "^2.0.0"
}, },

View File

@ -3,6 +3,17 @@
All notable changes to this project will be documented in this file. All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
## [2.1.1](https://github.com/antvis/L7/compare/v2.0.36...v2.1.1) (2020-03-15)
### Bug Fixes
* ios 12 点击事件问题 & regl 版本锁定 ([ad52e8e](https://github.com/antvis/L7/commit/ad52e8e8fde4a7b4b3e16d86a6035bd7c07fb80c))
## [2.0.34](https://github.com/antvis/L7/compare/v2.0.32...v2.0.34) (2020-03-02) ## [2.0.34](https://github.com/antvis/L7/compare/v2.0.32...v2.0.34) (2020-03-02)
**Note:** Version bump only for package @antv/l7-renderer **Note:** Version bump only for package @antv/l7-renderer

View File

@ -1,6 +1,6 @@
{ {
"name": "@antv/l7-renderer", "name": "@antv/l7-renderer",
"version": "2.1.0", "version": "2.1.1",
"description": "", "description": "",
"main": "lib/index.js", "main": "lib/index.js",
"module": "es/index.js", "module": "es/index.js",
@ -25,12 +25,12 @@
"gl": "^4.4.0" "gl": "^4.4.0"
}, },
"dependencies": { "dependencies": {
"@antv/l7-core": "^2.1.0", "@antv/l7-core": "^2.1.1",
"@babel/runtime": "^7.7.7", "@babel/runtime": "^7.7.7",
"inversify": "^5.0.1", "inversify": "^5.0.1",
"lodash": "^4.17.15", "lodash": "^4.17.15",
"reflect-metadata": "^0.1.13", "reflect-metadata": "^0.1.13",
"regl": "^1.3.11" "regl": "1.3.11"
}, },
"gitHead": "a5d354b66873f700730248d015c5e539c54b34b7", "gitHead": "a5d354b66873f700730248d015c5e539c54b34b7",
"publishConfig": { "publishConfig": {

View File

@ -3,6 +3,17 @@
All notable changes to this project will be documented in this file. All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
## [2.1.1](https://github.com/antvis/L7/compare/v2.0.36...v2.1.1) (2020-03-15)
### Bug Fixes
* mapbox 光照问题 ([20d2a6d](https://github.com/antvis/L7/commit/20d2a6d8b803ca3ad87cc1ef69a59d1e3d348cef))
## [2.0.34](https://github.com/antvis/L7/compare/v2.0.32...v2.0.34) (2020-03-02) ## [2.0.34](https://github.com/antvis/L7/compare/v2.0.32...v2.0.34) (2020-03-02)
**Note:** Version bump only for package @antv/l7-scene **Note:** Version bump only for package @antv/l7-scene

View File

@ -1,6 +1,6 @@
{ {
"name": "@antv/l7-scene", "name": "@antv/l7-scene",
"version": "2.1.0", "version": "2.1.1",
"description": "", "description": "",
"main": "lib/index.js", "main": "lib/index.js",
"module": "es/index.js", "module": "es/index.js",
@ -22,11 +22,11 @@
"author": "xiaoiver", "author": "xiaoiver",
"license": "ISC", "license": "ISC",
"dependencies": { "dependencies": {
"@antv/l7-component": "^2.1.0", "@antv/l7-component": "^2.1.1",
"@antv/l7-core": "^2.1.0", "@antv/l7-core": "^2.1.1",
"@antv/l7-maps": "^2.1.0", "@antv/l7-maps": "^2.1.1",
"@antv/l7-renderer": "^2.1.0", "@antv/l7-renderer": "^2.1.1",
"@antv/l7-utils": "^2.0.36", "@antv/l7-utils": "^2.1.1",
"@babel/runtime": "^7.7.7", "@babel/runtime": "^7.7.7",
"inversify": "^5.0.1", "inversify": "^5.0.1",
"mapbox-gl": "^1.2.1", "mapbox-gl": "^1.2.1",

View File

@ -3,6 +3,14 @@
All notable changes to this project will be documented in this file. All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
## [2.1.1](https://github.com/antvis/L7/compare/v2.0.36...v2.1.1) (2020-03-15)
**Note:** Version bump only for package @antv/l7-source
## [2.0.34](https://github.com/antvis/L7/compare/v2.0.32...v2.0.34) (2020-03-02) ## [2.0.34](https://github.com/antvis/L7/compare/v2.0.32...v2.0.34) (2020-03-02)
**Note:** Version bump only for package @antv/l7-source **Note:** Version bump only for package @antv/l7-source

View File

@ -1,6 +1,6 @@
{ {
"name": "@antv/l7-source", "name": "@antv/l7-source",
"version": "2.1.0", "version": "2.1.1",
"description": "", "description": "",
"main": "lib/index.js", "main": "lib/index.js",
"module": "es/index.js", "module": "es/index.js",
@ -25,8 +25,8 @@
"license": "ISC", "license": "ISC",
"dependencies": { "dependencies": {
"@antv/async-hook": "^2.1.0", "@antv/async-hook": "^2.1.0",
"@antv/l7-core": "^2.1.0", "@antv/l7-core": "^2.1.1",
"@antv/l7-utils": "^2.0.36", "@antv/l7-utils": "^2.1.1",
"@babel/runtime": "^7.7.7", "@babel/runtime": "^7.7.7",
"@mapbox/geojson-rewind": "^0.4.0", "@mapbox/geojson-rewind": "^0.4.0",
"@turf/helpers": "^6.1.4", "@turf/helpers": "^6.1.4",

View File

@ -3,6 +3,14 @@
All notable changes to this project will be documented in this file. All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
## [2.1.1](https://github.com/antvis/L7/compare/v2.0.36...v2.1.1) (2020-03-15)
**Note:** Version bump only for package @antv/l7-utils
## [2.0.34](https://github.com/antvis/L7/compare/v2.0.32...v2.0.34) (2020-03-02) ## [2.0.34](https://github.com/antvis/L7/compare/v2.0.32...v2.0.34) (2020-03-02)
**Note:** Version bump only for package @antv/l7-utils **Note:** Version bump only for package @antv/l7-utils

View File

@ -1,6 +1,6 @@
{ {
"name": "@antv/l7-utils", "name": "@antv/l7-utils",
"version": "2.0.36", "version": "2.1.1",
"description": "", "description": "",
"main": "lib/index.js", "main": "lib/index.js",
"module": "es/index.js", "module": "es/index.js",