ArcGIS Rendering has stopped. TypeError: Cannot read property 'x' of undefined

The issue (please use developer console to see the error on JSFiddle)
http://jsfiddle.net/p0bstL80/1/

I get the following error when trying to add the ArcGIS layer
https://maps.ngdc.noaa.gov/arcgis/rest/services/web_mercator/gebco_2014_contours/MapServer

Cesium.js:164978 An error occurred while rendering. Rendering has stopped.
undefined
TypeError: Cannot read property 'x' of undefined
TypeError: Cannot read property 'x' of undefined
    at ImageryLayer._createTileImagerySkeletons (http://cesiumjs.org/Cesium/Build/CesiumUnminified/Cesium.js:140907:100)
    at prepareNewTile (http://cesiumjs.org/Cesium/Build/CesiumUnminified/Cesium.js:139852:23)
    at Function.GlobeSurfaceTile.processStateMachine (http://cesiumjs.org/Cesium/Build/CesiumUnminified/Cesium.js:139769:13)
    at GlobeSurfaceTileProvider.loadTile (http://cesiumjs.org/Cesium/Build/CesiumUnminified/Cesium.js:141889:26)
    at processTileLoadQueue (http://cesiumjs.org/Cesium/Build/CesiumUnminified/Cesium.js:144297:26)
    at QuadtreePrimitive.endFrame (http://cesiumjs.org/Cesium/Build/CesiumUnminified/Cesium.js:144024:9)
    at Globe.endFrame (http://cesiumjs.org/Cesium/Build/CesiumUnminified/Cesium.js:144908:27)
    at render (http://cesiumjs.org/Cesium/Build/CesiumUnminified/Cesium.js:156240:25)
    at Scene.render (http://cesiumjs.org/Cesium/Build/CesiumUnminified/Cesium.js:156273:13)
    at CesiumWidget.render (http://cesiumjs.org/Cesium/Build/CesiumUnminified/Cesium.js:165025:25)

Note: this layer does work on the ArcGIS side
http://www.arcgis.com/home/webmap/viewer.html?url=https%3A%2F%2Fmaps.ngdc.noaa.gov%2Farcgis%2Frest%2Fservices%2Fweb_mercator%2Fgebco_2014_contours%2FMapServer&source=sd

Anyone ?

I am getting a similar error creating a TileMapServiceImageryProvider using the offline tiles provided in the cesium asset repo.

My error is cannot read property east of undefined

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’
})
});

``

Best,

Hannah

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.

Best,

Hannah

Our layer IS using mercator...how do I apply it our map?
http://jsfiddle.net/p0bstL80/2/ doesn't seem to work either

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:

http://maps.ngdc.noaa.gov/arcgis/rest/services/web_mercator/gebco_2014_contours/MapServer

Thanks in advance for any ideas that you might have.

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

-Hannah

Hi,

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:

https://github.com/AnalyticalGraphicsInc/cesium/pull/3854

It should be in the 1.21 release at the beginning of May.

Kevin

Great news, thanks for the update Kevin. We’ll be sure to grab the May 1.21 release.

Todd

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?

Hello,

Can you provide a code sample to reproduce the issue? The problem was only fixed for ArcGIS, we haven’t seen a similar problem with other providers.

Thanks,

Hannah

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'
        })
        
        var cesiumOptions = {
            fullscreenButton: false,
            timeline: true,
            geocoder: false,
            imageryProvider: baseImagery,
            animation: true,
            showRenderLoopErrors: true,
            navigationHelpButton: false,
            infoBox: false
        }

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?

-Hannah

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.

Running this in the latest version of Chrome

You might be using this: https://github.com/AnalyticalGraphicsInc/cesium-assets/tree/master/imagery/NaturalEarthII

If so, we made a fix to the tilemapresource.xml file about a month ago. Try copying the latest version of that file to see if it fixes your problem.

-Hannah

I believe that has it fixed. I'll let you know if I break something else ha

Thanks for the help