docs: 官网文档完善

This commit is contained in:
shihui 2022-01-06 19:48:35 +08:00
parent 738cebd1af
commit bb7977e71c
3 changed files with 31 additions and 0 deletions

View File

@ -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
});
```
<img width="450px" style="display: block;margin: 0 auto;" alt="案例" src='https://gw.alipayobjects.com/mdn/rms_816329/afts/img/A*PsbNRpboEKEAAAAAAAAAAAAAARQnAQ'>
[在线案例](../../../examples/gallery/animate#animate_path_texture)

View File

@ -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`

View File

@ -32,6 +32,8 @@ scene.on('loaded', () => {
trailLength: 2 // 流线长度
})
.style({
borderWidth: 0.35, // 默认文 0最大有效值为 0.5
borderColor: '#888', // 默认为 #ccc
lineTexture: true, // 开启线的贴图功能
iconStep: 20 // 设置贴图纹理的间距
});