前言
api地址:
https://cesiumjs.org/refdoc/
沙盒地址:
https://cesiumjs.org/Cesium/Apps/Sandcastle/index.html?src=Corridor.html
api汉化
名称 | 作用 |
---|---|
positions | 记录位置的 |
width | 走廊宽度 |
cornerType | 走廊边角形状,通俗的讲,就是直角还是圆角 |
height | 走廊距离地表高度 |
heightReference | 走廊相对高度 |
extrudeheight | 走廊厚度 |
extrudedHeightReference | 走廊相对厚度 |
show | 是否可见 |
fill | 是否填充 |
materical | 填充颜色 |
outline | 是否显示边界线 |
outlinecolor | 边界线颜色 |
outlinewidth | 边界线宽度 |
granularity | 不懂有什么用 |
shadows | 阴影 |
distanceDisplayCondition | 不懂有什么用 |
classificationType | 不懂有什么用 |
zindex | 遮盖顺序 |
例子
//绘制通道
corridorDraw: function () {
var corridor = viewer.entities.add({
name: "巡视通道",
corridor: {
positions: Cesium.Cartesian3.fromDegreesArray([
-100.0, 40.0,
-105.0, 40.0,
-105.0, 35.0
]),
width: 100000.0,
material: Cesium.Color.YELLOW.withAlpha(0.5),
extrudedHeight:10000
}
});
viewer.zoomTo(corridor);
}