Skip to main content

Cesium 贴地设置-primitive

primitive贴地线

Cesium对primitive线有专门的GroundPolylinePrimitive贴地线primitive和GroundPolylineGeometry贴地线几何

viewer.scene.primitives.add(
new Cesium.GroundPolylinePrimitive({//贴地primitive线
      geometryInstances: new Cesium.GeometryInstance({
        geometry: new Cesium.GroundPolylineGeometry({//贴地线几何
          positions:Cesium.Cartesian3.fromDegreesArray([90, 28, 100, 28])
        })
      }),
      appearance: new Cesium.PolylineMaterialAppearance({
        material: Cesium.Material.fromType('Color', {
          color: Cesium.Color.RED
        })
      })
    })
    )

注册VIP

如果已经是VIP,请直接登陆 登陆

发表回复