const drawMoveLine=()=>{
return new Promise((resolve, reject) => {
console.log(handlerLine,'handlerLine');
if (!handlerLine) {
handlerLine=null
handlerLine = new Cesium.DrawHandler(getEarth().viewer, Cesium.DrawMode.Line, Cesium.ClampMode.Space);
} else {
handlerLine.clear()
}
handlerLine.activate()
handlerLine.activeEvt.addEventListener(function (isActive) {
if (isActive == true) {
getEarth().viewer.enableCursorStyle = false;
getEarth().viewer._element.style.cursor = '';
} else {
getEarth().viewer.enableCursorStyle = true;
}
});
handlerLine.movingEvt.addEventListener(function (windowPosition) {
});
handlerLine.drawEvt.addEventListener(function (result) {
console.log(result, 'resultresult');
handlerLine.deactivate()
resolve(result)
});
// handlerLine.activate();
})
}