Sorry, I’m not sure what is causing the error for the ArcGIS imagery
Brian, how are you adding the Natural Earth imagery? Your error may be because we replace TileMapServiceImageryProvider with the function createTileMapServiceImageryProvider.
This code should work
var viewer = new Cesium.Viewer(‘cesiumContainer’, {
baseLayerPicker: false,
imageryProvider: Cesium.createTileMapServiceImageryProvider({
url : ‘/path/to/Assets/Textures/NaturalEarthII’
})
});
It's a strange error...it's the only layer that's giving us trouble. Please do share if a resolution gets discovered as the issue can be tested on JSFiddle
Yes, thanks for sharing the code example! I did look into the code a little bit.
The error is being thrown because ImageryLayer._createTileImagerySkeletons is looking for the tile coordinate of a position that is out of bounds of a rectangle defined by the tiling scheme.
But I couldn’t figure out why that was happening, or whether it was a bug in Cesium or something with the ArgGIS image server. Does that layer have a geographic tiling scheme? Our ArcGisMapServerImageryProvider uses a GeograpicTilingScheme by default, so if your layer is web mercator, that could be a source of the problem.
Take a look at the Documentation to make sure that the options are applicable to that layer.
Maybe someone else will have an idea of what is causing the problem.
I’m wondering if you had any other ideas regarding Mak’s (seyed’s) jsfiddle example below. As he mentions, the ArcGIS service that we’re trying to incorporate is using web mercator projection, as you can see it in the URL path:
I did take a look at this but I’m not sure what is causing the issue. It looks like all of the correct metadata is being retrieved from the server and it is using the web mercator projection. Sorry I don’t have a better suggestion. Hopefully someone else will be able to help
The problem is that the ArcGIS Server is advertising an extent that is bigger than the valid extent for the projection it is using (Web Mercator). I’ve opened a pull request to make Cesium able to handle this case:
I'm having the same issue with Natural Earth using createTileMapServiceImageryProvider in Cesium 1.21. Should this issue be completely resolved at this point? I see in the change log for 1.21 where the problem says it was resolve for ARCGIS but what about other providers?
I'm using an offline version of Natural Earth because this application primarily runs in an offline environment. The following code works normally in Cesium 1.18. I recently upgraded from Cesium 1.18 to Cesium 1.20 which is when I began noticing the issue. I rolled back to Cesium 1.18 again and the imagery loads normally. I then upgraded to Cesium 1.19 and began getting the Cannot read property 'east' of undefined errors.
This is the code that I was using to init Cesium with Natural Earth as the default imagery provider.
var baseImagery = new Cesium.createTileMapServiceImageryProvider({
url: '/terrain/NaturalEarthII',
maximumLevel: 5,
fileExtension: 'jpg'
})
Actually, let me recant. That doesn't work as the default imageryProvider in 1.18 either. It used to (not sure which version of Cesium that quit working in). I can add it into the imageryProviderViewModels that way though.
I create a new Cesium.ProviderViewModel() with the createFunction set to just return a new Cesium.createTileMapServiceImageryProvider and that works (in 1.18, not above). Setting it as the default imageryProvider used to work the same way when initializing Cesium though.
Are you using your own imagery or the imagery included with the Cesium download? I wasn’t able to reproduce the error on my machine.
What browser are you using?
I checked with a guy I work with and he seems to remember getting the terrain from the Cesium site (from Github maybe). According to him, there was the version of natural earth that is provided in the assets folder and then there was another version that was available from the cesium site or github that had a little more data. We have layers 0-5 instead of 0-2 like is provided with Cesium in the Assets folder.