antv-l7/docs/common/district/choropleth.zh.md

36 lines
632 B
Markdown
Raw Normal View History

## Usage
1. 按图表方式
```js
import { Choropleth } from '@antv/l7plot';
const choropleth = new Choropleth('container', options);
```
2. 按场景方式
```js
import { Scene, Mapbox } from '@antv/l7';
import { Choropleth } from '@antv/l7plot';
const scene = new Scene({
id: 'container',
map: new Mapbox({
style: 'light',
center: [102.447303, 37.753574],
zoom: 5,
}),
});
const choropleth = new Choropleth(options);
scene.on('loaded', () => {
choropleth.addToScene(scene);
});
```
## API
Choropleth 具体 API 文档移步 [L7Plot 官网](https://l7plot.antv.vision/zh/docs/api/plots/choropleth)。