跳到主要内容

示例加载中…

源码
import { Scene } from '@antv/l7';
import { DrawEvent, DrawPoint } 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 drawPoint = new DrawPoint(scene, {});
  drawPoint.enable();

  drawPoint.on(DrawEvent.Change, (allFeatures) => {
    console.log(allFeatures);
  });

  setInterval(() => {
    console.log(scene.getZoom(), scene.getCenter());
  }, 2000);
});
全站搜索
文档与示例输入关键词开始搜索

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

↑↓选择↵打开Esc关闭