您好,您可以参考cesium原生示例
https://cesiumjs.org/Cesium/Apps/Sandcastle/index.html?src=Geometry%20and%20Appearances.html&label=Showcases
关键代码:
entities.add({
polygon : {
hierarchy : new Cesium.PolygonHierarchy(Cesium.Cartesian3.fromDegreesArray([-118.0, 30.0,
-115.0, 30.0,
-117.1, 31.1,
-118.0, 33.0])),
height : 300000.0,
extrudedHeight : 700000.0,
outline : true,
outlineColor : Cesium.Color.WHITE,
outlineWidth : 4,
material : Cesium.Color.fromRandom({alpha : 1.0})
}
});