使用产品:SuperMap iClient3D for Cesium
问题详细描述:基于天地图影像地图作为底图,在影像地图上面绘制面,有部分面显示不出来,于是想请问使用DrawHandler的时候,绘制出来的面的高度可以设置嘛?有没有代码示例?
代码片段如下:
entityHandler(chooseDrawMode=2){
let DrawMode= ["点","线","面","地标"];
let clampMode = 0;
if(chooseDrawMode === 1){
window.handler = new Cesium.DrawHandler(window.viewer,chooseDrawMode,clampMode);
}else{
window.handler = new Cesium.DrawHandler(window.viewer,chooseDrawMode,Cesium.ClampMode.Space);
}
window.handler.activeEvt.addEventListener(function(isActive){
if(isActive == true){
window.viewer.enableCursorStyle = false;
window.viewer._element.style.cursor = '';
document.querySelector('body').classList.remove('drawCur');
}else{
window.viewer.enableCursorStyle = true;
document.querySelector('body').classList.remove('drawCur');
}
});
window.handler.movingEvt.addEventListener(function(windowPosition){
tooltip.showAt(windowPosition,'<p>点击绘制'+DrawMode[chooseDrawMode]+',右击绘制结束</p>');
});
window.handler.drawEvt.addEventListener(function(result){
console.log(result,'绘制的result')
tooltip.setVisible(false);
});
window.handler.activate();
},