Why isn't Maptiler Terrain working?

33 views
Skip to first unread message

adn...@gmail.com

unread,
Sep 18, 2019, 6:17:34 PM9/18/19
to cesium-dev
Trying to add Maptiler terrain to my project. I followed their instructions exactly, but all I'm getting is a blank starfield? Here's my code:

<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="utf-8">
</head>
<body>
  <div id="cesiumContainer" style="width: 700px; height:400px"></div>
  <script>
    Cesium.Ion.defaultAccessToken = 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJqdGkiOiJiYzAxNTAwZi1lMjg1LTQ0ZDItYjFkMi1mZDE0ZTM0MzNhMzUiLCJpZCI6ODM1OCwic2NvcGVzIjpbImFzciIsImdjIl0sImlhdCI6MTU2ODg0NDk4Mn0.S5j1QukpApkkhk_OQyrtd4Es0E3NQnSHmNKz21WqlZI';
  
    var viewer = new Cesium.Viewer('cesiumContainer');
    
    viewer.terrainProvider = new Cesium.CesiumTerrainProvider({
});
  </script>
</body>
</html>

Omar Shehata

unread,
Sep 19, 2019, 4:39:09 PM9/19/19
to cesium-dev
You should be able to see the error if you check your browser console. It looks like the URL or API key may be incorrect.
Reply all
Reply to author
Forward
0 new messages