From 98bdbf737f9f14f6bfcc13bcef221cc70f43ff30 Mon Sep 17 00:00:00 2001 From: Bao Date: Tue, 18 Aug 2020 16:14:21 -0400 Subject: [PATCH 1/3] turn off throttle option when request parent terrain layer --- Source/Core/CesiumTerrainProvider.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Source/Core/CesiumTerrainProvider.js b/Source/Core/CesiumTerrainProvider.js index 587611b98e29..d4c9b9da8322 100644 --- a/Source/Core/CesiumTerrainProvider.js +++ b/Source/Core/CesiumTerrainProvider.js @@ -1278,7 +1278,7 @@ function checkLayer(provider, x, y, level, layer, topLayer) { // For cutout terrain, if this isn't the top layer the availability tiles // may never get loaded, so request it here. var request = new Request({ - throttle: true, + throttle: false, throttleByServer: true, type: RequestType.TERRAIN, }); From 8efb2fed043588750a1ca5d11fdf5185e2186685 Mon Sep 17 00:00:00 2001 From: Bao Date: Tue, 18 Aug 2020 18:10:35 -0400 Subject: [PATCH 2/3] turn off throttle option for Imagery and Terrain provider --- Source/Core/ArcGISTiledElevationTerrainProvider.js | 2 +- Source/Core/GoogleEarthEnterpriseTerrainProvider.js | 2 +- Source/Scene/TimeDynamicImagery.js | 2 +- Specs/Core/ArcGISTiledElevationTerrainProviderSpec.js | 11 +++++------ Specs/Scene/TimeDynamicImagerySpec.js | 4 ++-- 5 files changed, 10 insertions(+), 11 deletions(-) diff --git a/Source/Core/ArcGISTiledElevationTerrainProvider.js b/Source/Core/ArcGISTiledElevationTerrainProvider.js index 19058e16cd03..1a95dbeb81ed 100644 --- a/Source/Core/ArcGISTiledElevationTerrainProvider.js +++ b/Source/Core/ArcGISTiledElevationTerrainProvider.js @@ -624,7 +624,7 @@ function requestAvailability(that, level, x, y) { } var request = new Request({ - throttle: true, + throttle: false, throttleByServer: true, type: RequestType.TERRAIN, }); diff --git a/Source/Core/GoogleEarthEnterpriseTerrainProvider.js b/Source/Core/GoogleEarthEnterpriseTerrainProvider.js index 551d5c665664..d69cbfec5fdd 100644 --- a/Source/Core/GoogleEarthEnterpriseTerrainProvider.js +++ b/Source/Core/GoogleEarthEnterpriseTerrainProvider.js @@ -604,7 +604,7 @@ GoogleEarthEnterpriseTerrainProvider.prototype.getTileDataAvailable = function ( if (metadata.isValid(quadKey)) { // We will need this tile, so request metadata and return false for now var request = new Request({ - throttle: true, + throttle: false, throttleByServer: true, type: RequestType.TERRAIN, }); diff --git a/Source/Scene/TimeDynamicImagery.js b/Source/Scene/TimeDynamicImagery.js index ef579f198928..eb2682dbe9ac 100644 --- a/Source/Scene/TimeDynamicImagery.js +++ b/Source/Scene/TimeDynamicImagery.js @@ -282,7 +282,7 @@ function addToCache(that, tile, interval) { var keyElements = getKeyElements(key); var request = new Request({ - throttle: true, + throttle: false, throttleByServer: true, type: RequestType.IMAGERY, priorityFunction: tile.priorityFunction, diff --git a/Specs/Core/ArcGISTiledElevationTerrainProviderSpec.js b/Specs/Core/ArcGISTiledElevationTerrainProviderSpec.js index e800c616f9ee..710b9a9be602 100644 --- a/Specs/Core/ArcGISTiledElevationTerrainProviderSpec.js +++ b/Specs/Core/ArcGISTiledElevationTerrainProviderSpec.js @@ -474,12 +474,11 @@ describe("Core/ArcGISTiledElevationTerrainProvider", function () { var promise; var i; for (i = 0; i < RequestScheduler.maximumRequestsPerServer; ++i) { - promise = terrainProvider.requestTileGeometry( - 0, - 0, - 0, - createRequest() - ); + var request = new Request({ + throttle: true, + throttleByServer: true, + }); + promise = terrainProvider.requestTileGeometry(0, 0, 0, request); } RequestScheduler.update(); expect(promise).toBeDefined(); diff --git a/Specs/Scene/TimeDynamicImagerySpec.js b/Specs/Scene/TimeDynamicImagerySpec.js index 2286cf7d221f..276a2f97c64d 100644 --- a/Specs/Scene/TimeDynamicImagerySpec.js +++ b/Specs/Scene/TimeDynamicImagerySpec.js @@ -142,7 +142,7 @@ describe("Scene/TimeDynamicImagery", function () { options.reloadFunction.calls.reset(); // Constructor calls reload var request = new Request({ - throttle: true, + throttle: false, throttleByServer: true, type: RequestType.IMAGERY, }); @@ -173,7 +173,7 @@ describe("Scene/TimeDynamicImagery", function () { options.reloadFunction.calls.reset(); // Constructor calls reload var request = new Request({ - throttle: true, + throttle: false, throttleByServer: true, type: RequestType.IMAGERY, }); From 6076bb3ff5b30a0760fad60facc3eaf3c8480eef Mon Sep 17 00:00:00 2001 From: Bao Date: Tue, 18 Aug 2020 20:11:10 -0400 Subject: [PATCH 3/3] modify CHANGES.md --- CHANGES.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGES.md b/CHANGES.md index d3f73505bc0e..1399f80fda8a 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -10,6 +10,7 @@ - Fixed several artifcats on mobile devices caused by using insufficient precision. [#9064](https://github.com/CesiumGS/cesium/pull/9064) - Fixed handling of `data:` scheme for the Cesium ion logo URL. [#9085](https://github.com/CesiumGS/cesium/pull/9085) +- Fixed an issue where a request for availability tile of the reference layer is delayed when throttle option is on. [##9099](https://github.com/CesiumGS/cesium/pull/9099) ### 1.72 - 2020-08-03