From bb7977e71cca1c56cf6b1557c68c495ce063bf5c Mon Sep 17 00:00:00 2001 From: shihui Date: Thu, 6 Jan 2022 19:48:35 +0800 Subject: [PATCH] =?UTF-8?q?docs:=20=E5=AE=98=E7=BD=91=E6=96=87=E6=A1=A3?= =?UTF-8?q?=E5=AE=8C=E5=96=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docs/api/line_layer/features/border.zh.md | 27 +++++++++++++++++++ docs/api/line_layer/path.zh.md | 2 ++ .../animate/demo/animate_path_texture.js | 2 ++ 3 files changed, 31 insertions(+) create mode 100644 docs/api/line_layer/features/border.zh.md diff --git a/docs/api/line_layer/features/border.zh.md b/docs/api/line_layer/features/border.zh.md new file mode 100644 index 0000000000..d4d744ea60 --- /dev/null +++ b/docs/api/line_layer/features/border.zh.md @@ -0,0 +1,27 @@ +### 边框 + +线图层支持在 style 中设置边框的宽度和颜色 + +```javascript +const layer = new LineLayer({}) + .source(data, { + parser: { + type: 'csv', + x: 'lng1', + y: 'lat1', + x1: 'lng2', + y1: 'lat2', + }, + }) + .size(1) + .shape('arc') + .color('#8C1EB2') + .style({ + borderWidth: 0.35, // 默认文 0,最大有效值为 0.5 + borderColor: '#888', // 默认为 #ccc + }); +``` + +案例 + +[在线案例](../../../examples/gallery/animate#animate_path_texture) diff --git a/docs/api/line_layer/path.zh.md b/docs/api/line_layer/path.zh.md index 0e958cae69..652d54e790 100644 --- a/docs/api/line_layer/path.zh.md +++ b/docs/api/line_layer/path.zh.md @@ -47,6 +47,8 @@ layer.size('height', []); `markdown:docs/api/line_layer/features/linear.zh.md` +`markdown:docs/api/line_layer/features/border.zh.md` + `markdown:docs/api/line_layer/features/animate.zh.md` `markdown:docs/api/line_layer/features/texture.zh.md` diff --git a/examples/gallery/animate/demo/animate_path_texture.js b/examples/gallery/animate/demo/animate_path_texture.js index 62f721ddfc..b9ae1616de 100644 --- a/examples/gallery/animate/demo/animate_path_texture.js +++ b/examples/gallery/animate/demo/animate_path_texture.js @@ -32,6 +32,8 @@ scene.on('loaded', () => { trailLength: 2 // 流线长度 }) .style({ + borderWidth: 0.35, // 默认文 0,最大有效值为 0.5 + borderColor: '#888', // 默认为 #ccc lineTexture: true, // 开启线的贴图功能 iconStep: 20 // 设置贴图纹理的间距 });