L7Draw
L7Draw copied to clipboard
🤔 [QUESTION]使用js加载antv/l7-draw绘制多边形开启吸附功能就报错
🐛 Question description [Please make everyone to understand it]
只要开启默认吸附,直接报错,如何解决。 测试了多遍,推测应该是开始必须有一个图形,然后才能吸附。。。那么怎么动态开启吸附功能。。先画一个,然后Drawer销毁再配新的Drawer开吸附?
let polygonDrawer = null; scene.on('loaded', () => { polygonDrawer = new L7.Draw.DrawPolygon(scene, { adsorbOptions: {}, }); polygonDrawer.enable();
});
💻 Link to minimal reproduction
Please provide a link by forking these links L7 Draw or GitHub repo. What is a minimal reproduction, and why is it required?
🏞 Expected result
🚑 Any additional [like screenshots]
- L7Draw Version:
- Platform: