Is it possible to determine whether or not Cesium has an internet connection and based on that use a SingleTileImageProvider to display one or more tiles when disconnected? I’ve been playing with this but haven’t gotten it to work. I’ve tried a few cuts at this but none seem to work even approximately. e.g.:
var viewer = new Cesium.Viewer(‘cesiumContainer’);
var layers = viewer.scene.imageryLayers;
layers.addImageryProvider(new Cesium.SingleTileImageryProvider({
url : tileUrl,
rectangle : tileArea
}));
``
This displays both the default globe and the single tile when connected, but if disconnected it displays neither, just the globe outline. On the other hand:
var viewer = new Cesium.Viewer(‘cesiumContainer’, {
imageryProvider: new Cesium.SingleTileImageryProvider({
url : tileUrl,
rectangle : tileArea
})
});
``
flat out doesn’t work, neither displaying the tile when connected nor displaying even the globe outline when disconnected.
Thank you.
–Dale