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

DrawingManager.js skipEditing参数不生效,在操作完绘画以后不触发overlaycomplete事件 #48

Open
liuyangjiayou opened this issue Apr 12, 2023 · 1 comment

Comments

@liuyangjiayou
Copy link

  drawingManager = new (window as any).BMapGLLib.DrawingManager(mapInstance, {
    // isOpen: true,        // 是否开启绘制模式
    enableCalculate: false, // 绘制是否进行测距测面
    enableSorption: true,
    sorptiondistance: 20,
    circleOptions: notExistOverlayStyle, // 圆的样式
    polylineOptions: notExistOverlayStyle, // 线的样式
    polygonOptions: notExistOverlayStyle, // 多边形的样式
    rectangleOptions: notExistOverlayStyle, // 矩形的样式
    skipEditing: true,
  });
  // 操作完成事件
  drawingManager.addEventListener('overlaycomplete', function(e) {
      // 此处执行
  });
@1048034876
Copy link

setTimeout(() => {
document.getElementById('platform').children[1].children[length - 1].style.display = 'unset'
}, 1000)
官方demo绘制完成会有个勾叉区域,点击√才会触发,但是这个节点一直是display:none,我手动加样式设置展示好像可以了,你试试。我是 this.map.setMapType(BMAP_EARTH_MAP); 绘制工具才会出这个问题,不用卫星影像好像都是正常的

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