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/assets/
|
||||||
demos/index.html
|
demos/index.html
|
||||||
demos/*
|
demos/*
|
||||||
|
src/core/three.js
|
||||||
|
|
|
@ -3,13 +3,14 @@ module.exports = {
|
||||||
babelrc: {
|
babelrc: {
|
||||||
presets: [
|
presets: [
|
||||||
"@babel/preset-env"
|
"@babel/preset-env"
|
||||||
]
|
],
|
||||||
},
|
},
|
||||||
extensions: ['.js'],
|
extensions: ['.js'],
|
||||||
include: [
|
include: [
|
||||||
'src/**/*.js',
|
'src/**/*.js',
|
||||||
'test/**/*.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'
|
'node_modules/simple-statistics/src/*.js'
|
||||||
],
|
],
|
||||||
exclude: [
|
exclude: [
|
||||||
|
|
|
@ -109,7 +109,7 @@
|
||||||
"polyline-normals": "^2.0.2",
|
"polyline-normals": "^2.0.2",
|
||||||
"rbush": "^2.0.2",
|
"rbush": "^2.0.2",
|
||||||
"simple-statistics": "^7.0.1",
|
"simple-statistics": "^7.0.1",
|
||||||
"three": "^0.96.0",
|
"three": "^0.101.1",
|
||||||
"venn.js": "^0.2.20",
|
"venn.js": "^0.2.20",
|
||||||
"viewport-mercator-project": "^5.2.0",
|
"viewport-mercator-project": "^5.2.0",
|
||||||
"webworkify-webpack": "^2.1.3",
|
"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';
|
import { fill } from '../../shape/polygon';
|
||||||
export default function hexagonBuffer(layerData) {
|
export default function hexagonBuffer(layerData) {
|
||||||
const attribute = {
|
const attribute = {
|
||||||
|
|
|
@ -6,7 +6,7 @@ export default function NormalBuffer(layerData) {
|
||||||
pickingIds: []
|
pickingIds: []
|
||||||
};
|
};
|
||||||
layerData.forEach(item => {
|
layerData.forEach(item => {
|
||||||
const { color, size, id, coordinates} = item;
|
const { color, size, id, coordinates } = item;
|
||||||
attributes.vertices.push(...coordinates);
|
attributes.vertices.push(...coordinates);
|
||||||
attributes.colors.push(...color);
|
attributes.colors.push(...color);
|
||||||
attributes.pickingIds.push(id);
|
attributes.pickingIds.push(id);
|
||||||
|
|
|
@ -36,7 +36,6 @@ export default class HeatMapLayer extends Layer {
|
||||||
};
|
};
|
||||||
const Mesh = new DrawHexagon(this._buffer, config);
|
const Mesh = new DrawHexagon(this._buffer, config);
|
||||||
this.add(Mesh);
|
this.add(Mesh);
|
||||||
|
|
||||||
}
|
}
|
||||||
_drawGrid() {
|
_drawGrid() {
|
||||||
this.type = 'heatmap';
|
this.type = 'heatmap';
|
||||||
|
|
|
@ -11,7 +11,6 @@ export default class LineLayer extends Layer {
|
||||||
render() {
|
render() {
|
||||||
this.type = 'polyline';
|
this.type = 'polyline';
|
||||||
this.init();
|
this.init();
|
||||||
const source = this.layerSource;
|
|
||||||
const layerData = this.layerData;
|
const layerData = this.layerData;
|
||||||
const style = this.get('styleOptions');
|
const style = this.get('styleOptions');
|
||||||
const buffer = this._buffer = new LineBuffer({
|
const buffer = this._buffer = new LineBuffer({
|
||||||
|
|
|
@ -37,7 +37,6 @@ export default class PointLayer extends Layer {
|
||||||
this._textPoint();
|
this._textPoint();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
const source = this.layerSource;
|
|
||||||
const style = this.get('styleOptions');
|
const style = this.get('styleOptions');
|
||||||
const pointShapeType = this._getShape();
|
const pointShapeType = this._getShape();
|
||||||
|
|
||||||
|
@ -98,7 +97,6 @@ export default class PointLayer extends Layer {
|
||||||
|
|
||||||
}
|
}
|
||||||
_textPoint() {
|
_textPoint() {
|
||||||
const source = this.layerSource;
|
|
||||||
const styleOptions = this.get('styleOptions');
|
const styleOptions = this.get('styleOptions');
|
||||||
const buffer = new TextBuffer({
|
const buffer = new TextBuffer({
|
||||||
type: this.shapeType,
|
type: this.shapeType,
|
||||||
|
|
|
@ -5,12 +5,6 @@ import * as statistics from './statistics';
|
||||||
|
|
||||||
const R_EARTH = 6378000;
|
const R_EARTH = 6378000;
|
||||||
|
|
||||||
/**
|
|
||||||
* 计算方格密度图
|
|
||||||
* @param {*} data 经纬度数据 和属性数据
|
|
||||||
* @param {*} size 半径大小 单位 km
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
export function aggregatorToGrid(data, option) {
|
export function aggregatorToGrid(data, option) {
|
||||||
const dataArray = data.dataArray;
|
const dataArray = data.dataArray;
|
||||||
const { size = 10 } = option;
|
const { size = 10 } = option;
|
||||||
|
|
Loading…
Reference in New Issue