antv-l7/docs/api/polygon_layer/fill.zh.md

44 lines
708 B
Markdown
Raw Normal View History

---
title: 填充图
order: 1
---
2021-12-29 17:08:46 +08:00
2020-11-21 03:51:18 +08:00
`markdown:docs/common/style.md`
## 使用
```javascript
import { PolygonLayer } from '@antv/l7';
const layer = new PolygonLayer();
```
### shape
绘制填充图shape 为`fill` 常量不支持数据映射
```javascript
layer.shape('fill');
```
### size
填充图无 size 不需要设置 size
## 额外的 style 配置
- opacityLinear 设置几何填充图的径向渐变
```javascript
style({
opacityLinear: {
enable: true, // true - false
2021-12-29 17:08:46 +08:00
dir: 'in', // in - out
},
});
```
2021-12-29 17:08:46 +08:00
2021-12-29 17:05:50 +08:00
[径向渐变 in](../../../examples/polygon/fill#china_linear_in)
[径向渐变 out](../../../examples/polygon/fill#china_linear_out)
2020-11-16 15:19:41 +08:00
`markdown:docs/common/layer/base.md`