How to use ArcGisImageServerTerrainProvider

Hi

I want to use this WebSservice : http://elevation.arcgis.com/arcgis/rest/services/WorldElevation/Terrain/ImageServer With my Esri token.

so I have this Cesium code :
var esriTerrainProvider = new Cesium.ArcGisImageServerTerrainProvider({
        url : '//elevation.arcgis.com/arcgis/rest/services/WorldElevation/Terrain/ImageServer',
        token : 's55gugu0zaJx5sGBqIK65IH-SqwMV27qoTzUurGJOj6G9iIpE3vl0GFJy9YbOU8WDoByewBewdIfscSgx5L5q_KNo8W1ZO4sLUER9pSnmb1fjQ_zdUv08KLliQgB5KCRsVxQJ78lJbD_9DH5pBZopg..'
      });
        viewer.terrainProvider = esriTerrainProvider;

but It doesn't run, I have in the console of the Sandcastle :
An error occurred in "ArcGisImageServerTerrainProvider": Failed to obtain terrain tile X: 1 Y: 0 Level: 0.
An error occurred in "ArcGisImageServerTerrainProvider": Failed to obtain terrain tile X: 0 Y: 0 Level: 0.

Do you know why ?

Thanks a lot,
Best regards

Look at your browsers console log. It’s probably throwing a lot of Security warnings about mismatched domains. If so that is a CORS issue.

Also I highly recommend not posting your esri token here as this is a completely public forum and it could be used by other people.

Also you should

ArcGisImageServerTerrainProvider is really hard to use and probably shouldn’t exist at all. See this previous explanation:

https://groups.google.com/d/msg/cesium-dev/zhJgvO4U3Vk/A3yvKnQRMA8J