mirror of https://gitee.com/antv-l7/antv-l7
docs: 完善官网文档
This commit is contained in:
parent
298bec190c
commit
61c082679a
|
@ -43,6 +43,8 @@ source(data, {
|
|||
|
||||
`markdown:docs/api/line_layer/features/linear.zh.md`
|
||||
|
||||
`markdown:docs/api/line_layer/features/dash.zh.md`
|
||||
|
||||
`markdown:docs/api/line_layer/features/animate.zh.md`
|
||||
|
||||
`markdown:docs/api/line_layer/features/texture.zh.md`
|
||||
|
|
|
@ -55,6 +55,8 @@ source(data, {
|
|||
|
||||
`markdown:docs/api/line_layer/features/linear.zh.md`
|
||||
|
||||
`markdown:docs/api/line_layer/features/dash.zh.md`
|
||||
|
||||
`markdown:docs/api/line_layer/features/animate.zh.md`
|
||||
|
||||
`markdown:docs/api/line_layer/features/texture.zh.md`
|
||||
|
|
|
@ -0,0 +1,27 @@
|
|||
### 设置虚线
|
||||
|
||||
线图层通过在 style 中设置线的类型,同时指定虚线部分和实线部分
|
||||
|
||||
```javascript
|
||||
const layer = new LineLayer({})
|
||||
.source(data)
|
||||
.size(1.5)
|
||||
.shape('line')
|
||||
.color('标准名称', ['#5B8FF9', '#5CCEA1', '#F6BD16'])
|
||||
.active(true)
|
||||
.style({
|
||||
lineType: 'dash',
|
||||
dashArray: [5, 5],
|
||||
});
|
||||
scene.addLayer(layer);
|
||||
```
|
||||
|
||||
<img width="450px" style="display: block;margin: 0 auto;" alt="案例" src='https://gw.alipayobjects.com/mdn/rms_816329/afts/img/A*pb3FRZnaa0AAAAAAAAAAAAAAARQnAQ'>
|
||||
|
||||
- lineType
|
||||
默认为 solid,表示实线,dash 表示虚线
|
||||
- dashArray[len1: number, len2: number]
|
||||
len1 实线长度
|
||||
len2 间隔长度
|
||||
|
||||
[在线案例](../../../examples/line/arc#trip_arc_dark_linear)
|
|
@ -39,6 +39,8 @@ source(data, {
|
|||
|
||||
`markdown:docs/api/line_layer/features/linear.zh.md`
|
||||
|
||||
`markdown:docs/api/line_layer/features/dash.zh.md`
|
||||
|
||||
`markdown:docs/api/line_layer/features/animate.zh.md`
|
||||
|
||||
`markdown:docs/api/line_layer/features/texture.zh.md`
|
||||
|
|
|
@ -83,6 +83,8 @@ lineLayer.size([1, 2]); // 宽度为1,高度2
|
|||
|
||||
`markdown:docs/api/line_layer/features/linear.zh.md`
|
||||
|
||||
`markdown:docs/api/line_layer/features/dash.zh.md`
|
||||
|
||||
`markdown:docs/api/line_layer/features/animate.zh.md`
|
||||
|
||||
`markdown:docs/api/line_layer/features/texture.zh.md`
|
||||
|
|
|
@ -47,6 +47,8 @@ layer.size('height', []);
|
|||
|
||||
`markdown:docs/api/line_layer/features/linear.zh.md`
|
||||
|
||||
`markdown:docs/api/line_layer/features/dash.zh.md`
|
||||
|
||||
`markdown:docs/api/line_layer/features/border.zh.md`
|
||||
|
||||
`markdown:docs/api/line_layer/features/animate.zh.md`
|
||||
|
|
|
@ -98,7 +98,8 @@ fetch(
|
|||
.then(res => res.json())
|
||||
.then(data => {
|
||||
const layer = new LineLayer({
|
||||
zIndex: 0
|
||||
zIndex: 0,
|
||||
depth: true
|
||||
})
|
||||
.source(data)
|
||||
.size(1)
|
||||
|
|
Loading…
Reference in New Issue