1. A concise explanation of the problem you're experiencing.
Can't reach to use token (Cesium ion) and the viewer properly with olcesium:
.without viewer and token, terrain is working fine but I have the message 'please assign....'
.with viewer and token, terrain isn't working (but no more 'please assign' message)
(TypeError: e is null[En savoir plus] Cesium.js:535:6460 )
2. A minimal code example. If you've found a bug, this helps us reproduce and repair it.
const scene = ol3d.getCesiumScene();
/*
Cesium.Ion.defaultAccessToken = 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJqdGkiOiJjZDZiOGQ1Zi1mZThlLTQ5MjJgtYmM2Ny0yZjM1ZTUyZWQ3NWIiLCJpZCI6NDEzMCwic2NvcGVzIjpbImFzciIsImdjIl0sImlhdCI6MTUzOTk1NjYzNn0.4WXr-J59gKgmSOTsiARppKyjarOo_c7zjg8CEBCaOxo';
var viewer = new Cesium.Viewer('cesiumContainer', {
sceneModePicker : false,
terrainProvider : Cesium.createWorldTerrain()
});*/
scene.terrainProvider = Cesium.createWorldTerrain({
requestWaterMask: true,
requestVertexNormals: true,
});
var globe = scene.globe;
scene.globe.enableLighting = true;
3. Context. Why do you need to do this? We might know a better way to accomplish your goal.
I use it with geoserver/openlayers(5.2) to improve the render
4. The Cesium version you're using, your operating system and browser.
Cesium Ion, windows 7 Pro, Firefox 63.0