Feat website (#1474)

* feat: 迁移网站

* feat: 官网更新

* fix: dumi 版本锁定

* chore: 更新依赖
This commit is contained in:
@thinkinggis 2022-11-12 21:45:59 +08:00 committed by GitHub
parent b54f14f0b5
commit 1f1af0aeb5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
392 changed files with 839 additions and 1146 deletions

2
.gitignore vendored
View File

@ -88,3 +88,5 @@ packages/district/src/data
.umi/
docs-dist
/packages/leaflet
site_temp
.dumi

View File

@ -21,8 +21,7 @@ export default () => {
});
scene.addMarkerLayer(markerLayer);
const marker = new Marker().setLnglat([
120.1047383116185,
30.261127905299425,
120.1047383116185, 30.261127905299425,
]);
markerLayer.addMarker(marker);
});

View File

@ -24,8 +24,7 @@ const Demo: FunctionComponent = () => {
setTimeout(() => {
logo1.setOptions({
img:
'https://gw.alipayobjects.com/zos/rmsportal/KDpgvguMpGfqaHPjicRK.svg',
img: 'https://gw.alipayobjects.com/zos/rmsportal/KDpgvguMpGfqaHPjicRK.svg',
href: '',
style: 'height: 40px; width: 40px;',
});
@ -40,8 +39,7 @@ const Demo: FunctionComponent = () => {
const logo3 = new Logo({
position: 'topright',
style: 'height: 40px; width: 40px;',
img:
'https://gw.alipayobjects.com/zos/rmsportal/KDpgvguMpGfqaHPjicRK.svg',
img: 'https://gw.alipayobjects.com/zos/rmsportal/KDpgvguMpGfqaHPjicRK.svg',
href: '',
});
scene.addControl(logo3);
@ -49,8 +47,7 @@ const Demo: FunctionComponent = () => {
const logo4 = new Logo({
position: 'topleft',
style: 'height: 40px; width: 40px;',
img:
'https://gw.alipayobjects.com/zos/rmsportal/KDpgvguMpGfqaHPjicRK.svg',
img: 'https://gw.alipayobjects.com/zos/rmsportal/KDpgvguMpGfqaHPjicRK.svg',
href: 'https://ant.design/index-cn',
});
scene.addControl(logo4);

View File

@ -57,10 +57,7 @@ export default () => {
min: 0,
max: 80,
extent: [
73.482190241,
3.82501784112,
135.106618732,
57.6300459963,
73.482190241, 3.82501784112, 135.106618732, 57.6300459963,
],
},
},

View File

@ -84,9 +84,7 @@ export default () => {
['+', ['band', 1], ['band', 0]],
],
extent: [
129.80688399962705,
46.63599711239799,
129.88665024933522,
129.80688399962705, 46.63599711239799, 129.88665024933522,
46.695215826300725,
],
},

View File

@ -67,10 +67,7 @@ export default () => {
b: ['*', ['band', 1], 1],
},
extent: [
73.482190241,
3.82501784112,
135.106618732,
57.6300459963,
73.482190241, 3.82501784112, 135.106618732, 57.6300459963,
],
},
},

View File

@ -57,8 +57,12 @@ export default () => {
ctx.clearRect(0, 0, canvasSize, canvasSize);
ctx.drawImage(img, 0, 0, canvasSize, canvasSize);
const imgData = ctx.getImageData(0, 0, canvasSize, canvasSize)
.data;
const imgData = ctx.getImageData(
0,
0,
canvasSize,
canvasSize,
).data;
const channelR: number[] = [];
const channelG: number[] = [];
const channelB: number[] = [];
@ -106,10 +110,7 @@ export default () => {
// b: grayExp,
},
extent: [
73.482190241,
3.82501784112,
135.106618732,
57.6300459963,
73.482190241, 3.82501784112, 135.106618732, 57.6300459963,
],
},
},

View File

@ -92,9 +92,7 @@ export default () => {
b: ['-', ['band', 2], 1424],
},
extent: [
129.80688399962705,
46.63599711239799,
129.88665024933522,
129.80688399962705, 46.63599711239799, 129.88665024933522,
46.695215826300725,
],
},

View File

@ -75,9 +75,7 @@ export default () => {
type: 'rgb',
},
extent: [
130.39565357746957,
46.905730725742366,
130.73364094187343,
130.39565357746957, 46.905730725742366, 130.73364094187343,
47.10217234153133,
],
},

View File

@ -74,9 +74,7 @@ export default () => {
type: 'nd',
},
extent: [
130.39565357746957,
46.905730725742366,
130.73364094187343,
130.39565357746957, 46.905730725742366, 130.73364094187343,
47.10217234153133,
],
},

View File

@ -73,9 +73,7 @@ export default () => {
type: 'nd',
},
extent: [
130.39565357746957,
46.905730725742366,
130.73364094187343,
130.39565357746957, 46.905730725742366, 130.73364094187343,
47.10217234153133,
],
},

View File

@ -73,9 +73,7 @@ export default () => {
type: 'nd',
},
extent: [
130.39565357746957,
46.905730725742366,
130.73364094187343,
130.39565357746957, 46.905730725742366, 130.73364094187343,
47.10217234153133,
],
},

View File

@ -72,9 +72,7 @@ export default () => {
},
operation: 'ndvi',
extent: [
130.39565357746957,
46.905730725742366,
130.73364094187343,
130.39565357746957, 46.905730725742366, 130.73364094187343,
47.10217234153133,
],
},

View File

@ -66,12 +66,10 @@ export default () => {
},
extent: [
...metersToLngLat([
8182125.2558000003919005,
427435.8622000003233552,
8182125.2558000003919005, 427435.8622000003233552,
]),
...metersToLngLat([
15038832.4410999994724989,
7087852.7587999999523163,
15038832.4410999994724989, 7087852.7587999999523163,
]),
],
},

View File

