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

**URL:** <https://community.cesium.com/t/arcgis-rendering-has-stopped-typeerror-cannot-read-property-x-of-undefined/3950>\
**Category:** CesiumJS\
**Created:** [April 4, 2016, 7:54pm UTC](https://community.cesium.com/t/arcgis-rendering-has-stopped-typeerror-cannot-read-property-x-of-undefined/3950 "2016-04-04T19:54:16Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![seyed.ahmad](https://avatars.discourse-cdn.com/v4/letter/s/b5ac83/32.png) [@seyed.ahmad](https://community.cesium.com/u/seyed.ahmad)\
**Post date:** [April 4, 2016, 7:54pm UTC](https://community.cesium.com/t/arcgis-rendering-has-stopped-typeerror-cannot-read-property-x-of-undefined/3950/1 "2016-04-04T19:54:16Z")

</div>

The issue (please use developer console to see the error on JSFiddle)  
[http://jsfiddle.net/p0bstL80/1/](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](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  
&nbsp;&nbsp;&nbsp;&nbsp;at ImageryLayer.\_createTileImagerySkeletons ([http://cesiumjs.org/Cesium/Build/CesiumUnminified/Cesium.js:140907:100](http://cesiumjs.org/Cesium/Build/CesiumUnminified/Cesium.js:140907:100))  
&nbsp;&nbsp;&nbsp;&nbsp;at prepareNewTile ([http://cesiumjs.org/Cesium/Build/CesiumUnminified/Cesium.js:139852:23](http://cesiumjs.org/Cesium/Build/CesiumUnminified/Cesium.js:139852:23))  
&nbsp;&nbsp;&nbsp;&nbsp;at Function.GlobeSurfaceTile.processStateMachine ([http://cesiumjs.org/Cesium/Build/CesiumUnminified/Cesium.js:139769:13](http://cesiumjs.org/Cesium/Build/CesiumUnminified/Cesium.js:139769:13))  
&nbsp;&nbsp;&nbsp;&nbsp;at GlobeSurfaceTileProvider.loadTile ([http://cesiumjs.org/Cesium/Build/CesiumUnminified/Cesium.js:141889:26](http://cesiumjs.org/Cesium/Build/CesiumUnminified/Cesium.js:141889:26))  
&nbsp;&nbsp;&nbsp;&nbsp;at processTileLoadQueue ([http://cesiumjs.org/Cesium/Build/CesiumUnminified/Cesium.js:144297:26](http://cesiumjs.org/Cesium/Build/CesiumUnminified/Cesium.js:144297:26))  
&nbsp;&nbsp;&nbsp;&nbsp;at QuadtreePrimitive.endFrame ([http://cesiumjs.org/Cesium/Build/CesiumUnminified/Cesium.js:144024:9](http://cesiumjs.org/Cesium/Build/CesiumUnminified/Cesium.js:144024:9))  
&nbsp;&nbsp;&nbsp;&nbsp;at Globe.endFrame ([http://cesiumjs.org/Cesium/Build/CesiumUnminified/Cesium.js:144908:27](http://cesiumjs.org/Cesium/Build/CesiumUnminified/Cesium.js:144908:27))  
&nbsp;&nbsp;&nbsp;&nbsp;at render ([http://cesiumjs.org/Cesium/Build/CesiumUnminified/Cesium.js:156240:25](http://cesiumjs.org/Cesium/Build/CesiumUnminified/Cesium.js:156240:25))  
&nbsp;&nbsp;&nbsp;&nbsp;at Scene.render ([http://cesiumjs.org/Cesium/Build/CesiumUnminified/Cesium.js:156273:13](http://cesiumjs.org/Cesium/Build/CesiumUnminified/Cesium.js:156273:13))  
&nbsp;&nbsp;&nbsp;&nbsp;at CesiumWidget.render ([http://cesiumjs.org/Cesium/Build/CesiumUnminified/Cesium.js:165025:25](http://cesiumjs.org/Cesium/Build/CesiumUnminified/Cesium.js:165025:25))

---

<div class="post-metadata">

**Author:** ![seyed.ahmad](https://avatars.discourse-cdn.com/v4/letter/s/b5ac83/32.png) [@seyed.ahmad](https://community.cesium.com/u/seyed.ahmad)\
**Post date:** [April 4, 2016, 7:57pm UTC](https://community.cesium.com/t/arcgis-rendering-has-stopped-typeerror-cannot-read-property-x-of-undefined/3950/2 "2016-04-04T19:57:50Z")

</div>

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](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)

---

<div class="post-metadata">

**Author:** ![seyed.ahmad](https://avatars.discourse-cdn.com/v4/letter/s/b5ac83/32.png) [@seyed.ahmad](https://community.cesium.com/u/seyed.ahmad)\
**Post date:** [April 6, 2016, 5:44am UTC](https://community.cesium.com/t/arcgis-rendering-has-stopped-typeerror-cannot-read-property-x-of-undefined/3950/3 "2016-04-06T05:44:02Z")

</div>

Anyone ?

---

<div class="post-metadata">

**Author:** ![Brian\_Ryall](https://avatars.discourse-cdn.com/v4/letter/b/b77776/32.png) [@Brian\_Ryall](https://community.cesium.com/u/Brian_Ryall)\
**Post date:** [April 6, 2016, 1:04pm UTC](https://community.cesium.com/t/arcgis-rendering-has-stopped-typeerror-cannot-read-property-x-of-undefined/3950/4 "2016-04-06T13:04:32Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![hannah](https://sea2.discourse-cdn.com/cesium/user_avatar/community.cesium.com/hannah/32/4509_2.png) [@hannah](https://community.cesium.com/u/hannah)\
**Post date:** [April 6, 2016, 2:49pm UTC](https://community.cesium.com/t/arcgis-rendering-has-stopped-typeerror-cannot-read-property-x-of-undefined/3950/5 "2016-04-06T14:49:45Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![seyed.ahmad](https://avatars.discourse-cdn.com/v4/letter/s/b5ac83/32.png) [@seyed.ahmad](https://community.cesium.com/u/seyed.ahmad)\
**Post date:** [April 6, 2016, 3:08pm UTC](https://community.cesium.com/t/arcgis-rendering-has-stopped-typeerror-cannot-read-property-x-of-undefined/3950/6 "2016-04-06T15:08:13Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![hannah](https://sea2.discourse-cdn.com/cesium/user_avatar/community.cesium.com/hannah/32/4509_2.png) [@hannah](https://community.cesium.com/u/hannah)\
**Post date:** [April 6, 2016, 5:02pm UTC](https://community.cesium.com/t/arcgis-rendering-has-stopped-typeerror-cannot-read-property-x-of-undefined/3950/7 "2016-04-06T17:02:17Z")

</div>

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](http://cesiumjs.org/Cesium/Build/Documentation/ArcGisMapServerImageryProvider.html) 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

---

<div class="post-metadata">

**Author:** ![seyed.ahmad](https://avatars.discourse-cdn.com/v4/letter/s/b5ac83/32.png) [@seyed.ahmad](https://community.cesium.com/u/seyed.ahmad)\
**Post date:** [April 6, 2016, 11:56pm UTC](https://community.cesium.com/t/arcgis-rendering-has-stopped-typeerror-cannot-read-property-x-of-undefined/3950/8 "2016-04-06T23:56:33Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Todd\_Hay](https://avatars.discourse-cdn.com/v4/letter/t/c57346/32.png) [@Todd\_Hay](https://community.cesium.com/u/Todd_Hay)\
**Post date:** [April 14, 2016, 4:44am UTC](https://community.cesium.com/t/arcgis-rendering-has-stopped-typeerror-cannot-read-property-x-of-undefined/3950/9 "2016-04-14T04:44:49Z")

</div>

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](http://maps.ngdc.noaa.gov/arcgis/rest/services/web_mercator/gebco_2014_contours/MapServer)

Thanks in advance for any ideas that you might have.

---

<div class="post-metadata">

**Author:** ![hannah](https://sea2.discourse-cdn.com/cesium/user_avatar/community.cesium.com/hannah/32/4509_2.png) [@hannah](https://community.cesium.com/u/hannah)\
**Post date:** [April 14, 2016, 3:05pm UTC](https://community.cesium.com/t/arcgis-rendering-has-stopped-typeerror-cannot-read-property-x-of-undefined/3950/10 "2016-04-14T15:05:56Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Kevin\_Ring](https://sea2.discourse-cdn.com/cesium/user_avatar/community.cesium.com/kevin_ring/32/2003_2.png) [@Kevin\_Ring](https://community.cesium.com/u/Kevin_Ring)\
**Post date:** [April 15, 2016, 12:06pm UTC](https://community.cesium.com/t/arcgis-rendering-has-stopped-typeerror-cannot-read-property-x-of-undefined/3950/11 "2016-04-15T12:06:04Z")

</div>

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](https://github.com/AnalyticalGraphicsInc/cesium/pull/3854)

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

Kevin

---

<div class="post-metadata">

**Author:** ![Todd\_Hay](https://avatars.discourse-cdn.com/v4/letter/t/c57346/32.png) [@Todd\_Hay](https://community.cesium.com/u/Todd_Hay)\
**Post date:** [April 15, 2016, 11:24pm UTC](https://community.cesium.com/t/arcgis-rendering-has-stopped-typeerror-cannot-read-property-x-of-undefined/3950/12 "2016-04-15T23:24:17Z")

</div>

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

Todd

---

<div class="post-metadata">

**Author:** ![dferg](https://avatars.discourse-cdn.com/v4/letter/d/a88e4f/32.png) [@dferg](https://community.cesium.com/u/dferg)\
**Post date:** [May 23, 2016, 8:16pm UTC](https://community.cesium.com/t/arcgis-rendering-has-stopped-typeerror-cannot-read-property-x-of-undefined/3950/13 "2016-05-23T20:16:47Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![hannah](https://sea2.discourse-cdn.com/cesium/user_avatar/community.cesium.com/hannah/32/4509_2.png) [@hannah](https://community.cesium.com/u/hannah)\
**Post date:** [May 23, 2016, 8:38pm UTC](https://community.cesium.com/t/arcgis-rendering-has-stopped-typeerror-cannot-read-property-x-of-undefined/3950/14 "2016-05-23T20:38:27Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![dferg](https://avatars.discourse-cdn.com/v4/letter/d/a88e4f/32.png) [@dferg](https://community.cesium.com/u/dferg)\
**Post date:** [May 24, 2016, 1:12pm UTC](https://community.cesium.com/t/arcgis-rendering-has-stopped-typeerror-cannot-read-property-x-of-undefined/3950/15 "2016-05-24T13:12:44Z")

</div>

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.

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;var baseImagery = new Cesium.createTileMapServiceImageryProvider({  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;url: '/terrain/NaturalEarthII',  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;maximumLevel: 5,  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;fileExtension: 'jpg'  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;})  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;var cesiumOptions = {  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;fullscreenButton: false,  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;timeline: true,  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;geocoder: false,  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;imageryProvider: baseImagery,  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;animation: true,  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;showRenderLoopErrors: true,  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;navigationHelpButton: false,  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;infoBox: false  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}

---

<div class="post-metadata">

**Author:** ![dferg](https://avatars.discourse-cdn.com/v4/letter/d/a88e4f/32.png) [@dferg](https://community.cesium.com/u/dferg)\
**Post date:** [May 24, 2016, 1:25pm UTC](https://community.cesium.com/t/arcgis-rendering-has-stopped-typeerror-cannot-read-property-x-of-undefined/3950/16 "2016-05-24T13:25:55Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![hannah](https://sea2.discourse-cdn.com/cesium/user_avatar/community.cesium.com/hannah/32/4509_2.png) [@hannah](https://community.cesium.com/u/hannah)\
**Post date:** [May 24, 2016, 4:57pm UTC](https://community.cesium.com/t/arcgis-rendering-has-stopped-typeerror-cannot-read-property-x-of-undefined/3950/17 "2016-05-24T16:57:30Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![dferg](https://avatars.discourse-cdn.com/v4/letter/d/a88e4f/32.png) [@dferg](https://community.cesium.com/u/dferg)\
**Post date:** [May 24, 2016, 7:16pm UTC](https://community.cesium.com/t/arcgis-rendering-has-stopped-typeerror-cannot-read-property-x-of-undefined/3950/18 "2016-05-24T19:16:30Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![hannah](https://sea2.discourse-cdn.com/cesium/user_avatar/community.cesium.com/hannah/32/4509_2.png) [@hannah](https://community.cesium.com/u/hannah)\
**Post date:** [May 24, 2016, 7:43pm UTC](https://community.cesium.com/t/arcgis-rendering-has-stopped-typeerror-cannot-read-property-x-of-undefined/3950/19 "2016-05-24T19:43:06Z")

</div>

You might be using this: [https://github.com/AnalyticalGraphicsInc/cesium-assets/tree/master/imagery/NaturalEarthII](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

---

<div class="post-metadata">

**Author:** ![dferg](https://avatars.discourse-cdn.com/v4/letter/d/a88e4f/32.png) [@dferg](https://community.cesium.com/u/dferg)\
**Post date:** [May 24, 2016, 8:10pm UTC](https://community.cesium.com/t/arcgis-rendering-has-stopped-typeerror-cannot-read-property-x-of-undefined/3950/20 "2016-05-24T20:10:10Z")

</div>

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

Thanks for the help
