본문 바로가기
개발, IT

[Cesium] 웹기반 3차원 GIS에 물수면 표현

by Nabi™ 2021. 1. 8.

에베레스트의 하천에 물수면 표현해보기

 

var viewer = new Cesium.Viewer("cesiumContainer", {
  terrainProvider: Cesium.createWorldTerrain({
    requestVertexNormals: true, //Needed to visualize slope
  }),
});

var e = viewer.entities.add({
          polygon: {
            hierarchy: {
              positions: [
                new Cesium.Cartesian3.fromDegrees(
                  86.7048982141, 27.8580186063, 0
                ),
                new Cesium.Cartesian3.fromDegrees(
                  86.7896841766, 27.8598190574, 0
                ),
		new Cesium.Cartesian3.fromDegrees(
                  86.7458183708, 27.7010079232, 0
                ),
		new Cesium.Cartesian3.fromDegrees(
                  86.6996296588, 27.7029535402,  0
                ),
              ],
            },
            height:3000,
            material: Cesium.Color.BLUE.withAlpha(1.0),
          },
        });

viewer.camera.flyTo({
      destination : Cesium.Cartesian3.fromDegrees(86.7048982141, 27.8580186063,  20000),
      orientation : {
        heading : Cesium.Math.toRadians(100.0),
        pitch : Cesium.Math.toRadians(-35.0),
      }
    });

 

댓글