Cesium点聚合功能

时间:2025-05-12 10:23:35
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)); }); }) },

相关文章