From 06fedca8335395d5e22a58104544e7a5dc3a51b7 Mon Sep 17 00:00:00 2001 From: susiwen8 Date: Thu, 6 Jan 2022 14:31:18 +0800 Subject: [PATCH] =?UTF-8?q?docs:=20=E5=9C=B0=E7=90=83=E6=A8=A1=E5=BC=8F?= =?UTF-8?q?=E6=96=87=E6=A1=A3=20(#918)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docs/api/earth/earth.zh.md | 21 ++++++++----- docs/api/earth/flyline.zh.md | 61 +++++++++--------------------------- docs/api/earth/point.zh.md | 56 ++++++--------------------------- 3 files changed, 37 insertions(+), 101 deletions(-) diff --git a/docs/api/earth/earth.zh.md b/docs/api/earth/earth.zh.md index 73b4f756d9..c99a475965 100644 --- a/docs/api/earth/earth.zh.md +++ b/docs/api/earth/earth.zh.md @@ -20,12 +20,19 @@ import { Earth } from '@antv/l7-maps'; ### 点图层 -- 平面点: `shape: 'circle'` -- 圆柱点: `shape: 'cylinder'` +**平面点: circle** + +案例 + +**圆柱点: cylinder** + +案例 ### 线图层 -- 3D 弧线: `shape: 'arc3d'` +**3D 弧线: arc3d** + +案例 ## 使用 @@ -79,7 +86,7 @@ scene.on('loaded', () => { 作为 l7-maps 的基础地图类型,`Earth` 提供了地球系统的相机系统,目前只需要传入一个空对象。 -- args: {} +- args: **{}** ```js import { Scene, Earth } from '@antv/l7-maps'; @@ -171,7 +178,7 @@ const earthlayer = new EarthLayer() }); ``` -L7 地球图层 +L7 地球图层 ### 地球内发光/大气图层 atomLayer @@ -187,7 +194,7 @@ const atomLayer = new EarthLayer() }); ``` -L7 地球图层大气效果 +L7 地球图层大气效果 ### 地球内外发光/辉光图层 bloomLayer @@ -202,4 +209,4 @@ const bloomLayer = new EarthLayer() }); ``` -L7 地球图层辉光效果 +L7 地球图层辉光效果 diff --git a/docs/api/earth/flyline.zh.md b/docs/api/earth/flyline.zh.md index 81b6f7bcf4..b53964a51b 100644 --- a/docs/api/earth/flyline.zh.md +++ b/docs/api/earth/flyline.zh.md @@ -5,56 +5,23 @@ order: 3 `markdown:docs/common/style.md` -## 简介 - 用户在地球模式下使用飞线图层无需做额外的操作,L7 会自动识别地球模式并相关的转化 -L7地球飞线图层 - ## 使用 +地球飞线图通过 `LineLayer` 和 `EarthLayer` 实例化 + ```javascript -import { Scene, EarthLayer, LineLayer } from '@antv/l7'; -import { Earth } from '@antv/l7-maps'; -const scene = new Scene({ - id: 'map', - map: new Earth({}), -}); - -const flydata = [ - { - coord: [ - [104.195397, 35.86166], - [100.992541, 15.870032], - ], - }, -]; -const flyLine = new LineLayer({ blend: 'normal' }) - .source(flydata, { - parser: { - type: 'json', - coordinates: 'coord', - }, - }) - .color('#b97feb') - .shape('arc3d') - .size(0.5); - -const earthlayer = new EarthLayer() - .source( - 'https://gw.alipayobjects.com/mdn/rms_23a451/afts/img/A*3-3NSpqRqUoAAAAAAAAAAAAAARQnAQ', - { - parser: { - type: 'image', - }, - }, - ) - .color('#2E8AE6') - .shape('base'); - -scene.on('loaded', () => { - scene.addLayer(earthlayer); - scene.addLayer(flyLine); - earthlayer.setEarthTime(4.0); -}); +import { EarthLayer, LineLayer } from '@antv/l7'; ``` + +L7地球飞线图层 + +### shape + +地球飞线图层 shape 只支持 **arc3d** + +### 其他配置 +剩下的配置和[线图层](../line_layer/linelayer)一致 + +[在线案例](../../../examples/earth/arc3d#flyline) diff --git a/docs/api/earth/point.zh.md b/docs/api/earth/point.zh.md index fcf20138e5..13f6f0f892 100644 --- a/docs/api/earth/point.zh.md +++ b/docs/api/earth/point.zh.md @@ -5,56 +5,18 @@ order: 3 `markdown:docs/common/style.md` -## 简介 - 用户在地球模式下使用点图层无需做额外的操作,L7 会自动识别地球模式并相关的转化 -## 示例图片 - -L7 地球点图层 - ## 使用 +地球点图层通过 `PointLayer` 和 `EarthLayer` 实例化 + ```javascript -import { Scene, PointLayer, EarthLayer } from '@antv/l7'; -import { Earth } from '@antv/l7-maps'; -const scene = new Scene({ - id: 'map', - map: new Earth({}), -}); - -const d = [{ lng: 121.61865234375, lat: 25.29437116258816 }]; - -const pointlayer = new PointLayer() - .source(d, { - parser: { - type: 'json', - x: 'lng', - y: 'lat', - }, - }) - .shape('circle') - .color('#f00') - .size(10) - .active(true); - -const earthlayer = new EarthLayer() - .source( - 'https://gw.alipayobjects.com/mdn/rms_23a451/afts/img/A*3-3NSpqRqUoAAAAAAAAAAAAAARQnAQ', - { - parser: { - type: 'image', - }, - }, - ) - .style({ - globelOtions: { - ambientRatio: 1, // 环境光 - }, - }); - -scene.on('loaded', () => { - scene.addLayer(earthlayer); - scene.addLayer(pointlayer); -}); +import { PointLayer, EarthLayer } from '@antv/l7'; ``` +L7 地球点图层 + +[在线案例](../../../examples/earth/point#point) + +### 配置项 +和 [`PontLayer`](../point_layer/pointlayer) 一致 \ No newline at end of file