Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

在已有的图层上怎么实现边界吸附? #21

Open
Cherry-Ran opened this issue Oct 26, 2021 · 1 comment
Open

在已有的图层上怎么实现边界吸附? #21

Cherry-Ran opened this issue Oct 26, 2021 · 1 comment

Comments

@Cherry-Ran
Copy link

我在页面上已经绘制了几个多边形图层,然后画图工具 enableSorption: true也是设置为true了的,怎么在画图的时候也有边界吸附?

@MengJiandu
Copy link

源代码这样的

BMapGLLib.DrawingManager = function (map, opts) {
     if (!map) {
         return;
     }

     instances.push(this);

     opts = opts || {};
     this.overlays = []; // 用来存储覆盖物

     this._initialize(map, opts);
 };

初始化的时候为DrawingManager对象的overlays赋值 就可以吸附已有的图层了

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants