Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to view constellation using visualize_constellation.py #30

Open
yekurd opened this issue Mar 31, 2024 · 3 comments
Open

Unable to view constellation using visualize_constellation.py #30

yekurd opened this issue Mar 31, 2024 · 3 comments

Comments

@yekurd
Copy link

yekurd commented Mar 31, 2024

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.

2024-03-31_22-59

@wcytxd1
Copy link

wcytxd1 commented May 26, 2024

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?

@silent-rookie
Copy link

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;

@tkoch96
Copy link

tkoch96 commented Jul 3, 2024

A combination of the above suggestion and using safari instead of chrome worked for me

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants