首頁 / 浏覽問題 / 三維GIS / 問題詳情
Cesium繪制實體出(chū)現裂縫
33EXP 2024年07月04日

如圖

加載代碼如下:

window.viewer.scene.primitives.add(new Cesium.GroundPrimitive({
                        geometryInstances: new Cesium.GeometryInstance({
                          geometry: new Cesium.PolygonGeometry({
                            polygonHierarchy: new Cesium.PolygonHierarchy(Cesium.Cartesian3.fromDegreesArray(areaPointArr)),
                          }),
                        }),
                        appearance: new Cesium.MaterialAppearance({
                          material: Cesium.Material.fromType('Color', {
                            color: Cesium.Color.fromBytes(style[k].red, style[k].green, style[k].blue, 255)
                          }),
                        }),
                        // classificationType: Cesium.ClassificationType.S3M_TILE,
                        allowPicking: false,
                      }));

已關閉深度檢測(viewer.scene.globe.depthTestAgainstTerrain = false)

1個(gè)回答

您好,使用上(shàng)述代碼時(shí)出(chū)現了(le/liǎo)地(dì / de)圖上(shàng)出(chū)現裂縫的(de)情況,通常這(zhè)種情況是(shì)由于(yú)多邊形幾何不(bù)完整導緻的(de)

1、确保 areaPointArr 數組中的(de)經緯度坐标按照正确的(de)順序閉合,即首尾相連。

2、您是(shì)使用的(de)地(dì / de)形數據嗎?繪制的(de)是(shì)有高度的(de)面嗎?
1,680EXP 2024年07月04日
島洞多邊形導緻的(de),感謝
...