fix(site): megre conflict

This commit is contained in:
thinkinggis 2019-11-22 18:21:59 +08:00
commit 23211d091d
19 changed files with 73 additions and 80 deletions

1
.gitignore vendored
View File

@ -73,3 +73,4 @@ public
yarn.lock
package-lock.json
git_log.sh

View File

@ -18,19 +18,19 @@ L7 是由蚂蚁金服 AntV 数据可视化团队推出的基于 WebGL 的开源
## 核心特性
### 🌏 数据驱动可视化展示
🌏 数据驱动可视化展示
数据驱动,从数到形,支持丰富的地图可视化类型,更好洞察数据。
### 🌏 2D3D 一体化的海量数据高性能渲染
🌏 2D3D 一体化的海量数据高性能渲染
百万级空间数据实时,动态渲染。
### 🌏简单灵活的数据接入
🌏 简单灵活的数据接入
支持CSVJSONgeojson等数据格式接入可以根据需求自定义数据格式无需复杂的空间数据转换。
### 🌏 多地图底图支持,支持离线内网部署
🌏 多地图底图支持,支持离线内网部署
高德地图国内合法合规的地理底图Mapbox 满足国际化业务需求。

View File

@ -3,7 +3,7 @@ import alias from '@rollup/plugin-alias';
import json from '@rollup/plugin-json';
import resolve from 'rollup-plugin-node-resolve';
import commonjs from 'rollup-plugin-commonjs';
import { terser } from "rollup-plugin-terser";
import { terser } from 'rollup-plugin-terser';
import analyze from 'rollup-plugin-analyzer';
import babel from 'rollup-plugin-babel';
import glsl from './rollup-plugin-glsl';
@ -11,7 +11,7 @@ import postcss from 'rollup-plugin-postcss';
import url from 'postcss-url';
function resolveFile(filePath) {
return path.join(__dirname, '..', filePath)
return path.join(__dirname, '..', filePath);
}
module.exports = [
@ -22,39 +22,39 @@ module.exports = [
format: 'umd',
name: 'L7',
globals: {
'mapbox-gl': 'mapboxgl',
},
'mapbox-gl': 'mapboxgl'
}
},
external: [
'mapbox-gl',
'mapbox-gl'
],
treeshake: true,
plugins: [
alias(
{
resolve: ['.tsx', '.ts'],
resolve: [ '.tsx', '.ts' ],
entries: [
{
find: /^@l7\/(.*)/,
replacement: resolveFile('packages/$1/src'),
},
replacement: resolveFile('packages/$1/src')
}
]
},
}
),
resolve({
browser: true,
preferBuiltins: false,
extensions: ['.js', '.ts'],
extensions: [ '.js', '.ts' ]
}),
glsl(
['**/*.glsl'],
true,
[ '**/*.glsl' ],
true
),
json(),
postcss({
plugins: [
url({ url: 'inline' }),
],
url({ url: 'inline' })
]
}),
// @see https://github.com/rollup/rollup-plugin-node-resolve#using-with-rollup-plugin-commonjs
commonjs({
@ -69,18 +69,18 @@ module.exports = [
'isFunction',
'cloneDeep',
'isString',
'isNumber',
],
'isNumber'
]
}
}),
babel({
extensions: ['.js', '.ts'],
extensions: [ '.js', '.ts' ]
}),
terser(),
analyze({
summaryOnly: true,
limit: 20,
}),
],
},
limit: 20
})
]
}
];

View File

