var polygon = viewer.entities.add({
polygon: {
hierarchy: {
positions: [new Cesium.Cartesian3(6378136.282064899, 2045.931221366772, -1942.1627961569236),
new Cesium.Cartesian3(6378136.401006819, 2059.9615452982202, -2009.4381889716935),
new Cesium.Cartesian3(6378136.323519128, 2120.403271677589, -2010.7963412229758),
new Cesium.Cartesian3(6378136.231778225, 2123.366119812282, -1930.1244599529364)
]
},
perPositionHeight: true,//对每个位置使用options.positions的height,而不使用options.height来确定高度
extrudedHeight: 100,
material: Cesium.Color.BLUE.withAlpha(0.5),
outline: true,
outlineColor: Cesium.Color.BLACK.withAlpha(1)//黑色轮廓线
}
});
viewer.zoomTo(polygon);