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 yarn.lock
package-lock.json package-lock.json
git_log.sh

View File

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

View File

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

View File

@ -83,4 +83,4 @@ L7 是由蚂蚁金服 AntV 数据可视化团队推出的基于 WebGL 的开源
### 技术支持服务群 ### 技术支持服务群
L7 相关技术问题,需求反馈,我们会及时响应 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 order: 1
--- ---

View File

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

File diff suppressed because one or more lines are too long

View File

@ -1,8 +1,8 @@
{ {
"name": "@antv/l7", "name": "@antv/l7",
"version": "2.0.0-beta.5", "version": "2.0.0-beta.7",
"description": "A Large-scale WebGL-powered Geospatial Data Visualization", "description": "A Large-scale WebGL-powered Geospatial Data Visualization",
"main": "dist/bundle.js", "main": "dist/l7.js",
"sideEffects": true, "sideEffects": true,
"files": [ "files": [
"dist", "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", "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" "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", "author": "antv",
"license": "ISC", "license": "MIT",
"gitHead": "0563f357f3a07c099bf1ffa9350e6fa3c88353ae",
"publishConfig": { "publishConfig": {
"access": "public" "access": "public"
}, },
"dependencies": { "dependencies": {
"@l7/core": "0.0.1", "@l7/core": "0.0.1",
"@l7/scene": "0.0.1", "@l7/scene": "0.0.1",
"@l7/layers": "0.0.1", "@l7/layers": "0.0.1",
"@l7/component": "0.0.1" "@l7/component": "0.0.1"
} }
} }

View File

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

View File

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

View File

@ -8,10 +8,6 @@ import {
IModelUniform, IModelUniform,
} from '@l7/core'; } from '@l7/core';
import BaseModel from '../../core/baseModel'; 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 { export default class ExtrudeModel extends BaseModel {
public getUninforms(): IModelUniform { public getUninforms(): IModelUniform {
throw new Error('Method not implemented.'); throw new Error('Method not implemented.');

View File

@ -129,7 +129,6 @@ const IndexPage = () => {
<img <img
width="100%" width="100%"
className="Notification-module--number--31-3Z" className="Notification-module--number--31-3Z"
style={{ marginLeft: '125px', marginTop: '50px' }}
src="https://gw.alipayobjects.com/mdn/antv_site/afts/img/A*o40BRo-ANLoAAAAAAAAAAABkARQnAQ" src="https://gw.alipayobjects.com/mdn/antv_site/afts/img/A*o40BRo-ANLoAAAAAAAAAAABkARQnAQ"
/> />
} }
@ -147,6 +146,6 @@ const IndexPage = () => {
<Companies title={t('感谢信赖')} companies={companies} /> <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 { Scene } from '@l7/scene';
import * as React from 'react'; import * as React from 'react';
@ -21,7 +21,7 @@ export default class Arc2DLineDemo extends React.Component {
style: 'mapbox://styles/mapbox/dark-v9', style: 'mapbox://styles/mapbox/dark-v9',
zoom: 2, zoom: 2,
}); });
const lineLayer = new Arc2DLineLayer({}) const lineLayer = new LineLayer({})
.source(await response.text(), { .source(await response.text(), {
parser: { parser: {
type: 'csv', type: 'csv',

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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