@ -1,6 +1,7 @@
{
"packages": [
"packages/*"
"packages/*",
"!packages/site"
],
"command": {
"publish": {

View File

@ -8,8 +8,6 @@
"devDependencies": {
"@antv/g2": "^3.5.9",
"@antv/g2plot": "^2.3.40",
"@antv/gatsby-theme-antv": "^1.1.15",
"@antv/l7-district": "^2.3.9",
"@antv/l7-draw": "^3.0.8",
"@antv/l7-react": "^2.3.3",
"@antv/l7plot": "^0.1.0",
@ -48,13 +46,12 @@
"@types/node": "13.11.1",
"@types/offscreencanvas": "^2019.7.0",
"@types/react-router-dom": "^5.3.2",
"@types/storybook__react": "^5.2.1",
"@types/supercluster": "^5.0.1",
"@typescript-eslint/eslint-plugin": "^5.6.0",
"@typescript-eslint/parser": "^5.6.0",
"@umijs/fabric": "^2.8.1",
"@umijs/test": "^3.0.5",
"antd": "4.12.3",
"antd": "^4.12.3",
"awesome-typescript-loader": "^5.2.1",
"babel-jest": "^24.9.0",
"babel-loader": "^8.0.6",
@ -89,10 +86,7 @@
"eslint": "^7.32.0",
"eslint-plugin-html": "^6.0.0",
"eslint-plugin-unused-imports": "^2.0.0",
"father": "^4.0.0-rc.2",
"gatsby": "2.32.13",
"gatsby-plugin-google-analytics": "^2.1.27",
"gatsby-remark-prettier": "^1.0.0",
"father": "^4.1.0",
"gcoord": "^0.3.2",
"geotiff": "1.0.0-beta.10",
"gh-pages": "^2.1.1",
@ -118,7 +112,7 @@
"postcss": "^7.0.18",
"postcss-plugin": "^1.0.0",
"postcss-url": "^8.0.0",
"prettier": "^1.19.1",
"prettier": "^2.7.1",
"raw-loader": "^4.0.1",
"react": "^16.13.1",
"react-docgen-typescript-loader": "^3.1.0",
@ -168,7 +162,7 @@
"site:clean": "lerna --scope @antv/l7-site exec yarn run site:clean",
"site:deploy": "lerna --scope @antv/l7-site exec yarn run site:deploy",
"site:publish": "lerna --scope @antv/l7-site exec yarn run site:publish",
"storybook": "start-storybook -p 6006",
"async-site": "sh ./scripts/site.sh",
"prebuild": "yarn clean && run-p tsc lint",
"build": " yarn worker && lerna run build",
"postbuild": "yarn build:declarations",
@ -222,17 +216,7 @@
}
},
"resolutions": {
"d3-array": "1",
"monaco-editor-webpack-plugin": "2.0.0",
"@babel/types": "7.19.4",
"@babel/runtime": "7.19.4",
"@babel/parser": "7.19.4",
"@babel/standalone": "7.19.4",
"@babel/generator": "7.19.4",
"@babel/traverse": "7.19.4",
"@babel/plugin-proposal-decorators": "7.19.6",
"@babel/helper-skip-transparent-expression-wrappers": "7.18.9",
"monaco-editor": "0.21.0"
"d3-array": "1"
},
"tnpm": {
"mode": "yarn"

View File

@ -1,75 +1,61 @@
export const GaodeMapStyleConfig = {
normal: {
text: '标准',
img:
'https://gw.alipayobjects.com/mdn/rms_816329/afts/img/A*-nqiT6Vu948AAAAAAAAAAAAAARQnAQ',
img: 'https://gw.alipayobjects.com/mdn/rms_816329/afts/img/A*-nqiT6Vu948AAAAAAAAAAAAAARQnAQ',
},
light: {
text: '月光银',
img:
'https://gw.alipayobjects.com/mdn/rms_816329/afts/img/A*J_wYQL_PaUEAAAAAAAAAAAAAARQnAQ',
img: 'https://gw.alipayobjects.com/mdn/rms_816329/afts/img/A*J_wYQL_PaUEAAAAAAAAAAAAAARQnAQ',
},
dark: {
text: '幻影黑',
img:
'https://gw.alipayobjects.com/mdn/rms_816329/afts/img/A*U7M9QI1yat4AAAAAAAAAAAAAARQnAQ',
img: 'https://gw.alipayobjects.com/mdn/rms_816329/afts/img/A*U7M9QI1yat4AAAAAAAAAAAAAARQnAQ',
},
fresh: {
text: '草色青',
img:
'https://gw.alipayobjects.com/mdn/rms_816329/afts/img/A*T-oBT4hB5ucAAAAAAAAAAAAAARQnAQ',
img: 'https://gw.alipayobjects.com/mdn/rms_816329/afts/img/A*T-oBT4hB5ucAAAAAAAAAAAAAARQnAQ',
},
grey: {
text: '雅士灰',
img:
'https://gw.alipayobjects.com/mdn/rms_816329/afts/img/A*OREXQ4vgQRIAAAAAAAAAAAAAARQnAQ',
img: 'https://gw.alipayobjects.com/mdn/rms_816329/afts/img/A*OREXQ4vgQRIAAAAAAAAAAAAAARQnAQ',
},
graffiti: {
text: '涂鸦',
img:
'https://gw.alipayobjects.com/mdn/rms_816329/afts/img/A*4UApTKmeiy4AAAAAAAAAAAAAARQnAQ',
img: 'https://gw.alipayobjects.com/mdn/rms_816329/afts/img/A*4UApTKmeiy4AAAAAAAAAAAAAARQnAQ',
},
macaron: {
text: '马卡龙',
img:
'https://gw.alipayobjects.com/mdn/rms_816329/afts/img/A*0GrCQLtDjNcAAAAAAAAAAAAAARQnAQ',
img: 'https://gw.alipayobjects.com/mdn/rms_816329/afts/img/A*0GrCQLtDjNcAAAAAAAAAAAAAARQnAQ',
},
darkblue: {
text: '极夜蓝',
img:
'https://gw.alipayobjects.com/mdn/rms_816329/afts/img/A*uWxqSZQlPkkAAAAAAAAAAAAAARQnAQ',
img: 'https://gw.alipayobjects.com/mdn/rms_816329/afts/img/A*uWxqSZQlPkkAAAAAAAAAAAAAARQnAQ',
},
wine: {
text: '酱籽',
img:
'https://gw.alipayobjects.com/mdn/rms_816329/afts/img/A*OFPrTbg3an0AAAAAAAAAAAAAARQnAQ',
img: 'https://gw.alipayobjects.com/mdn/rms_816329/afts/img/A*OFPrTbg3an0AAAAAAAAAAAAAARQnAQ',
},
};
export const MapboxMapStyleConfig = {
normal: {
text: '标准',
img:
'https://gw.alipayobjects.com/mdn/rms_816329/afts/img/A*AnfJTbIBJOkAAAAAAAAAAAAAARQnAQ',
img: 'https://gw.alipayobjects.com/mdn/rms_816329/afts/img/A*AnfJTbIBJOkAAAAAAAAAAAAAARQnAQ',
},
light: {
text: '亮',
img:
'https://gw.alipayobjects.com/mdn/rms_816329/afts/img/A*gnuiQIok9qIAAAAAAAAAAAAAARQnAQ',
img: 'https://gw.alipayobjects.com/mdn/rms_816329/afts/img/A*gnuiQIok9qIAAAAAAAAAAAAAARQnAQ',
},
dark: {
text: '暗',
img:
'https://gw.alipayobjects.com/mdn/rms_816329/afts/img/A*NwG-TbOlBH0AAAAAAAAAAAAAARQnAQ',
img: 'https://gw.alipayobjects.com/mdn/rms_816329/afts/img/A*NwG-TbOlBH0AAAAAAAAAAAAAARQnAQ',
},
satellite: {
text: '卫星',
img:
'https://gw.alipayobjects.com/mdn/rms_816329/afts/img/A*2X5EQLKul3IAAAAAAAAAAAAAARQnAQ',
img: 'https://gw.alipayobjects.com/mdn/rms_816329/afts/img/A*2X5EQLKul3IAAAAAAAAAAAAAARQnAQ',
},
outdoors: {
text: '户外',
img:
'https://gw.alipayobjects.com/mdn/rms_816329/afts/img/A*gXFLRIaBUI0AAAAAAAAAAAAAARQnAQ',
img: 'https://gw.alipayobjects.com/mdn/rms_816329/afts/img/A*gXFLRIaBUI0AAAAAAAAAAAAAARQnAQ',
},
};

View File

@ -10,9 +10,7 @@ export interface IExportImageControlOption extends IButtonControlOption {
export { ExportImage };
export default class ExportImage extends ButtonControl<
IExportImageControlOption
> {
export default class ExportImage extends ButtonControl<IExportImageControlOption> {
public onAdd(): HTMLElement {
const button = super.onAdd();
button.addEventListener('click', this.onClick);

View File

@ -13,9 +13,7 @@ export interface IFullscreenControlOption extends IButtonControlOption {
export { Fullscreen };
export default class Fullscreen extends ButtonControl<
IFullscreenControlOption
> {
export default class Fullscreen extends ButtonControl<IFullscreenControlOption> {
protected isFullscreen = false;
protected mapContainer: HTMLElement;
@ -89,14 +87,8 @@ export default class Fullscreen extends ButtonControl<
protected onFullscreenChange = () => {
this.isFullscreen = !!document.fullscreenElement;
const {
btnText,
btnIcon,
title,
exitBtnText,
exitBtnIcon,
exitTitle,
} = this.controlOption;
const { btnText, btnIcon, title, exitBtnText, exitBtnIcon, exitTitle } =
this.controlOption;
if (this.isFullscreen) {
this.setBtnTitle(exitTitle);
this.setBtnText(exitBtnText);

View File

@ -16,8 +16,7 @@ export default class Logo extends Control<ILogoControlOption> {
position: PositionType.BOTTOMLEFT,
name: 'logo',
href: 'https://l7.antv.vision/',
img:
'https://gw.alipayobjects.com/mdn/rms_816329/afts/img/A*GRb1TKp4HcMAAAAAAAAAAAAAARQnAQ',
img: 'https://gw.alipayobjects.com/mdn/rms_816329/afts/img/A*GRb1TKp4HcMAAAAAAAAAAAAAARQnAQ',
};
}

View File

@ -8,9 +8,7 @@ export interface IMouseLocationControlOption extends IControlOption {
export { MouseLocation };
export default class MouseLocation extends Control<
IMouseLocationControlOption
> {
export default class MouseLocation extends Control<IMouseLocationControlOption> {
protected location: Position = [0, 0];
public getLocation() {

View File

@ -22,7 +22,8 @@ export { Popup };
export default class Popup<O extends IPopupOption = IPopupOption>
extends EventEmitter
implements IPopup {
implements IPopup
{
/**
*
* @protected
@ -475,13 +476,8 @@ export default class Popup<O extends IPopupOption = IPopupOption>
protected update = () => {
const hasPosition = !!this.lngLat;
const {
className,
style,
maxWidth,
anchor,
stopPropagation,
} = this.popupOption;
const { className, style, maxWidth, anchor, stopPropagation } =
this.popupOption;
if (!this.mapsService || !hasPosition || !this.content) {
return;
}

View File

@ -9,9 +9,8 @@ export default class Clock {
this.autoStart = autoStart;
}
public start() {
this.startTime = (typeof performance === 'undefined'
? Date
: performance
this.startTime = (
typeof performance === 'undefined' ? Date : performance
).now();
this.oldTime = this.startTime;
@ -37,9 +36,8 @@ export default class Clock {
}
if (this.running) {
const newTime = (typeof performance === 'undefined'
? Date
: performance
const newTime = (
typeof performance === 'undefined' ? Date : performance
).now();
diff = (newTime - this.oldTime) / 1000;
this.oldTime = newTime;

View File

@ -25,10 +25,9 @@ export function getUniformLengthByType(type: string): number {
return arrayLength;
}
const uniformRegExp = /uniform\s+(bool|float|int|vec2|vec3|vec4|ivec2|ivec3|ivec4|mat2|mat3|mat4|sampler2D|samplerCube)\s+([\s\S]*?);/g;
export function extractUniforms(
content: string,
): {
const uniformRegExp =
/uniform\s+(bool|float|int|vec2|vec3|vec4|ivec2|ivec3|ivec4|mat2|mat3|mat4|sampler2D|samplerCube)\s+([\s\S]*?);/g;
export function extractUniforms(content: string): {
content: string;
uniforms: {
[key: string]: any;

View File

@ -54,9 +54,7 @@ export function packUint8ToFloat(a: number, b: number): number {
/**
* SDF circle
*/
export function packCircleVertex(
props: ICircleVertex,
): {
export function packCircleVertex(props: ICircleVertex): {
packedBuffer: number[][];
packedBuffer2: number[][];
packedBuffer3: number[][];

View File

@ -2,9 +2,7 @@ import BaseLayer from '../core/BaseLayer';
import { IGeometryLayerStyleOptions } from '../core/interface';
import GeometryModels, { GeometryModelType } from './models';
export default class GeometryLayer extends BaseLayer<
IGeometryLayerStyleOptions
> {
export default class GeometryLayer extends BaseLayer<IGeometryLayerStyleOptions> {
public type: string = 'GeometryLayer';
public defaultSourceConfig = {
data: [{ x: 0, y: 0 }],
@ -33,9 +31,8 @@ export default class GeometryLayer extends BaseLayer<
}
public getModelType(): GeometryModelType {
const shapeAttribute = this.styleAttributeService.getLayerStyleAttribute(
'shape',
);
const shapeAttribute =
this.styleAttributeService.getLayerStyleAttribute('shape');
const shape = shapeAttribute?.scale?.field as GeometryModelType;
if (shape === 'plane') {
return 'plane';

View File

@ -73,7 +73,8 @@ let layerIdCounter = 0;
export default class BaseLayer<ChildLayerStyleOptions = {}>
extends EventEmitter<LayerEventType>
implements ILayer {
implements ILayer
{
public id: string = `${layerIdCounter++}`;
public name: string = `${layerIdCounter}`;
public parent: ILayer;
@ -541,9 +542,8 @@ export default class BaseLayer<ChildLayerStyleOptions = {}>
values?: StyleAttributeOption,
updateOptions?: Partial<IStyleAttributeUpdateOptions>,
) {
const lastShape = this.styleAttributeService?.getLayerStyleAttribute(
'shape',
)?.scale?.field;
const lastShape =
this.styleAttributeService?.getLayerStyleAttribute('shape')?.scale?.field;
const currentShape = field;
this.shapeOption = {
field,
@ -1225,15 +1225,12 @@ export default class BaseLayer<ChildLayerStyleOptions = {}>
})
.catch((err) => reject(err));
} else {
const {
attributes,
elements,
count,
} = this.styleAttributeService.createAttributesAndIndices(
this.encodedData,
triangulation,
segmentNumber,
);
const { attributes, elements, count } =
this.styleAttributeService.createAttributesAndIndices(
this.encodedData,
triangulation,
segmentNumber,
);
const modelOptions = {
attributes,
uniforms,
@ -1287,10 +1284,8 @@ export default class BaseLayer<ChildLayerStyleOptions = {}>
}
public needPick(type: string): boolean {
const {
enableHighlight = true,
enableSelect = true,
} = this.getLayerConfig();
const { enableHighlight = true, enableSelect = true } =
this.getLayerConfig();
// 判断layer是否监听事件;
let isPick =
this.eventNames().indexOf(type) !== -1 ||

View File

@ -58,7 +58,8 @@ export interface ICellProperty {
// eslint-disable-next-line @typescript-eslint/no-unused-vars
export default class BaseModel<ChildLayerStyleOptions = {}>
implements ILayerModel {
implements ILayerModel
{
public triangulation: Triangulation;
// style texture data mapping

View File

@ -52,9 +52,8 @@ export default class EarthLayer extends BaseLayer<IEarthLayerStyleOptions> {
}
public getModelType(): EarthModelType {
const shapeAttribute = this.styleAttributeService.getLayerStyleAttribute(
'shape',
);
const shapeAttribute =
this.styleAttributeService.getLayerStyleAttribute('shape');
let shape = (shapeAttribute?.scale?.field || 'base') as string;
if (earthLayerTypes.indexOf(shape) < 0) {
shape = 'base';

View File

@ -47,9 +47,8 @@ export default class HeatMapLayer extends BaseLayer<IHeatMapLayerStyleOptions> {
}
public getModelType(): HeatMapModelType {
const shapeAttribute = this.styleAttributeService.getLayerStyleAttribute(
'shape',
);
const shapeAttribute =
this.styleAttributeService.getLayerStyleAttribute('shape');
const { shape3d } = this.getLayerConfig();
const source = this.getSource();
const sourceType = source.data.type;

View File

@ -20,9 +20,8 @@ export default class ImageLayer extends BaseLayer<IImageLayerStyleOptions> {
}
public getModelType(): ImageModelType {
const shapeAttribute = this.styleAttributeService.getLayerStyleAttribute(
'shape',
);
const shapeAttribute =
this.styleAttributeService.getLayerStyleAttribute('shape');
const shape = shapeAttribute?.scale?.field as ImageModelType;
if (shape === 'dataImage') {
return 'dataImage';

View File

@ -53,9 +53,8 @@ export default class LineLayer extends BaseLayer<ILineLayerStyleOptions> {
return this.layerType as LineModelType;
}
const shapeAttribute = this.styleAttributeService.getLayerStyleAttribute(
'shape',
);
const shapeAttribute =
this.styleAttributeService.getLayerStyleAttribute('shape');
const shape = shapeAttribute?.scale?.field as LineModelType;
return shape || 'line';
}

View File

@ -18,7 +18,8 @@ import { injectable } from 'inversify';
import { isNil, isString, uniq } from 'lodash';
import 'reflect-metadata';
const dateRegex = /^(?:(?!0000)[0-9]{4}([-/.]+)(?:(?:0?[1-9]|1[0-2])\1(?:0?[1-9]|1[0-9]|2[0-8])|(?:0?[13-9]|1[0-2])\1(?:29|30)|(?:0?[13578]|1[02])\1(?:31))|(?:[0-9]{2}(?:0[48]|[2468][048]|[13579][26])|(?:0[48]|[2468][048]|[13579][26])00)([-/.]?)0?2\2(?:29))(\s+([01]|([01][0-9]|2[0-3])):([0-9]|[0-5][0-9]):([0-9]|[0-5][0-9]))?$/;
const dateRegex =
/^(?:(?!0000)[0-9]{4}([-/.]+)(?:(?:0?[1-9]|1[0-2])\1(?:0?[1-9]|1[0-9]|2[0-8])|(?:0?[13-9]|1[0-2])\1(?:29|30)|(?:0?[13578]|1[02])\1(?:31))|(?:[0-9]{2}(?:0[48]|[2468][048]|[13579][26])|(?:0[48]|[2468][048]|[13579][26])00)([-/.]?)0?2\2(?:29))(\s+([01]|([01][0-9]|2[0-3])):([0-9]|[0-5][0-9]):([0-9]|[0-5][0-9]))?$/;
const scaleMap = {
[ScaleTypes.LINEAR]: d3.scaleLinear,

View File

@ -58,20 +58,29 @@ export default class ShaderUniformPlugin implements ILayerPlugin {
layer.models.forEach((model) => {
model.addUniforms({
// 相机参数,包含 VP 矩阵、缩放等级
[CameraUniform.ProjectionMatrix]: this.cameraService.getProjectionMatrix(),
[CameraUniform.ProjectionMatrix]:
this.cameraService.getProjectionMatrix(),
[CameraUniform.ViewMatrix]: this.cameraService.getViewMatrix(),
[CameraUniform.ViewProjectionMatrix]: this.cameraService.getViewProjectionMatrix(),
[CameraUniform.ViewProjectionMatrix]:
this.cameraService.getViewProjectionMatrix(),
[CameraUniform.Zoom]: this.cameraService.getZoom(),
[CameraUniform.ZoomScale]: this.cameraService.getZoomScale(),
[CameraUniform.FocalDistance]: this.cameraService.getFocalDistance(),
[CameraUniform.CameraPosition]: this.cameraService.getCameraPosition(),
[CameraUniform.CameraPosition]:
this.cameraService.getCameraPosition(),
// 坐标系参数
[CoordinateUniform.CoordinateSystem]: this.coordinateSystemService.getCoordinateSystem(),
[CoordinateUniform.ViewportCenter]: this.coordinateSystemService.getViewportCenter(),
[CoordinateUniform.ViewportCenterProjection]: this.coordinateSystemService.getViewportCenterProjection(),
[CoordinateUniform.PixelsPerDegree]: this.coordinateSystemService.getPixelsPerDegree(),
[CoordinateUniform.PixelsPerDegree2]: this.coordinateSystemService.getPixelsPerDegree2(),
[CoordinateUniform.PixelsPerMeter]: this.coordinateSystemService.getPixelsPerMeter(),
[CoordinateUniform.CoordinateSystem]:
this.coordinateSystemService.getCoordinateSystem(),
[CoordinateUniform.ViewportCenter]:
this.coordinateSystemService.getViewportCenter(),
[CoordinateUniform.ViewportCenterProjection]:
this.coordinateSystemService.getViewportCenterProjection(),
[CoordinateUniform.PixelsPerDegree]:
this.coordinateSystemService.getPixelsPerDegree(),
[CoordinateUniform.PixelsPerDegree2]:
this.coordinateSystemService.getPixelsPerDegree2(),
[CoordinateUniform.PixelsPerMeter]:
this.coordinateSystemService.getPixelsPerMeter(),
// 坐标系是高德2.0的时候单独计算
[CoordinateUniform.Mvp]: mvp,
u_SceneCenterMKT: sceneCenterMKT,

View File

@ -20,9 +20,8 @@ export default class PolygonLayer extends BaseLayer<IPolygonLayerStyleOptions> {
}
public getModelType(): PolygonModelType {
const shapeAttribute = this.styleAttributeService.getLayerStyleAttribute(
'shape',
);
const shapeAttribute =
this.styleAttributeService.getLayerStyleAttribute('shape');
const shape = shapeAttribute?.scale?.field as PolygonModelType;
if (shape === 'fill') {
return 'fill';

View File

@ -77,12 +77,8 @@ export default class RasterLayer extends BaseLayer<IRasterLayerStyleOptions> {
});
const { vs, fs, uniforms } = this.shaderModuleService.getModule('raster');
const {
createAttribute,
createElements,
createBuffer,
createModel,
} = this.rendererService;
const { createAttribute, createElements, createBuffer, createModel } =
this.rendererService;
return createModel({
vs,
fs,

View File

@ -57,7 +57,7 @@ function isPointEqual(a: vec2, b: vec2) {
return a[0] === b[0] && a[1] === b[1];
}
export default function(
export default function (
points: number[][],
closed: boolean,
indexOffset: number,

View File

@ -234,9 +234,9 @@ export default class Transform {
this.tileSize = 512; // constant
this.maxValidLatitude = 85.051129; // constant
this._renderWorldCopies = (renderWorldCopies === undefined
? true
: renderWorldCopies) as boolean;
this._renderWorldCopies = (
renderWorldCopies === undefined ? true : renderWorldCopies
) as boolean;
this._minZoom = minZoom || 0;
this._maxZoom = maxZoom || 22;

View File

@ -536,13 +536,8 @@ class HandlerManager {
if (!hasChange(combinedResult)) {
return this.fireEvents(combinedEventsInProgress, deactivatedHandlers);
}
const {
panDelta,
zoomDelta,
bearingDelta,
pitchDelta,
pinchAround,
} = combinedResult;
const { panDelta, zoomDelta, bearingDelta, pitchDelta, pinchAround } =
combinedResult;
let { around } = combinedResult;
if (pinchAround !== undefined) {

View File

@ -37,8 +37,10 @@ const LNGLAT_OFFSET_ZOOM_THRESHOLD = 12; // 暂时关闭 fix 统一不同坐标
* AMapService
*/
@injectable()
export default class AMapService extends AMapBaseService
implements IMapService<AMap.Map & IAMapInstance> {
export default class AMapService
extends AMapBaseService
implements IMapService<AMap.Map & IAMapInstance>
{
public version: string = Version['GAODE1.x'];
protected viewport: IViewport;
@ -67,7 +69,7 @@ export default class AMapService extends AMapBaseService
mat4.rotateY(modelMatrix, modelMatrix, rotate[1]);
mat4.rotateZ(modelMatrix, modelMatrix, rotate[2]);
return (modelMatrix as unknown) as number[];
return modelMatrix as unknown as number[];
}
public async init(): Promise<void> {
@ -196,16 +198,8 @@ export default class AMapService extends AMapBaseService
}
protected handleCameraChanged = (e: IAMapEvent): void => {
const {
fov,
near,
far,
height,
pitch,
rotation,
aspect,
position,
} = e.camera;
const { fov, near, far, height, pitch, rotation, aspect, position } =
e.camera;
const { lng, lat } = this.getCenter();
// Tip: 触发地图变化事件
this.emit('mapchange');

View File

@ -231,7 +231,7 @@ export default class AMapService extends AMapBaseService {
mat4.rotateY(modelMatrix, modelMatrix, rotate[1]);
mat4.rotateZ(modelMatrix, modelMatrix, rotate[2]);
return (modelMatrix as unknown) as number[];
return modelMatrix as unknown as number[];
}
public async init(): Promise<void> {
const {

View File

@ -29,8 +29,10 @@ const LNGLAT_OFFSET_ZOOM_THRESHOLD = 12;
* EarthService
*/
@injectable()
export default class L7EarthService extends BaseMapService<Map>
implements IEarthService {
export default class L7EarthService
extends BaseMapService<Map>
implements IEarthService
{
public lngLatToMercator(
lnglat: [number, number],
altitude: number,

View File

@ -5,14 +5,8 @@ export default class Viewport implements IViewport {
public viewport: WebMercatorViewport;
public syncWithMapCamera(mapCamera: Partial<IMapCamera>) {
const {
center,
zoom,
pitch,
bearing,
viewportHeight,
viewportWidth,
} = mapCamera;
const { center, zoom, pitch, bearing, viewportHeight, viewportWidth } =
mapCamera;
/**
* Deck.gl 使 Mapbox

View File

@ -65,10 +65,8 @@ export default class MapboxService extends BaseMapService<
scale: [number, number, number] = [1, 1, 1],
origin: IMercator = { x: 0, y: 0, z: 0 },
): number[] {
const modelAsMercatorCoordinate = window.mapboxgl.MercatorCoordinate.fromLngLat(
lnglat,
altitude,
);
const modelAsMercatorCoordinate =
window.mapboxgl.MercatorCoordinate.fromLngLat(lnglat, altitude);
// @ts-ignore
const meters = modelAsMercatorCoordinate.meterInMercatorCoordinateUnits();
const modelMatrix = mat4.create();
@ -93,7 +91,7 @@ export default class MapboxService extends BaseMapService<
mat4.rotateY(modelMatrix, modelMatrix, rotate[1]);
mat4.rotateZ(modelMatrix, modelMatrix, rotate[2]);
return (modelMatrix as unknown) as number[];
return modelMatrix as unknown as number[];
}
public async init(): Promise<void> {

View File

@ -41,7 +41,8 @@ const LNGLAT_OFFSET_ZOOM_THRESHOLD = 12;
*/
@injectable()
export default abstract class BaseMapService<T>
implements IMapService<Map & T> {
implements IMapService<Map & T>
{
public version: string = Version.DEFUALT;
public map: Map & T;
public simpleMapCoord: ISimpleMapCoord = new SimpleMapCoord();

View File

@ -36,9 +36,9 @@ export default class BaseMapWrapper<RawMap> implements IMapWrapper {
.inSingletonScope();
}
protected getServiceConstructor(): new (...args: any[]) => IMapService<
RawMap
> {
protected getServiceConstructor(): new (
...args: any[]
) => IMapService<RawMap> {
throw new Error('Method not implemented.');
}
}

View File

@ -5,14 +5,8 @@ export default class Viewport implements IViewport {
public viewport: WebMercatorViewport;
public syncWithMapCamera(mapCamera: Partial<IMapCamera>) {
const {
center,
zoom,
pitch,
bearing,
viewportHeight,
viewportWidth,
} = mapCamera;
const { center, zoom, pitch, bearing, viewportHeight, viewportWidth } =
mapCamera;
const preView = this.viewport
? {

View File

@ -197,9 +197,9 @@ export default class ReglModel implements IModel {
| number[]
| boolean;
} else {
reglDrawProps[uniformName] = (uniforms[uniformName] as
| ReglFramebuffer
| ReglTexture2D).get();
reglDrawProps[uniformName] = (
uniforms[uniformName] as ReglFramebuffer | ReglTexture2D
).get();
}
});
// 在进行拾取操作的绘制中,不应该使用叠加模式 - picking 根据拾取的颜色作为判断的输入,而叠加模式会产生新的,在 id 序列中不存在的颜色
@ -340,9 +340,7 @@ export default class ReglModel implements IModel {
* a: { b: 1 } -> 'a.b'
* a: [ { b: 1 } ] -> 'a[0].b'
*/
private extractUniforms(uniforms: {
[key: string]: IUniform;
}): {
private extractUniforms(uniforms: { [key: string]: IUniform }): {
[key: string]: IUniform;
} {
const extractedUniforms = {};

View File

@ -0,0 +1,20 @@
require('@/site/css/demo.css');
require('antd/dist/antd.less');
if (window) {
window.geotiff = require('geotiff');
window.lerc = require('lerc');
window.g2 = require('@antv/g2');
window.l7 = require('@antv/l7');
window.l7Maps = require('@antv/l7-maps');
window.l7plot = require('@antv/l7plot');
window.l7Draw = require('@antv/l7-draw');
window.l7Three = require('@antv/l7-three');
window.three = require('three');
window.GLTFLoader = require('three/examples/jsm/loaders/GLTFLoader');
window.FBXLoader = require('three/examples/jsm/loaders/FBXLoader');
window.react = require('react');
window.popmotion = require('popmotion');
window.reactDom = require('react-dom');
window.antd = require('antd');
window.gcoord = require('gcoord');
}

View File

@ -1,13 +1,11 @@
module.exports = {
plugins: [
{
resolve: '@antv/gatsby-theme-antv',
options: {
GATrackingId: 'UA-148148901-7',
},
},
],
siteMetadata: {
import { defineConfig } from 'dumi';
const path = require('path');
import { repository, version } from './package.json';
export default defineConfig({
locales: [{ id: 'zh', name: '中文' }, { id: 'en', name: 'English' }],
themeConfig: {
title: 'L7',
isAntVSite: false,
description:
@ -18,6 +16,116 @@ module.exports = {
'l7, L7, antv/l7, 地理, 空间可视化, Webgl, webgl, 地图, webgis, 3d, GIS, gis, Mapbox, deckgl, g2, g6, antv,',
showChartResize: true, // 是否在demo页展示图表视图切换
showAPIDoc: true, // 是否在demo页展示API文档
detail: {
title: {
zh: '蚂蚁地理空间数据可视化',
en: 'L7 Geospatial Visualization',
},
description: {
zh: '蚂蚁集团 AntV 数据可视化团队推出的基于 WebGL 的开源大规模地理空间数据可视分析引擎。',
en: 'Geospatial Data Visualization Analysis Engine',
},
image: 'https://gw.alipayobjects.com/mdn/antv_site/afts/img/A*cCI7RaJs46AAAAAAAAAAAABkARQnAQ',
buttons: [
{
text: {
zh: '开始使用',
en: 'Getting Started',
},
link: `docs/api/l7`,
},
{
text: {
zh: '图表示例',
en: 'gallery',
},
link: `/examples/gallery`,
type: 'primary',
},
],
},
features: [
{
icon:
'https://gw.alipayobjects.com/zos/basement_prod/ca2168d1-ae50-4929-8738-c6df62231de3.svg',
title: {
zh: '架构灵活且自由',
en: 'Easy to use',
},
description: {
zh: '支持地图底图,渲染引擎,图层自由定制、扩展,组合',
en: 'Support many basemap, many rendering engine, and layer free customization, extension, combination',
},
},
{
icon:
'https://gw.alipayobjects.com/zos/basement_prod/0ccf4dcb-1bac-4f4e-8d8d-f1031c77c9c8.svg',
title: {
zh: '业务专业且通用',
en: 'Simple and Universal',
},
description: {
zh: '以图形符号学地理设计体系理论基础,易用、易理解、专业、专注',
en: 'Generating high quality statistical charts through a few lines of code.',
},
},
{
icon:
'https://gw.alipayobjects.com/zos/basement_prod/fd232581-14b3-45ec-a85c-fb349c51b376.svg',
title: {
zh: '视觉酷炫且动感',
en: 'Cool and Dynamic',
},
description: {
zh: '支持海量数据2D、3D动态可交互高性能渲染',
en: 'Support many basemap, many rendering engine, and layer free customization, extension, combination',
},
},
],
case: [
{
logo: 'https://antv-2018.alipay.com/assets/image/icon/l7.svg',
title: {
zh: '指挥分配场景',
en: 'Advanced Features',
},
description: {
zh: '区域化网格化数据管理指挥分配场景',
en: 'We are now working on some advanced and powerful chart features.',
},
link: 'https://antv.vision/Dipper/~demos/docs-task',
image:
'https://gw.alipayobjects.com/mdn/rms_08cc33/afts/img/A*scJBTq8PW7kAAAAAAAAAAAAAARQnAQ',
},
{
logo: 'https://antv-2018.alipay.com/assets/image/icon/l7.svg',
title: {
zh: '地图数据分析',
en: 'Advanced Features',
},
description: {
zh: '区域化网格化数据分析场景',
en: 'We are now working on some advanced and powerful chart features.',
},
link: 'https://antv.vision/Dipper/~demos/docs-analysis',
image:
'https://gw.alipayobjects.com/mdn/rms_08cc33/afts/img/A*OnGVRb_qWxcAAAAAAAAAAAAAARQnAQ',
},
],
news: [
{
type: {
zh: '论坛',
en: 'Forum',
},
title: {
zh: 'AntV 芒种日 图新物GraphInsight 发布',
en: 'AntV Seeds Day Graph New: GraphInsight Released',
},
date: '2022.07.20',
link: 'https://www.yuque.com/xiaofengcanyue/scpehq/fgcwge',
},
],
navs: [
{
slug: 'docs/tutorial/l7',
@ -497,4 +605,9 @@ module.exports = {
indexName: 'antv_l7',
},
},
};
mfsu: false,
links: [
],
scripts: [
],
});

6
packages/site/.gitignore vendored Normal file
View File

@ -0,0 +1,6 @@
.dumi/tmp
.dumi/tmp-production
./dist
node_modules
yarn.lock
dist

7
packages/site/LEGAL.md Normal file
View File

@ -0,0 +1,7 @@
Legal Disclaimer
Within this source code, the comments in Chinese shall be the original, governing version. Any comment in other languages are for reference only. In the event of any conflict between the Chinese language version comments and other language version comments, the Chinese language version shall prevail.
法律免责声明
关于代码注释部分,中文注释为官方版本,其它语言注释仅做参考。中文注释可能与其它语言注释存在不一致,当中文注释与其它语言注释存在不一致时,请以中文注释为准。

2
packages/site/README.md Normal file
View File

@ -0,0 +1,2 @@
## 说明
静态站点无技术栈依赖模板

View File

@ -1,34 +0,0 @@
// @see https://babeljs.io/docs/en/next/config-files#project-wide-configuration
module.exports = api => {
api.cache(() => process.env.NODE_ENV);
return {
presets: [
'@babel/preset-env',
[
'@babel/preset-react',
]
],
plugins: [
'@babel/plugin-proposal-optional-chaining',
'@babel/plugin-proposal-nullish-coalescing-operator',
'transform-inline-environment-variables',
[
'@babel/plugin-proposal-decorators',
{
legacy: true
}
],
[
// import glsl as raw text
'babel-plugin-inline-import',
{
extensions: [
// 由于使用了 TS 的 resolveJsonModule 选项JSON 可以直接引入,不需要当作纯文本
'.pbf',
'.glsl'
]
}
]
]
};
};

View File

@ -3,4 +3,4 @@ title: Base Layer
order: 1
---
`markdown:docs/api/base.zh.md`
<embed src="@/docs/api/base.zh.md"></embed>

View File

@ -3,7 +3,7 @@ title: 图层基类 BaseLayer
order: 1
---
`markdown:docs/common/style.md`
<embed src="@/docs/common/style.md"></embed>
## 简介
@ -26,4 +26,4 @@ const layer = new BaseLayer(option) // option - 传入构造函数的参数对
scene.addLayer(layer);
```
`markdown:docs/common/layer/base.md`
<embed src="@/docs/common/layer/base.md"></embed>

View File

@ -55,12 +55,12 @@ const onPositionChange = () => {
## 配置
`markdown:docs/common/control/api.md`
<embed src="@/docs/common/control/api.md"></embed>
## 方法
`markdown:docs/common/control/method.md`
<embed src="@/docs/common/control/method.md"></embed>
## 事件
`markdown:docs/common/control/event.md`
<embed src="@/docs/common/control/event.md"></embed>

View File

@ -64,9 +64,9 @@ scene.on('loaded', () => {
| imageType | 截图图片的格式 | `'png'` &#124; `'jpeg'` |
| onExport | 截图成功后,用于接收图片 `Base64` 字符串的回调函数 | `(base64: string) => void` |
`markdown:docs/common/control/btn-api.md`
<embed src="@/docs/common/control/btn-api.md"></embed>
`markdown:docs/common/control/api.md`
<embed src="@/docs/common/control/api.md"></embed>
## 方法
@ -74,8 +74,8 @@ scene.on('loaded', () => {
| -------- | ------------------------ | ----------------------- |
| getImage | 获取截图的 Base64 字符串 | `() => Promise<string>` |
`markdown:docs/common/control/method.md`
<embed src="@/docs/common/control/method.md"></embed>
## 事件
`markdown:docs/common/control/event.md`
<embed src="@/docs/common/control/event.md"></embed>

View File

@ -29,7 +29,7 @@ scene.on('loaded', () => {
## 配置
`markdown:docs/common/control/btn-api.md`
<embed src="@/docs/common/control/btn-api.md"></embed>
| 名称 | 说明 | 类型 |
| ----------- | --------------------------------- | --------------------------------- |
@ -37,7 +37,7 @@ scene.on('loaded', () => {
| exitBtnText | 退出全屏按钮的文本 | `string` |
| exitTitle | 退出全屏按钮的文本的 `title` 属性 | `string` |
`markdown:docs/common/control/api.md`
<embed src="@/docs/common/control/api.md"></embed>
## 方法
@ -45,7 +45,7 @@ scene.on('loaded', () => {
| ---------------- | ------------------------------- | ------------ |
| toggleFullscreen | 进入/退出全屏地图部分的全屏状态 | `() => void` |
`markdown:docs/common/control/method.md`
<embed src="@/docs/common/control/method.md"></embed>
## 事件
@ -53,4 +53,4 @@ scene.on('loaded', () => {
| ---------------- | ------------------------ | --------------------------------- |
| fullscreenChange | 当全屏状态发生变化时触发 | `(isFullscreen: boolean) => void` |
`markdown:docs/common/control/event.md`
<embed src="@/docs/common/control/event.md"></embed>

View File

@ -43,9 +43,9 @@ scene.on('loaded', () => {
| --------- | ----------------------------------------------------------------------- | -------------------------------------------------- |
| transform | 格式化通过 `getlocation` 获取到的经纬度的函数,可以用于地理坐标系的转换 | `(position: [number, number]) => [number, number]` |
`markdown:docs/common/control/btn-api.md`
<embed src="@/docs/common/control/btn-api.md"></embed>
`markdown:docs/common/control/api.md`
<embed src="@/docs/common/control/api.md"></embed>
## 方法
@ -53,8 +53,8 @@ scene.on('loaded', () => {
| -------------- | ---------------------- |-----------------------------------|
| getGeoLocation | 获取当前用户所在经纬度 | `() => Promise<[number, number]>` |
`markdown:docs/common/control/method.md`
<embed src="@/docs/common/control/method.md"></embed>
## 事件
`markdown:docs/common/control/event.md`
<embed src="@/docs/common/control/event.md"></embed>

View File

@ -41,20 +41,20 @@ scene.on('loaded', () => {
| ------ | ------------------------------------------------------------------------------------------ | ---------------------- |
| layers | 需要被控制的 `layer` 数组,支持传入图层示例或者图层 id不传则默认读取当前 L7 中所有的图层 | `Array<ILayer|string>` |
`markdown:docs/common/control/popper-api.md`
<embed src="@/docs/common/control/popper-api.md"></embed>
`markdown:docs/common/control/btn-api.md`
<embed src="@/docs/common/control/btn-api.md"></embed>
`markdown:docs/common/control/api.md`
<embed src="@/docs/common/control/api.md"></embed>
## 方法
`markdown:docs/common/control/method.md`
<embed src="@/docs/common/control/method.md"></embed>
## 事件
`markdown:docs/common/control/event.md`
<embed src="@/docs/common/control/event.md"></embed>
`markdown:docs/common/control/popper-event.md`
<embed src="@/docs/common/control/popper-event.md"></embed>
`markdown:docs/common/control/select-event.md`
<embed src="@/docs/common/control/select-event.md"></embed>

View File

@ -53,12 +53,12 @@ scene.on('loaded', () => {
| img | Logo 展示的图片 url | `string` |
| href | 点击 Logo 跳转的超链接,不传则纯展示图片,点击不跳转 | `string` |
`markdown:docs/common/control/api.md`
<embed src="@/docs/common/control/api.md"></embed>
## 方法
`markdown:docs/common/control/method.md`
<embed src="@/docs/common/control/method.md"></embed>
## 事件
`markdown:docs/common/control/event.md`
<embed src="@/docs/common/control/event.md"></embed>

View File

@ -47,20 +47,20 @@ export type IControlOptionItem = {
};
```
`markdown:docs/common/control/popper-api.md`
<embed src="@/docs/common/control/popper-api.md"></embed>
`markdown:docs/common/control/btn-api.md`
<embed src="@/docs/common/control/btn-api.md"></embed>
`markdown:docs/common/control/api.md`
<embed src="@/docs/common/control/api.md"></embed>
## 方法
`markdown:docs/common/control/method.md`
<embed src="@/docs/common/control/method.md"></embed>
## 事件
`markdown:docs/common/control/event.md`
<embed src="@/docs/common/control/event.md"></embed>
`markdown:docs/common/control/popper-event.md`
<embed src="@/docs/common/control/popper-event.md"></embed>
`markdown:docs/common/control/select-event.md`
<embed src="@/docs/common/control/select-event.md"></embed>

View File

@ -34,11 +34,11 @@ scene.on('loaded', () => {
| --------- | ---------------------------- | -------------------------------------------------- |
| transform | 转换光标所在经纬度的回调函数 | `(position: [number, number]) => [number, number]` |
`markdown:docs/common/control/api.md`
<embed src="@/docs/common/control/api.md"></embed>
## 方法
`markdown:docs/common/control/method.md`
<embed src="@/docs/common/control/method.md"></embed>
## 事件
@ -46,4 +46,4 @@ scene.on('loaded', () => {
| -------------- | ---------------------------- | -------------------------------------- |
| locationChange | 光标所在经纬度发生变化时触发 | `(position: [number, number]) => void` |
`markdown:docs/common/control/event.md`
<embed src="@/docs/common/control/event.md"></embed>

View File

@ -37,12 +37,12 @@ scene.on('loaded', () => {
| imperial | 展示**英里**格式的比例尺 | `boolean` | `false` |
| updateWhenIdle | 是否只在拖拽和缩放结束后才更新比例尺 | `boolean` | `false` |
`markdown:docs/common/control/api.md`
<embed src="@/docs/common/control/api.md"></embed>
## 方法
`markdown:docs/common/control/method.md`
<embed src="@/docs/common/control/method.md"></embed>
## 事件
`markdown:docs/common/control/event.md`
<embed src="@/docs/common/control/event.md"></embed>

View File

@ -36,7 +36,7 @@ scene.on('loaded', () => {
| zoomOutText | 缩小按钮的展示内容 | `Element` &#124; `string` |
| zoomOutTitle | 缩小按钮的 `title` 属性 | `string` |
`markdown:docs/common/control/api.md`
<embed src="@/docs/common/control/api.md"></embed>
## 方法
@ -45,8 +45,8 @@ scene.on('loaded', () => {
| zoomIn | 放大地图 | `() => void` |
| zoomOut | 缩小底图 | `() => void` |
`markdown:docs/common/control/method.md`
<embed src="@/docs/common/control/method.md"></embed>
## 事件
`markdown:docs/common/control/event.md`
<embed src="@/docs/common/control/event.md"></embed>

View File

@ -3,7 +3,7 @@ title: Marker
order: 3
---
`markdown:docs/common/style.md`
<embed src="@/docs/common/style.md"></embed>
Marker 地图标注 目前只支持 2D dom 标注

View File

@ -3,7 +3,7 @@ title: Marker 标注
order: 3
---
`markdown:docs/common/style.md`
<embed src="@/docs/common/style.md"></embed>
Marker 地图标注 目前只支持 2D Dom 标注

View File

@ -3,7 +3,7 @@ title: Marker Layer
order: 3
---
`markdown:docs/common/style.md`
<embed src="@/docs/common/style.md"></embed>
MarkerLayer 不同于 PointLayer 图层

View File

@ -3,7 +3,7 @@ title: Marker 图层
order: 3
---
`markdown:docs/common/style.md`
<embed src="@/docs/common/style.md"></embed>
MarkerLayer 是 Marker 的升级版Marker 是独立的地图标注MarkerLayer 则是统一管理大量的 Marker 数据。

View File

@ -3,7 +3,7 @@ title: Popup
order: 0
---
`markdown:docs/common/style.md`
<embed src="@/docs/common/style.md"></embed>
地图标注信息窗口,用于展示地图要素的属性信息

View File

@ -3,4 +3,4 @@ title: Canvas Layer
order: 7
---
`markdown:docs/api/canvas.zh.md`
<embed src="@/docs/api/experiment/canvas.zh.md"></embed>

View File

@ -3,4 +3,4 @@ title: Earth Mode
order: 1
---
`markdown:docs/api/earth/earth.zh.md`
<embed src="@/docs/api/experiment/earth/earth.zh.md"></embed>

View File

@ -3,7 +3,7 @@ title: Earth Mode
order: 1
---
`markdown:docs/common/style.md`
<embed src="@/docs/common/style.md"></embed>
## 简介

View File

@ -3,4 +3,4 @@ title: Earth Flyline
order: 2
---
`markdown:docs/api/earth/flyline.zh.md`
<embed src="@/docs/api/experiment/earth/flyline.zh.md"></embed>

View File

@ -3,7 +3,7 @@ title: 飞线
order: 2
---
`markdown:docs/common/style.md`
<embed src="@/docs/common/style.md"></embed>
用户在地球模式下使用飞线图层无需做额外的操作L7 会自动识别地球模式并相关的转化

View File

@ -3,4 +3,4 @@ title: Earth Point
order: 3
---
`markdown:docs/api/earth/point.zh.md`
<embed src="@/docs/api/experiment/earth/point.zh.md"></embed>

View File

@ -3,7 +3,7 @@ title: 点图层
order: 3
---
`markdown:docs/common/style.md`
<embed src="@/docs/common/style.md"></embed>
用户在地球模式下使用点图层无需做额外的操作L7 会自动识别地球模式并相关的转化

View File

@ -3,4 +3,4 @@ title: MultiPass
order: 10
---
`markdown:docs/api/pass.zh.md`
<embed src="@/docs/api/experiment/pass.zh.md"></embed>

View File

@ -3,4 +3,4 @@ title: SimpleCoordinates
order: 1
---
`markdown:docs/api/experiment/simpleCoordinates.zh.md`
<embed src="@/docs/api/experiment/simpleCoordinates.zh.md"></embed>

View File

@ -3,7 +3,7 @@ title: 简单坐标系(非地理坐标系)
order: 1
---
`markdown:docs/common/style.md`
<embed src="@/docs/common/style.md"></embed>
我们通常使用经纬度来描述地理位置,但是在某些特殊的场景,我们往往倾向于使用更加简单的平面坐标系(xyz)来描述位置的相对坐标,为此 L7 提供了简单坐标系的模式。

View File

@ -3,4 +3,4 @@ title: Render Component
order: 3
---
`markdown:docs/api/renderer/three.zh.md`
<embed src="@/docs/api/experiment/three.zh.md"></embed>

View File

@ -3,7 +3,7 @@ title: threejs 引擎兼容
order: 3
---
`markdown:docs/common/style.md`
<embed src="@/docs/common/style.md"></embed>
## 简介

View File

@ -3,4 +3,4 @@ title: WindLayer
order: 7
---
`markdown:docs/api/wind.zh.md`
<embed src="@/docs/api/experiment/wind.zh.md"></embed>

View File

@ -3,4 +3,4 @@ title: Heatmap
order: 0
---
`markdown:docs/api/heatmap_layer/heatmap.zh.md`
<embed src="@/docs/api/heatmap_layer/heatmap.zh.md"></embed>

View File

@ -3,7 +3,7 @@ title: Heatmap
order: 0
---
`markdown:docs/common/style.md`
<embed src="@/docs/common/style.md"></embed>
## 简介

View File

@ -3,4 +3,4 @@ title: Options
order: 1
---
`markdown:docs/api/heatmap_layer/options.zh.md`
<embed src="@/docs/api/heatmap_layer/options.zh.md"></embed>

View File

@ -3,6 +3,6 @@ title: Options
order: 1
---
`markdown:docs/common/style.md`
<embed src="@/docs/common/style.md"></embed>
`markdown:docs/common/layer/options.md`
<embed src="@/docs/common/layer/options.md"></embed>

View File

@ -3,4 +3,4 @@ title: Scale
order: 6
---
`markdown:docs/api/heatmap_layer/scale.zh.md`
<embed src="@/docs/api/heatmap_layer/scale.zh.md"></embed>

View File

@ -3,6 +3,6 @@ title: Scale
order: 6
---
`markdown:docs/common/style.md`
<embed src="@/docs/common/style.md"></embed>
`markdown:docs/common/layer/scale.md`
<embed src="@/docs/common/layer/scale.md"></embed>

View File

@ -3,4 +3,4 @@ title: Shape
order: 3
---
`markdown:docs/api/heatmap_layer/shape.zh.md`
<embed src="@/docs/api/heatmap_layer/shape.zh.md"></embed>

View File

@ -3,7 +3,7 @@ title: Shape
order: 3
---
`markdown:docs/common/style.md`
<embed src="@/docs/common/style.md"></embed>
`shape` 方法用于指定热力图层绘制热力的类型,现在支持经典热力、蜂窝热力、网格热力三种类型。

View File

@ -3,4 +3,4 @@ title: Source
order: 2
---
`markdown:docs/api/heatmap_layer/source.zh.md`
<embed src="@/docs/api/heatmap_layer/source.zh.md"></embed>

View File

@ -3,9 +3,9 @@ title: Source
order: 2
---
`markdown:docs/common/style.md`
<embed src="@/docs/common/style.md"></embed>
`markdown:docs/common/layer/source.md`
<embed src="@/docs/common/layer/source.md"></embed>
🌟 热力图的数据使用和点图层保持一致。

View File

@ -3,4 +3,4 @@ title: Style
order: 4
---
`markdown:docs/api/heatmap_layer/style.zh.md`
<embed src="@/docs/api/heatmap_layer/style.zh.md"></embed>

View File

@ -3,7 +3,7 @@ title: Style
order: 4
---
`markdown:docs/common/style.md`
<embed src="@/docs/common/style.md"></embed>
`style` 方法用于配制图层的样式,相同图层拥有不同的 `shape` 图形,不同 `shape` 的图层 `style` 方法接受不同的参数。

View File

@ -1,6 +0,0 @@
---
title: ImageLayer
order: 0
---
`markdown:docs/api/imagelayer.zh.md`

View File

@ -1,6 +0,0 @@
---
title: Options
order: 1
---
`markdown:docs/api/imageLayer/options.zh.md`

View File

@ -1,8 +0,0 @@
---
title: Options
order: 1
---
`markdown:docs/common/style.md`
`markdown:docs/common/layer/options.md`

View File

@ -1,6 +0,0 @@
---
title: Source
order: 2
---
`markdown:docs/api/imageLayer/source.zh.md`

Some files were not shown because too many files have changed in this diff Show More