cesium 绘制geojson

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)