Open yekurd opened 7 months ago
Hello, I am also having trouble loading the generated starrlink.html file. I changed the link to https://cesium.com/downloads/cesiumjs/releases/1.57/Build/Cesium/Cesium.js and I can open it, but it only shows a blank earth. Have you solved this issue?
Hello,I have solved the problem。The reason for this problem is because of the CORS error。You can use the following top.html file:
<html lang="en">
<head>
<meta charset="utf-8">
<script src="https://cesium.com/downloads/cesiumjs/releases/1.117/Build/Cesium/Cesium.js"></script>
<link href="https://cesium.com/downloads/cesiumjs/releases/1.117/Build/Cesium/Widgets/widgets.css" rel="stylesheet">
</head>
<body>
<div id="cesiumContainer" style="width: 100%; height:100%"></div>
<script>
Cesium.Ion.defaultAccessToken = '<CESIUM_ACCESS_TOKEN>';
var viewer = new Cesium.Viewer('cesiumContainer', {
skyBox : false,
skyAtmosphere: false,
baseLayerPicker: false,
geocoder: false,
homeButton: false,
infoBox: false,
sceneModePicker: false,
navigationHelpButton: false,
shouldAnimate : true,
contextOptions : {
webgl: {
alpha: true
}
}
});
var scene = viewer.scene;
scene.backgroundColor = Cesium.Color.WHITE;
scene.highDynamicRange = false;
var canvas = viewer.canvas;
canvas.setAttribute('tabindex', '0'); // needed to put focus on the canvas
canvas.onclick = function() {
canvas.focus();
};
var ellipsoid = scene.globe.ellipsoid;
var globe = viewer.scene.globe;
globe.imageryLayers.removeAll();
globe.baseColor = Cesium.Color.fromCssColorString('#f7fbff');
var tonerLayer = globe.imageryLayers.addImageryProvider(
new Cesium.UrlTemplateImageryProvider({
url: 'https://{s}.tile.opentopomap.org/{z}/{x}/{y}.png',
credit: 'Map data © OpenStreetMap contributors, CC-BY-SA, Imagery © OpenTopoMap',
subdomains: ['a', 'b', 'c']
})
);
tonerLayer.alpha = 0.3;
tonerLayer.brightness = 1;
tonerLayer.contrast = 10;
A combination of the above suggestion and using safari instead of chrome worked for me
hello,
I am trying to view the constellation using visualize_constellation.py but it does not want to work, the page is constantly trying to load, but it does not show anything. After changing the code regarding the cesium links, by changing it to "https://cesium.com/downloads/cesiumjs/releases/1.95/Build/Cesium/Cesium.js" it seems to load the page at least, but now the earth is completely blank.