海量点

作者: xueyueshuai | 来源:发表于2023-11-13 16:44 被阅读0次
        // 海量点
        addPoints(list) {
          let viewer = this.viewer
          let Cesium = getCesium()
    
          let color = new Cesium.Color.fromCssColorString('#FED976').withAlpha(0.6);
    
    
          //Primitive方式
          let pointPrimitives = viewer.scene.primitives.add(
            new Cesium.PointPrimitiveCollection()
          );
    
          list.forEach((item) => {
            let primitive = pointPrimitives.add({
              id: item['mmsi'],
              pixelSize: 6,
              color: color,
              position: Cesium.Cartesian3.fromDegrees(item['lon'] / 1000000, item['lat'] / 1000000)
            });
            primitive.type = 'ship'
            primitive.shipId = item['mmsi']
          })
        }
    

    相关文章

      网友评论

          本文标题:海量点

          本文链接:https://www.haomeiwen.com/subject/vjddwdtx.html