reearth / resium

React components for 🌏 Cesium
https://resium.reearth.io
MIT License
727 stars 134 forks source link

How to use createWorldTerrainAsync? #630

Open tika-iteratec opened 1 year ago

tika-iteratec commented 1 year ago

Hi,

how should you use createWorldTerrainAsync properly? Since the newer version of cesium and resium the function createWorldTerrain is not available anymore. You're not supposed to use await in the render function. If I set it up like this the map doesn't show up on the development server:

<Viewer full
                        terrainProvider={
                            createWorldTerrainAsync({requestWaterMask: true, requestVertexNormals: true})
                            }

Do you know any fixes? Thanks!

ilyaly commented 11 months ago

Same problem, would apricate any advices.

rrainey commented 9 months ago

See this: https://community.cesium.com/t/cesium-1-107-createworldterrainasync-function-problem/25323/2

Using this technique fixed the issue for me.