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

632 B

Usage

  1. 按图表方式
import { Choropleth } from '@antv/l7plot';

const choropleth = new Choropleth('container', options);
  1. 按场景方式
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 官网