Closed Gor-c closed 10 months ago
版本: "@antv/l7": "^2.20.13", "@antv/l7-draw": "^3.1.1", "@antv/l7-maps": "^2.20.13",
示例代码:
import { Scene } from '@antv/l7'; import { GaodeMap } from '@antv/l7-maps'; import { ControlEvent, DrawControl } from '@antv/l7-draw'; const scene = new Scene({ id: 'map', map: new GaodeMap({ style: 'light', center: [116.1608, 40.1119], zoom: 15, }), }); scene.on('loaded', () => { const drawControl = new DrawControl(scene, {}); scene.addControl(drawControl); drawControl.on(ControlEvent.DrawChange, (changeType) => { console.log(changeType); }); });
源码里直接写死了 scene,导致 找不到对象内的 方法,是否应该 使用this 来统一处理
hi @Gor-c, welcome!
版本: "@antv/l7": "^2.20.13", "@antv/l7-draw": "^3.1.1", "@antv/l7-maps": "^2.20.13",
示例代码:
源码里直接写死了 scene,导致 找不到对象内的 方法,是否应该 使用this 来统一处理