Cesium点聚合功能
initCluser() {
new Cesium.GeoJsonDataSource().load("static/data/").then(geoJsonDataSource => {
this.geoJsonDataSource = geoJsonDataSource;
this.viewer.dataSources.add(geoJsonDataSource);
geoJsonDataSource.clustering.enabled = true;
geoJsonDataSource.clustering.pixelRange = 15;
geoJsonDataSource.clustering.minimumClusterSize = 3;
this.setClusterEvent(geoJsonDataSource);
//设置相机的图标
geoJsonDataSource.entities.values.forEach(entity => {
entity.billboard.image = 'static/images/'
entity.type = "cluser";
//如果有高度信息 需要重新赋值
// let cartographic = (._value);
// let longitude = ();
// let latitude = ();
// = Cesium.(longitude, latitude, Number(entity._properties.Z._value));
});
})
},