CompassControl
小于 1 分钟
CompassControl
指北针控件 CompassControl 是一个UI用于方向显示的控件,添加后默认位置在左下角,此控件可跟随相机角度变化。
构造
new VT.CompassControl({
// 指北初始角度
startDegree: 0,
});
添加方法:
const compassControl = new VT.CompassControl({
startDegree: 30,
});
// 添加控件
viewer.addControl(compassControl);
// 移除控件
viewer.removeControl(compassControl)
方法
setStartDegree
设置指北初始角度
- setStartDegree(degree)
- 类型:
Function
- 参数:
- degree
{Number}
角度值,度数,如 12、30、90
- degree
- 返回:无