相关代码如下,只能在地图上看到,加了倾斜模型就不行,clampToS3M、classificationType设置无效
let color = Cesium.Color.fromCssColorString("#FF0000").withAlpha(0.8);
let height = 0;
window.viewer.scene.primitives.add(
new Cesium.ClassificationPrimitive({
geometryInstances: new Cesium.GeometryInstance({
geometry: new Cesium.PolygonGeometry({
polygonHierarchy: new Cesium.PolygonHierarchy(
Cesium.Cartesian3.fromDegreesArray(ptArr)
),
height,
extrudedHeight: height + 5000
}),
attributes: {
color: Cesium.ColorGeometryInstanceAttribute.fromColor(color),
}
}),
releaseGeometryInstances: false,
// clampToS3M: true,
// classificationType: Cesium.ClassificationType.S3M_TILE,
// classificationType: Cesium.ClassificationType.BOTH,
}));