cesium 实体创建

{
          position: Cartesian3,
          point: {
            pixelSize: 8,
            outlineColor: Cesium.Color.BLACK, // 点的轮廓颜色
            outlineWidth: 2, // 点的轮廓宽度
            color: ThemeConfig.pointColor
          }
        }

线

{
      name: '划线',
      polyline: {
        positions: [Cartesian3],
        width: 1,
        material: Cesium.Color.fromCssColorString('#51ff00')
      }
    }

矩形

多边形

pointsArray 经纬度交替一维数组

{
    name: '画多边形',
    polygon: {
      hierarchy:  new   Cesium.PolygonHierarchy(Cesium.Cartesian3.fromDegreesArray(pointsArray)),
      material: Cesium.Color.fromCssColorString('#389a4b').withAlpha(0.5),
      perPositionHeight: false // true:不贴地/false:贴地
    }
  }
上一篇
下一篇