1. A concise explanation of the problem you're experiencing.
When the cluster is opened, the point label that is not within the scope of the cluster fails
Like this:
before :[图片]
after :[图片]
2. A minimal code example. If you've found a bug, this helps us reproduce and repair it.
var viewer = new Cesium.Viewer('cesiumContainer');
var options = {
camera : viewer.scene.camera,
canvas : viewer.scene.canvas
};
var dataSourcePromise = viewer.dataSources.add(Cesium.KmlDataSource.load('../../../../Apps/SampleData/kml/facilities/facilities.kml', options));
dataSourcePromise.then(function(dataSource) {
var pixelRange = 15;
var minimumClusterSize = 3;
var enabled = true;
dataSource.clustering.enabled = enabled;
dataSource.clustering.pixelRange = pixelRange;
dataSource.clustering.minimumClusterSize = minimumClusterSize;
var viewModel = {
pixelRange: pixelRange,
minimumClusterSize: minimumClusterSize
};
Cesium.knockout.track(viewModel);
var toolbar = document.getElementById('toolbar');
Cesium.knockout.applyBindings(viewModel, toolbar);
function subscribeParameter(name) {
Cesium.knockout.getObservable(viewModel, name).subscribe(
function(newValue) {
dataSource.clustering[name] = newValue;
}
);
}
subscribeParameter('pixelRange');
subscribeParameter('minimumClusterSize');
Sandcastle.addToggleButton('Enabled', true, function(checked) {
dataSource.clustering.enabled = checked;
});
});
3. Context. Why do you need to do this? We might know a better way to accomplish your goal.
After opening the cluster, I want all points to show label
4. The Cesium version you're using, your operating system and browser.
Cesium 1.55 / chrome
Thank You , Liu