1 个回答

最简单最暴力的方法就是直接删除圆心,通过控制台可以看到圆心是一个dom元素,通过css选择器找到并删除就可以了
image.png

通过代码也可以看到,就是一个dom

_this.movePoint = new PointWithMarker(map,center.toJSON(),opts.movePoint || {
    content: '<div class="' + (isMobile ? "amap-circle-mobile " : "") + "amap-circle-node amap-circle-" + "moveNode" + '"></div>',
    offset: isMobile ? new AMap.Pixel(-13,-13) : new AMap.Pixel(-8,-8)
});

代码里同时也有事件绑定的内容,那么对这个movePoint进行解绑,也可以实现,需要注意的是,movePoint不是绑定在circleEditor上的,而是在circleEditor.list

function startDraw(){
    circleEditor.open();
  
      let target = circleEditor.list
    target.movePoint.marker.clearEvents("dragging");
    target.movePoint.marker.clearEvents("dragend");
}
推荐问题