mirror of https://gitee.com/antv-l7/antv-l7
Merge branch 'master' into draw_doc
This commit is contained in:
commit
f276329248
|
@ -14,7 +14,7 @@
|
||||||
"message": "chore: publish"
|
"message": "chore: publish"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"version": "2.1.14",
|
"version": "2.1.15",
|
||||||
"npmClient": "yarn",
|
"npmClient": "yarn",
|
||||||
"useWorkspaces": true,
|
"useWorkspaces": true,
|
||||||
"publishConfig": {
|
"publishConfig": {
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "@antv/l7-component",
|
"name": "@antv/l7-component",
|
||||||
"version": "2.1.14",
|
"version": "2.1.15",
|
||||||
"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.14",
|
"@antv/l7-core": "^2.1.15",
|
||||||
"@antv/l7-utils": "2.1.14",
|
"@antv/l7-utils": "^2.1.15",
|
||||||
"@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",
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "@antv/l7-core",
|
"name": "@antv/l7-core",
|
||||||
"version": "2.1.14",
|
"version": "2.1.15",
|
||||||
"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.1.14",
|
"@antv/l7-utils": "^2.1.15",
|
||||||
"@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",
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "@antv/l7-draw",
|
"name": "@antv/l7-draw",
|
||||||
"version": "2.1.14",
|
"version": "2.1.15",
|
||||||
"description": "L7 Draw moudules",
|
"description": "L7 Draw moudules",
|
||||||
"keywords": [],
|
"keywords": [],
|
||||||
"author": "thinkinggis <lzx199065@gmail.com>",
|
"author": "thinkinggis <lzx199065@gmail.com>",
|
||||||
|
@ -35,8 +35,8 @@
|
||||||
"test": "jest"
|
"test": "jest"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@antv/l7": "2.1.14",
|
"@antv/l7": "^2.1.15",
|
||||||
"@antv/l7-component": "2.1.14",
|
"@antv/l7-component": "^2.1.15",
|
||||||
"@babel/runtime": "^7.7.7",
|
"@babel/runtime": "^7.7.7",
|
||||||
"@turf/circle": "^6.0.1",
|
"@turf/circle": "^6.0.1",
|
||||||
"@turf/distance": "^6.0.1",
|
"@turf/distance": "^6.0.1",
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "@antv/l7",
|
"name": "@antv/l7",
|
||||||
"version": "2.1.14",
|
"version": "2.1.15",
|
||||||
"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,12 +24,12 @@
|
||||||
"author": "antv",
|
"author": "antv",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@antv/l7-component": "2.1.14",
|
"@antv/l7-component": "^2.1.15",
|
||||||
"@antv/l7-core": "2.1.14",
|
"@antv/l7-core": "^2.1.15",
|
||||||
"@antv/l7-layers": "2.1.14",
|
"@antv/l7-layers": "^2.1.15",
|
||||||
"@antv/l7-maps": "2.1.14",
|
"@antv/l7-maps": "^2.1.15",
|
||||||
"@antv/l7-scene": "2.1.14",
|
"@antv/l7-scene": "^2.1.15",
|
||||||
"@antv/l7-utils": "2.1.14",
|
"@antv/l7-utils": "^2.1.15",
|
||||||
"@babel/runtime": "^7.7.7"
|
"@babel/runtime": "^7.7.7"
|
||||||
},
|
},
|
||||||
"gitHead": "a5d354b66873f700730248d015c5e539c54b34b7",
|
"gitHead": "a5d354b66873f700730248d015c5e539c54b34b7",
|
||||||
|
|
|
@ -1,2 +1,2 @@
|
||||||
const version = '2.1.14';
|
const version = '2.1.15';
|
||||||
export { version };
|
export { version };
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "@antv/l7-layers",
|
"name": "@antv/l7-layers",
|
||||||
"version": "2.1.14",
|
"version": "2.1.15",
|
||||||
"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.14",
|
"@antv/l7-core": "^2.1.15",
|
||||||
"@antv/l7-source": "2.1.14",
|
"@antv/l7-source": "^2.1.15",
|
||||||
"@antv/l7-utils": "2.1.14",
|
"@antv/l7-utils": "^2.1.15",
|
||||||
"@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",
|
||||||
|
|
|
@ -51,7 +51,6 @@ export default class DataMappingPlugin implements ILayerPlugin {
|
||||||
filterData = dataArray.filter((record: IParseDataItem) => {
|
filterData = dataArray.filter((record: IParseDataItem) => {
|
||||||
return this.applyAttributeMapping(filter, record)[0];
|
return this.applyAttributeMapping(filter, record)[0];
|
||||||
});
|
});
|
||||||
filter.needRemapping = false;
|
|
||||||
}
|
}
|
||||||
if (attributesToRemapping.length) {
|
if (attributesToRemapping.length) {
|
||||||
// 过滤数据
|
// 过滤数据
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "@antv/l7-maps",
|
"name": "@antv/l7-maps",
|
||||||
"version": "2.1.14",
|
"version": "2.1.15",
|
||||||
"description": "",
|
"description": "",
|
||||||
"main": "lib/index.js",
|
"main": "lib/index.js",
|
||||||
"module": "es/index.js",
|
"module": "es/index.js",
|
||||||
|
@ -25,8 +25,8 @@
|
||||||
"author": "xiaoiver",
|
"author": "xiaoiver",
|
||||||
"license": "ISC",
|
"license": "ISC",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@antv/l7-core": "2.1.14",
|
"@antv/l7-core": "^2.1.15",
|
||||||
"@antv/l7-utils": "2.1.14",
|
"@antv/l7-utils": "^2.1.15",
|
||||||
"@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",
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "@antv/l7-react",
|
"name": "@antv/l7-react",
|
||||||
"version": "2.1.14",
|
"version": "2.1.15",
|
||||||
"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.14",
|
"@antv/l7": "^2.1.15",
|
||||||
"@antv/l7-maps": "2.1.14",
|
"@antv/l7-maps": "^2.1.15",
|
||||||
"@babel/runtime": "^7.7.7",
|
"@babel/runtime": "^7.7.7",
|
||||||
"load-styles": "^2.0.0"
|
"load-styles": "^2.0.0"
|
||||||
},
|
},
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "@antv/l7-renderer",
|
"name": "@antv/l7-renderer",
|
||||||
"version": "2.1.14",
|
"version": "2.1.15",
|
||||||
"description": "",
|
"description": "",
|
||||||
"main": "lib/index.js",
|
"main": "lib/index.js",
|
||||||
"module": "es/index.js",
|
"module": "es/index.js",
|
||||||
|
@ -25,7 +25,7 @@
|
||||||
"gl": "^4.4.0"
|
"gl": "^4.4.0"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@antv/l7-core": "2.1.14",
|
"@antv/l7-core": "^2.1.15",
|
||||||
"@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",
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "@antv/l7-scene",
|
"name": "@antv/l7-scene",
|
||||||
"version": "2.1.14",
|
"version": "2.1.15",
|
||||||
"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.14",
|
"@antv/l7-component": "^2.1.15",
|
||||||
"@antv/l7-core": "2.1.14",
|
"@antv/l7-core": "^2.1.15",
|
||||||
"@antv/l7-maps": "2.1.14",
|
"@antv/l7-maps": "^2.1.15",
|
||||||
"@antv/l7-renderer": "2.1.14",
|
"@antv/l7-renderer": "^2.1.15",
|
||||||
"@antv/l7-utils": "2.1.14",
|
"@antv/l7-utils": "^2.1.15",
|
||||||
"@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",
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "@antv/l7-source",
|
"name": "@antv/l7-source",
|
||||||
"version": "2.1.14",
|
"version": "2.1.15",
|
||||||
"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.14",
|
"@antv/l7-core": "^2.1.15",
|
||||||
"@antv/l7-utils": "2.1.14",
|
"@antv/l7-utils": "^2.1.15",
|
||||||
"@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",
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "@antv/l7-utils",
|
"name": "@antv/l7-utils",
|
||||||
"version": "2.1.14",
|
"version": "2.1.15",
|
||||||
"description": "",
|
"description": "",
|
||||||
"main": "lib/index.js",
|
"main": "lib/index.js",
|
||||||
"module": "es/index.js",
|
"module": "es/index.js",
|
||||||
|
|
|
@ -2,7 +2,7 @@ import { RasterLayer, Scene } from '@antv/l7';
|
||||||
import { Mapbox } from '@antv/l7-maps';
|
import { Mapbox } from '@antv/l7-maps';
|
||||||
import * as dat from 'dat.gui';
|
import * as dat from 'dat.gui';
|
||||||
// @ts-ignore
|
// @ts-ignore
|
||||||
import * as GeoTIFF from 'geotiff/dist/geotiff.bundle.js';
|
import * as GeoTIFF from 'geotiff';
|
||||||
import * as React from 'react';
|
import * as React from 'react';
|
||||||
import { colorScales } from '../lib/colorscales';
|
import { colorScales } from '../lib/colorscales';
|
||||||
export default class ImageLayerDemo extends React.Component {
|
export default class ImageLayerDemo extends React.Component {
|
||||||
|
|
|
@ -1,18 +1,23 @@
|
||||||
import { PointLayer, Scene } from '@antv/l7';
|
import { PointLayer, Scene } from '@antv/l7';
|
||||||
import { GaodeMap, Mapbox } from '@antv/l7-maps';
|
import { GaodeMap, Mapbox } from '@antv/l7-maps';
|
||||||
|
import * as dat from 'dat.gui';
|
||||||
import * as React from 'react';
|
import * as React from 'react';
|
||||||
// @ts-ignore
|
// @ts-ignore
|
||||||
export default class Light extends React.Component {
|
export default class Light extends React.Component {
|
||||||
// @ts-ignore
|
// @ts-ignore
|
||||||
private scene: Scene;
|
private scene: Scene;
|
||||||
|
private gui: dat.GUI;
|
||||||
|
|
||||||
public componentWillUnmount() {
|
public componentWillUnmount() {
|
||||||
this.scene.destroy();
|
this.scene.destroy();
|
||||||
|
if (this.gui) {
|
||||||
|
this.gui.destroy();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public async componentDidMount() {
|
public async componentDidMount() {
|
||||||
const response = await fetch(
|
const response = await fetch(
|
||||||
'https://alipay-rmsdeploy-image.cn-hangzhou.alipay.aliyun-inc.com/antvdemo/assets/city/bj.csv',
|
'https://gw-office.alipayobjects.com/bmw-prod/6698fc37-4fc1-488b-972c-e29c77617a26.csv',
|
||||||
);
|
);
|
||||||
const pointsData = await response.text();
|
const pointsData = await response.text();
|
||||||
|
|
||||||
|
@ -21,29 +26,49 @@ export default class Light extends React.Component {
|
||||||
map: new GaodeMap({
|
map: new GaodeMap({
|
||||||
pitch: 0,
|
pitch: 0,
|
||||||
style: 'dark',
|
style: 'dark',
|
||||||
center: [116.405289, 39.904987],
|
center: [114.298569, 30.584354],
|
||||||
zoom: 6,
|
zoom: 11,
|
||||||
}),
|
}),
|
||||||
});
|
});
|
||||||
this.scene = scene;
|
this.scene = scene;
|
||||||
|
const layerConfig = {
|
||||||
|
type: 'bus',
|
||||||
|
};
|
||||||
|
const gui = new dat.GUI();
|
||||||
|
this.gui = gui;
|
||||||
|
const typeControl = this.gui.add(layerConfig, 'type', [
|
||||||
|
'bus',
|
||||||
|
'elm',
|
||||||
|
'bikeriding',
|
||||||
|
'metro',
|
||||||
|
'parking',
|
||||||
|
]);
|
||||||
|
|
||||||
scene.on('loaded', async () => {
|
scene.on('loaded', async () => {
|
||||||
const pointLayer = new PointLayer({
|
const pointLayer = new PointLayer()
|
||||||
blend: 'normal',
|
|
||||||
})
|
|
||||||
.source(pointsData, {
|
.source(pointsData, {
|
||||||
parser: {
|
parser: {
|
||||||
type: 'csv',
|
type: 'csv',
|
||||||
x: 'lng',
|
y: 'latitude',
|
||||||
y: 'lat',
|
x: 'longitude',
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
.size(1)
|
.size(0.5)
|
||||||
.color('#ffa842')
|
.filter('type', (v: string) => {
|
||||||
|
return v === 'bus';
|
||||||
|
})
|
||||||
|
.color('#FF2B1F')
|
||||||
.style({
|
.style({
|
||||||
opacity: 1,
|
opacity: 1,
|
||||||
});
|
});
|
||||||
|
|
||||||
scene.addLayer(pointLayer);
|
scene.addLayer(pointLayer);
|
||||||
|
typeControl.onChange((type) => {
|
||||||
|
pointLayer.filter('type', (v) => {
|
||||||
|
return v === type;
|
||||||
|
});
|
||||||
|
scene.render();
|
||||||
|
});
|
||||||
this.scene = scene;
|
this.scene = scene;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue