跳到主要内容

示例加载中…

源码
import { Scene } from '@antv/l7';
import { DrawEvent, DrawPolygon } from '@antv/l7-draw';
import { GaodeMap } from '@antv/l7-maps';
const scene = new Scene({
  id: 'map',
  map: new GaodeMap({
    style: 'light',
    center: [120.211944, 30.288946],
    zoom: 7.05,
  }),
});
scene.on('loaded', () => {
  const drawPolygon = new DrawPolygon(scene, {
    areaOptions: {},
  });
  drawPolygon.enable();

  drawPolygon.on(DrawEvent.Change, (allFeatures) => {
    console.log(allFeatures);
  });
});
全站搜索
文档与示例输入关键词开始搜索

输入关键词,查找文档、API 与示例

↑↓选择↵打开Esc关闭