其他分享
首页 > 其他分享> > cesium 避免token过期或离线的方法

cesium 避免token过期或离线的方法

作者:互联网

方法就是:自定义imageryProvider,将baseLayerPicker设置为false。就可以看到后台network将不会请求含有token的地址。
  var esri = new Cesium.ArcGisMapServerImageryProvider({
        url: 'https://services.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer',
        enablePickFeatures: false,
      })
      var viewer = new Cesium.Viewer('cesiumContainer', {
        imageryProvider: esri,
        selectionIndicator: false,
        animation: false,
        baseLayerPicker: false,
        geocoder: false,
        timeline: false,
        sceneModePicker: true,
        navigationHelpButton: false,
        infoBox: false,
        fullscreenButton: true,
      })

 

标签:false,baseLayerPicker,离线,var,Cesium,token,cesium,new,esri
来源: https://www.cnblogs.com/amadoGrowers/p/16253167.html