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

671 views
Skip to first unread message

seyed...@noaa.gov

unread,
Apr 4, 2016, 3:54:16 PM4/4/16
to cesium-dev
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)

seyed...@noaa.gov

unread,
Apr 4, 2016, 3:57:51 PM4/4/16
to cesium-dev, seyed...@noaa.gov

seyed...@noaa.gov

unread,
Apr 6, 2016, 1:44:02 AM4/6/16
to cesium-dev, seyed...@noaa.gov

Anyone ?

Brian Ryall

unread,
Apr 6, 2016, 9:04:32 AM4/6/16
to cesium-dev, seyed...@noaa.gov
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

Hannah Pinkos

unread,
Apr 6, 2016, 10:49:46 AM4/6/16
to cesium-dev, seyed...@noaa.gov
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

seyed...@noaa.gov

unread,
Apr 6, 2016, 11:08:13 AM4/6/16
to cesium-dev, seyed...@noaa.gov
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

Hannah Pinkos

unread,
Apr 6, 2016, 1:02:17 PM4/6/16
to cesium-dev, seyed...@noaa.gov
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

seyed...@noaa.gov

unread,
Apr 6, 2016, 7:56:33 PM4/6/16
to cesium-dev, seyed...@noaa.gov
Our layer IS using mercator...how do I apply it our map?
http://jsfiddle.net/p0bstL80/2/ doesn't seem to work either

Todd Hay

unread,
Apr 14, 2016, 12:44:50 AM4/14/16
to cesium-dev, seyed...@noaa.gov
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:


Thanks in advance for any ideas that you might have.

Hannah Pinkos

unread,
Apr 14, 2016, 11:05:56 AM4/14/16
to cesium-dev, seyed...@noaa.gov
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

Kevin Ring

unread,
Apr 15, 2016, 8:06:05 AM4/15/16
to cesium-dev
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:

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

Kevin

Todd Hay

unread,
Apr 15, 2016, 7:24:17 PM4/15/16
to cesium-dev
Great news, thanks for the update Kevin.  We'll be sure to grab the May 1.21 release.

Todd

ad...@dferg.us

unread,
May 23, 2016, 4:16:47 PM5/23/16
to cesium-dev
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?

Hannah Pinkos

unread,
May 23, 2016, 4:38:27 PM5/23/16
to cesium-dev, ad...@dferg.us
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

ad...@dferg.us

unread,
May 24, 2016, 9:12:44 AM5/24/16
to cesium-dev, ad...@dferg.us
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

ad...@dferg.us

unread,
May 24, 2016, 9:25:55 AM5/24/16
to cesium-dev, ad...@dferg.us
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.

Hannah Pinkos

unread,
May 24, 2016, 12:57:30 PM5/24/16
to cesium-dev, ad...@dferg.us
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

ad...@dferg.us

unread,
May 24, 2016, 3:16:30 PM5/24/16
to cesium-dev, ad...@dferg.us
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

Hannah Pinkos

unread,
May 24, 2016, 3:43:07 PM5/24/16
to cesium-dev, ad...@dferg.us
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

ad...@dferg.us

unread,
May 24, 2016, 4:10:10 PM5/24/16
to cesium-dev, ad...@dferg.us
I believe that has it fixed. I'll let you know if I break something else ha

Thanks for the help
Reply all
Reply to author
Forward
0 new messages