cesium 报错{"code":"InvalidCredentials","message":"Invalid access token"}

这是因为需要申请token。

申请页面为:https://cesium.com/ion/tokens

在初始化viewer之前,将token加入即可

Cesium.Ion.defaultAccessToken='你的token';
var viewer = new Cesium.Viewer('cesiumContainer',{
    baseLayerPicker:false,
    timeline:false,
    homeButton:false,
    fullscreenButton:false,
    infoBox:false,
    sceneModePicker:false,
    navigationInstructionsInitiallyVisible:false,
    navigationHelpButton:false,
    geocoder:false,
    animation:false,
    selectionIndicator:false

});

猜你喜欢

转载自blog.csdn.net/A873054267/article/details/83477541