diff --git a/CHANGES.md b/CHANGES.md index 6bc56c311746..bf9db68cb7d7 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -6,6 +6,7 @@ Change Log ##### Fixes :wrench: * Fixed a bug that caused missing segments for ground polylines with coplanar points over large distances and problems with polylines containing duplicate points. [#7885](https://github.com/AnalyticalGraphicsInc/cesium//pull/7885) * Fixed a bug where billboards were not pickable when zoomed out completely in 2D View. [#7908](https://github.com/AnalyticalGraphicsInc/cesium/pull/7908) +* Fixed a bug in the inspector where the min/max height values of a picked tile were undefined. [#7904](https://github.com/AnalyticalGraphicsInc/cesium/pull/7904) ### 1.58.1 - 2018-06-03 _This is an npm-only release to fix a publishing issue_ diff --git a/CONTRIBUTORS.md b/CONTRIBUTORS.md index 99ca86db2caa..8e1df7e7dc27 100644 --- a/CONTRIBUTORS.md +++ b/CONTRIBUTORS.md @@ -208,3 +208,4 @@ See [CONTRIBUTING.md](CONTRIBUTING.md) for details on how to contribute to Cesiu * [Alexander Popiak](https://github.com/apopiak) * [Trubie Turner](https://github.com/flexei) * [Merijn Wijngaard](https://github.com/mwijngaard) +* [Dennis Adams](https://github.com/dennisadams) diff --git a/Source/Scene/Globe.js b/Source/Scene/Globe.js index c43425389d37..03746c279f45 100644 --- a/Source/Scene/Globe.js +++ b/Source/Scene/Globe.js @@ -675,7 +675,11 @@ define([ if (!defined(rayOrigin)) { // intersection point is outside the ellipsoid, try other value // minimum height (-11500.0) for the terrain set, need to get this information from the terrain provider - var magnitude = Math.min(defaultValue(tile.data.minimumHeight, 0.0), -11500.0); + var minimumHeight; + if (defined(tile.data.tileBoundingRegion)) { + minimumHeight = tile.data.tileBoundingRegion.minimumHeight; + } + var magnitude = Math.min(defaultValue(minimumHeight, 0.0), -11500.0); // multiply by the *positive* value of the magnitude var vectorToMinimumPoint = Cartesian3.multiplyByScalar(surfaceNormal, Math.abs(magnitude) + 1, scratchGetHeightIntersection); diff --git a/Source/Scene/QuadtreePrimitive.js b/Source/Scene/QuadtreePrimitive.js index d923303b3313..a892d8d28126 100644 --- a/Source/Scene/QuadtreePrimitive.js +++ b/Source/Scene/QuadtreePrimitive.js @@ -1131,7 +1131,11 @@ define([ if (!defined(rayOrigin)) { // intersection point is outside the ellipsoid, try other value // minimum height (-11500.0) for the terrain set, need to get this information from the terrain provider - var magnitude = Math.min(defaultValue(tile.data.minimumHeight, 0.0),-11500.0); + var minimumHeight; + if (defined(tile.data.tileBoundingRegion)) { + minimumHeight = tile.data.tileBoundingRegion.minimumHeight; + } + var magnitude = Math.min(defaultValue(minimumHeight, 0.0), -11500.0); // multiply by the *positive* value of the magnitude var vectorToMinimumPoint = Cartesian3.multiplyByScalar(surfaceNormal, Math.abs(magnitude) + 1, scratchPosition); diff --git a/Source/Widgets/CesiumInspector/CesiumInspectorViewModel.js b/Source/Widgets/CesiumInspector/CesiumInspectorViewModel.js index 61b4cf816392..236f3efee529 100644 --- a/Source/Widgets/CesiumInspector/CesiumInspectorViewModel.js +++ b/Source/Widgets/CesiumInspector/CesiumInspectorViewModel.js @@ -883,8 +883,8 @@ define([ this.tileText += '
SW corner: ' + newTile.rectangle.west + ', ' + newTile.rectangle.south; this.tileText += '
NE corner: ' + newTile.rectangle.east + ', ' + newTile.rectangle.north; var data = newTile.data; - if (defined(data)) { - this.tileText += '
Min: ' + data.minimumHeight + ' Max: ' + data.maximumHeight; + if (defined(data) && defined(data.tileBoundingRegion)) { + this.tileText += '
Min: ' + data.tileBoundingRegion.minimumHeight + ' Max: ' + data.tileBoundingRegion.maximumHeight; } else { this.tileText += '
(Tile is not loaded)'; }