File tree 1 file changed +8
-1
lines changed
1 file changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -618,19 +618,26 @@ import TileSelectionResult from './TileSelectionResult.js';
618
618
return undefined ;
619
619
}
620
620
621
+ var tileWithMesh = tile ;
622
+
621
623
while ( tile . _lastSelectionResult === TileSelectionResult . REFINED ) {
622
624
tile = tileIfContainsCartographic ( tile . southwestChild , cartographic ) ||
623
625
tileIfContainsCartographic ( tile . southeastChild , cartographic ) ||
624
626
tileIfContainsCartographic ( tile . northwestChild , cartographic ) ||
625
627
tile . northeastChild ;
628
+ if ( defined ( tile . data ) && defined ( tile . data . renderedMesh ) ) {
629
+ tileWithMesh = tile ;
630
+ }
626
631
}
627
632
633
+ tile = tileWithMesh ;
634
+
628
635
// This tile was either rendered or culled.
629
636
// It is sometimes useful to get a height from a culled tile,
630
637
// e.g. when we're getting a height in order to place a billboard
631
638
// on terrain, and the camera is looking at that same billboard.
632
639
// The culled tile must have a valid mesh, though.
633
- if ( ! defined ( tile . data ) || ! defined ( tile . data . renderedMesh ) ) {
640
+ if ( ! defined ( tile ) ) {
634
641
// Tile was not rendered (culled).
635
642
return undefined ;
636
643
}
You can’t perform that action at this time.
0 commit comments