美文网首页
cesium 绘制geojson

cesium 绘制geojson

作者: Amy_yqh | 来源:发表于2022-08-05 16:04 被阅读0次
    const drawGeojson = () => {
          let geoJSONLayer = Cesium.GeoJsonDataSource.load(guangdongGeoData_full, {
            stroke: Cesium.Color.fromCssColorString("#0d8dd1"),
            fill: Cesium.Color.fromCssColorString("#03040e"),
            strokeWidth: 3,
            markerSymbol: "?",
          }).then((datasource) => {
            viewer.dataSources.add(datasource);
            datasource.clustering.enabled = true; //是否聚合
            datasource.clustering.clusterLabels = false; //聚合数字
            datasource.clustering.clusterBillboards = true; //是否聚合
            datasource.clustering.clusterPoints = true; //是否聚合
            datasource.clustering.show = false; //是否聚合
            datasource.clustering.pixelRange = 20; //聚合范围(单位px)
            datasource.clustering.minimumClusterSize = 20; //最小屏幕聚合对象数值(小于等于该数值,不聚合)
            viewer.flyTo(datasource);
          });
        };
    
    image.png

    相关文章

      网友评论

          本文标题:cesium 绘制geojson

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