Loading example…
import { Scene } from '@antv/l7';
import { DrawCircle, DrawEvent } 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 drawCircle = new DrawCircle(scene, {});
drawCircle.enable();
drawCircle.on(DrawEvent.Change, (allFeatures) => {
console.log(allFeatures);
});
});