@ -83,4 +83,4 @@ L7 是由蚂蚁金服 AntV 数据可视化团队推出的基于 WebGL 的开源
### 技术支持服务群
L7 相关技术问题,需求反馈,我们会及时响应
![地理空间可视化L7支持群](https://gw.alipayobjects.com/mdn/antv_site/afts/img/A*REc9Qrttrg8AAAAAAAAAAABkARQnAQ)
![地理空间可视化L7支持群](https://gw.alipayobjects.com/mdn/antv_site/afts/img/A*ePmsRbK4lZgAAAAAAAAAAABkARQnAQ)

View File

@ -1,5 +1,5 @@
---
title: 场景 Scene
title: Scene
order: 1
---

View File

@ -51,7 +51,15 @@ module.exports = {
slug: '/tutorial',
title: {
zh: '快速入门',
en: 'Quickstart'
en: 'QuickStart'
},
order: 0
},
{
slug: '/tutorial/map',
title: {
zh: '地图',
en: 'MAP'
},
order: 0
},

File diff suppressed because one or more lines are too long

View File

@ -1,8 +1,8 @@
{
"name": "@antv/l7",
"version": "2.0.0-beta.5",
"version": "2.0.0-beta.7",
"description": "A Large-scale WebGL-powered Geospatial Data Visualization",
"main": "dist/bundle.js",
"main": "dist/l7.js",
"sideEffects": true,
"files": [
"dist",
@ -18,16 +18,15 @@
"build:esm": "BABEL_ENV=esm babel src --root-mode upward --out-dir es --source-maps --extensions .ts,.tsx --delete-dir-on-start --no-comments",
"watch": "BABEL_ENV=cjs babel src --watch --root-mode upward --out-dir lib --source-maps --extensions .ts,.tsx --delete-dir-on-start --no-comments"
},
"author": "xiaoiver",
"license": "ISC",
"gitHead": "0563f357f3a07c099bf1ffa9350e6fa3c88353ae",
"author": "antv",
"license": "MIT",
"publishConfig": {
"access": "public"
},
"dependencies": {
"@l7/core": "0.0.1",
"@l7/scene": "0.0.1",
"@l7/layers": "0.0.1",
"@l7/component": "0.0.1"
"@l7/core": "0.0.1",
"@l7/scene": "0.0.1",
"@l7/layers": "0.0.1",
"@l7/component": "0.0.1"
}
}

View File

@ -70,9 +70,9 @@ export function PointImageTriangulation(feature: IEncodeFeature) {
*/
export function LineTriangulation(feature: IEncodeFeature) {
const { coordinates } = feature;
let path = coordinates;
let path = coordinates as number[][][] | number[][];
if (Array.isArray(path[0][0])) {
path = coordinates[0];
path = coordinates[0] as number[][];
}
const line = getNormals(path as number[][], false, 0);
return {

View File

@ -5,18 +5,19 @@ import {
ILayer,
ILayerModel,
IModel,
IModelUniform,
} from '@l7/core';
import BaseModel from '../../core/baseModel';
export default class ArcModel extends BaseModel {
public getUninforms() {
export default class DashModel extends BaseModel {
public getUninforms(): IModelUniform {
throw new Error('Method not implemented.');
}
public buildModels(): IModel[] {
throw new Error('Method not implemented.');
}
private registerBuiltinAttributes() {
protected registerBuiltinAttributes() {
throw new Error('Method not implemented.');
}
}

View File

@ -8,10 +8,6 @@ import {
IModelUniform,
} from '@l7/core';
import BaseModel from '../../core/baseModel';
import { PointExtrudeTriangulation } from '../core/triangulation';
import pointExtrudeFrag from '../shaders/extrude_frag.glsl';
import pointExtrudeVert from '../shaders/extrude_vert.glsl';
export default class ExtrudeModel extends BaseModel {
public getUninforms(): IModelUniform {
throw new Error('Method not implemented.');

View File

@ -129,7 +129,6 @@ const IndexPage = () => {
<img
width="100%"
className="Notification-module--number--31-3Z"
style={{ marginLeft: '125px', marginTop: '50px' }}
src="https://gw.alipayobjects.com/mdn/antv_site/afts/img/A*o40BRo-ANLoAAAAAAAAAAABkARQnAQ"
/>
}
@ -147,6 +146,6 @@ const IndexPage = () => {
<Companies title={t('感谢信赖')} companies={companies} />
</>
);
}
};
export default IndexPage
export default IndexPage;

View File

@ -1,4 +1,4 @@
import { Arc2DLineLayer } from '@l7/layers';
import { LineLayer } from '@l7/layers';
import { Scene } from '@l7/scene';
import * as React from 'react';
@ -21,7 +21,7 @@ export default class Arc2DLineDemo extends React.Component {
style: 'mapbox://styles/mapbox/dark-v9',
zoom: 2,
});
const lineLayer = new Arc2DLineLayer({})
const lineLayer = new LineLayer({})
.source(await response.text(), {
parser: {
type: 'csv',

View File

@ -1,4 +1,4 @@
import { ArcLineLayer } from '@l7/layers';
import { LineLayer } from '@l7/layers';
import { Scene } from '@l7/scene';
import * as React from 'react';
@ -21,7 +21,7 @@ export default class ArcLineDemo extends React.Component {
style: 'mapbox://styles/mapbox/dark-v9',
zoom: 2,
});
const lineLayer = new ArcLineLayer({})
const lineLayer = new LineLayer({})
.source(await response.text(), {
parser: {
type: 'csv',

View File

@ -1,4 +1,4 @@
import { Point3dLayer } from '@l7/layers';
import { PointLayer } from '@l7/layers';
import { Scene } from '@l7/scene';
import * as React from 'react';
import data from '../data/data.json';
@ -18,7 +18,7 @@ export default class Point3D extends React.Component {
style: 'mapbox://styles/mapbox/streets-v9',
zoom: 1,
});
const pointLayer = new Point3dLayer({});
const pointLayer = new PointLayer({});
const p1 = {
type: 'FeatureCollection',
features: [

View File

@ -1,4 +1,4 @@
import { HeatMapLayer } from '@l7/layers';
import { HeatmapLayer } from '@l7/layers';
import { Scene } from '@l7/scene';
// @ts-ignore
import * as React from 'react';
@ -22,7 +22,7 @@ export default class HeatMapLayerDemo extends React.Component {
style: 'mapbox://styles/mapbox/dark-v10',
zoom: 2,
});
const layer = new HeatMapLayer({
const layer = new HeatmapLayer({
enableTAA: false,
});
layer

View File

@ -21,7 +21,7 @@ export default class GridHeatMap extends React.Component {
style: 'mapbox://styles/mapbox/streets-v9',
zoom: 16,
});
const layer = new HeatMapGridLayer({});
const layer = new HeatmapLayer({});
layer
.source(await response.json(), {
parser: {

View File

@ -1,4 +1,4 @@
import { PointImageLayer, PointLayer } from '@l7/layers';
import { PointLayer } from '@l7/layers';
import { Scene } from '@l7/scene';
import * as React from 'react';
import data from '../data/data.json';
@ -18,8 +18,8 @@ export default class PointImage extends React.Component {
zoom: 15,
id: 'map',
pitch: 0,
type: 'mapbox',
style: 'mapbox://styles/mapbox/streets-v9',
type: 'amap',
style: 'dark',
});
scene.addImage(
'00',
@ -33,11 +33,8 @@ export default class PointImage extends React.Component {
'02',
'https://gw.alipayobjects.com/mdn/antv_site/afts/img/A*o16fSIvcKdUAAAAAAAAAAABkARQnAQ',
);
this.scene = scene;
scene.on('loaded', () => {
run();
});
const imageLayer = new PointImageLayer({})
const imageLayer = new PointLayer({})
.source(await response.json(), {
parser: {
type: 'json',
@ -46,15 +43,9 @@ export default class PointImage extends React.Component {
}
})
.shape('name', ['00', '01', '02'])
.size(60);
.size(30);
scene.addLayer(imageLayer);
function run() {
scene.render();
console.log('render');
requestAnimationFrame(run);
}
this.scene = scene;
}
public render() {

View File

@ -1,5 +1,4 @@
// @ts-ignore
import '!style-loader!css-loader!./css/l7.css';
import { Marker, Popup, Scale, Zoom } from '@l7/component';
import { PolygonLayer } from '@l7/layers';
// @ts-ignore