首页 / 浏览问题 / WebGIS / 问题详情
超图FAQ: classic中想单独监听drag事件
64,468EXP 2021年03月17日
超图FAQ: classic中想单独监听drag事件

1个回答

超图FAQ: var control = new SuperMap.Control(); SuperMap.Util.extend(control, { draw: function () { this.box = new SuperMap.Handler.Drag( control, {"move": function(e){ var lonlat = map.getLonLatFromPixel(new SuperMap.Pixel(e.x, e.y)); // map.panTo(lonlat) console.log(e) }, "done":function(e){ } }, ); this.box.activate(); }, }); map.addControl(control); control.activate(); control.draw() 通过这种重新自己构造的方式可以监听到,但是可能会于地图的拖拽控件有冲突
64,468EXP 2021年03月17日
热门文章
关注我们
...