[cesium-dev] Problems with minimumLayer in UrlTemplateImageryProvider when using custom tiled images


Can you share an imagery source that exhibits this problem? It would be helpful if I could take a look at the problem in the wild.

Regarding veryCloseX/veryCloseY, good catch! width and height are indeed flipped. If you’re up for creating a pull request with that change, I’d be happy to merge it.




This example will cause a crash without the changes I mentioned:

var tms = new Cesium.UrlTemplateImageryProvider({

url : ‘/Source/Texture/{z}/{x}/{reverseY}.jpg’,

tilingScheme : new Cesium.GeographicTilingScheme(),

rectangle : Cesium.Rectangle.fromDegrees(2.63671875, 50.2734375, 2.8125, 50.44921875),

minimumLevel : 10,

maximumLevel : 17



Without the changes, the crash occurs regardless of whether any images are found at the specified path. With the changes, there are only warnings that no image is found.

However, the crash does not occur if the minimumLevel is changed to 5.

That rectangle was chosen because it is the bounds of the tile at Texture/10/1039/798.jpg.

As to creating a pull request, I haven’t been working on a branch so far since the only change I have made until now has been to disable horizon culling. I can look into doing that this week though.