diff --git a/CHANGES.md b/CHANGES.md index 7889cea18895..3a07b8ac5392 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -19,6 +19,7 @@ Change Log * Reduces size of approximateTerrainHeights.json by rounding the numbers [#7959](https://github.com/AnalyticalGraphicsInc/cesium/pull/7959) * Fixed undefined `quadDetails` error from zooming into the map really close. [#8011](https://github.com/AnalyticalGraphicsInc/cesium/pull/8011) * Fixed triangulation bug in polygons using `ArcType.RHUMB`. [#8042](https://github.com/AnalyticalGraphicsInc/cesium/issues/8042) +* Fixed labels don't show for individual entities in datasources when clustering is enabled [#6087](https://github.com/AnalyticalGraphicsInc/cesium/issues/6087) ### 1.61 - 2019-09-03 diff --git a/CONTRIBUTORS.md b/CONTRIBUTORS.md index ea19a56de51d..cf2c74fa7f9c 100644 --- a/CONTRIBUTORS.md +++ b/CONTRIBUTORS.md @@ -69,6 +69,7 @@ See [CONTRIBUTING.md](CONTRIBUTING.md) for details on how to contribute to Cesiu * [Nathan Schulte](https://github.com/nmschulte) * [Jed Fong](https://github.com/jedfong) * [Brandon McAllister](https://github.com/bmcallis) + * [Eric Strabala](https://github.com/emstrabala) * [Inovaworks](http://www.inovaworks.com/) * [Sergio Flores](https://github.com/relfos) * [CubeWerx Inc.](http://www.cubewerx.com/) diff --git a/Source/DataSources/EntityCluster.js b/Source/DataSources/EntityCluster.js index 6dddfde31ed8..20910be57032 100644 --- a/Source/DataSources/EntityCluster.js +++ b/Source/DataSources/EntityCluster.js @@ -116,8 +116,8 @@ define([ expandBoundingBox(result, pixelRange); - if (entityCluster._clusterLabels && !defined(item._labelCollection) && defined(item.id) && hasLabelIndex(entityCluster, item.id) && defined(item.id._label)) { - var labelIndex = entityCluster._collectionIndicesByEntity[item.id]; + if (entityCluster._clusterLabels && !defined(item._labelCollection) && defined(item.id) && hasLabelIndex(entityCluster, item.id.id) && defined(item.id._label)) { + var labelIndex = entityCluster._collectionIndicesByEntity[item.id.id].labelIndex; var label = entityCluster._labelCollection.get(labelIndex); var labelBBox = Label.getScreenSpaceBoundingBox(label, coord, labelBoundingBoxScratch); expandBoundingBox(labelBBox, pixelRange); @@ -130,8 +130,8 @@ define([ function addNonClusteredItem(item, entityCluster) { item.clusterShow = true; - if (!defined(item._labelCollection) && defined(item.id) && hasLabelIndex(entityCluster, item.id) && defined(item.id._label)) { - var labelIndex = entityCluster._collectionIndicesByEntity[item.id]; + if (!defined(item._labelCollection) && defined(item.id) && hasLabelIndex(entityCluster, item.id.id) && defined(item.id._label)) { + var labelIndex = entityCluster._collectionIndicesByEntity[item.id.id].labelIndex; var label = entityCluster._labelCollection.get(labelIndex); label.clusterShow = true; }