let viewer = new Cesium.Viewer('cesiumContainer');
//平面
let plane = viewer.entities.add({
name: '带边框的平面',
position: Cesium.Cartesian3.fromDegrees(-107.0, 40.0, 300000.0),//经纬度转世界坐标
plane: {
show: true,//是否显示
plane: new Cesium.Plane(Cesium.Cartesian3.UNIT_Z, 0.0), //朝向屏幕
dimensions: new Cesium.Cartesian2(400000.0, 300000.0), //二维平面
material: Cesium.Color.BLUE,//材质
fill: true,//填充
outline: true,//显示边框
outlineColor: Cesium.Color.YELLOW,//边框颜色
}
});
//点
let point = viewer.entities.add({
name: '点',
position: Cesium.Cartesian3.fromDegrees(-75.0, 30.0),//经纬度转世界坐标
point: {
show: true,
color: Cesium.Color.GREEN,
pixelSize: 20,
outlineColor: Cesium.Color.YELLOW,
outlineWidth: 3,
}
});
//线
let line = viewer
cesium-点线面
最新推荐文章于 2024-05-20 11:01:35 发布
![](https://img-home.csdnimg.cn/images/20240711042549.png)