mirror of https://gitee.com/antv-l7/antv-l7
Merge branch 'grid-heatMap' into 'master'
update three 升级threejs到101版本 测试框架可以运行 See merge request !7
This commit is contained in:
commit
58814ce856
|
@ -7,3 +7,4 @@ node_modules/
|
|||
demos/assets/
|
||||
demos/index.html
|
||||
demos/*
|
||||
src/core/three.js
|
||||
|
|
|
@ -3,13 +3,14 @@ module.exports = {
|
|||
babelrc: {
|
||||
presets: [
|
||||
"@babel/preset-env"
|
||||
]
|
||||
],
|
||||
},
|
||||
extensions: ['.js'],
|
||||
include: [
|
||||
'src/**/*.js',
|
||||
'test/**/*.js',
|
||||
'node_modules/_three@0.96.0@three/**/*.js',
|
||||
'node_modules/_three@0.101.1@three/**/*.js',
|
||||
'node_modules/three/**/*.js',
|
||||
'node_modules/simple-statistics/src/*.js'
|
||||
],
|
||||
exclude: [
|
||||
|
|
|
@ -109,7 +109,7 @@
|
|||
"polyline-normals": "^2.0.2",
|
||||
"rbush": "^2.0.2",
|
||||
"simple-statistics": "^7.0.1",
|
||||
"three": "^0.96.0",
|
||||
"three": "^0.101.1",
|
||||
"venn.js": "^0.2.20",
|
||||
"viewport-mercator-project": "^5.2.0",
|
||||
"webworkify-webpack": "^2.1.3",
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -1,4 +1,3 @@
|
|||
import { polygonPath } from '../../shape/path';
|
||||
import { fill } from '../../shape/polygon';
|
||||
export default function hexagonBuffer(layerData) {
|
||||
const attribute = {
|
||||
|
|
|
@ -6,7 +6,7 @@ export default function NormalBuffer(layerData) {
|
|||
pickingIds: []
|
||||
};
|
||||
layerData.forEach(item => {
|
||||
const { color, size, id, coordinates} = item;
|
||||
const { color, size, id, coordinates } = item;
|
||||
attributes.vertices.push(...coordinates);
|
||||
attributes.colors.push(...color);
|
||||
attributes.pickingIds.push(id);
|
||||
|
|
|
@ -36,7 +36,6 @@ export default class HeatMapLayer extends Layer {
|
|||
};
|
||||
const Mesh = new DrawHexagon(this._buffer, config);
|
||||
this.add(Mesh);
|
||||
|
||||
}
|
||||
_drawGrid() {
|
||||
this.type = 'heatmap';
|
||||
|
|
|
@ -11,7 +11,6 @@ export default class LineLayer extends Layer {
|
|||
render() {
|
||||
this.type = 'polyline';
|
||||
this.init();
|
||||
const source = this.layerSource;
|
||||
const layerData = this.layerData;
|
||||
const style = this.get('styleOptions');
|
||||
const buffer = this._buffer = new LineBuffer({
|
||||
|
|
|
@ -37,7 +37,6 @@ export default class PointLayer extends Layer {
|
|||
this._textPoint();
|
||||
return;
|
||||
}
|
||||
const source = this.layerSource;
|
||||
const style = this.get('styleOptions');
|
||||
const pointShapeType = this._getShape();
|
||||
|
||||
|
@ -98,7 +97,6 @@ export default class PointLayer extends Layer {
|
|||
|
||||
}
|
||||
_textPoint() {
|
||||
const source = this.layerSource;
|
||||
const styleOptions = this.get('styleOptions');
|
||||
const buffer = new TextBuffer({
|
||||
type: this.shapeType,
|
||||
|
|
|
@ -5,12 +5,6 @@ import * as statistics from './statistics';
|
|||
|
||||
const R_EARTH = 6378000;
|
||||
|
||||
/**
|
||||
* 计算方格密度图
|
||||
* @param {*} data 经纬度数据 和属性数据
|
||||
* @param {*} size 半径大小 单位 km
|
||||
* @return
|
||||
*/
|
||||
export function aggregatorToGrid(data, option) {
|
||||
const dataArray = data.dataArray;
|
||||
const { size = 10 } = option;
|
||||
|
|
Loading…
Reference in New Issue