slowe / VirtualSky

A browser-based planetarium that can be customised and embedded in web pages.
http://slowe.github.io/VirtualSky/
247 stars 94 forks source link

Thumbnails not appearing when moused over on Messier Objects #89

Open creinemann opened 2 years ago

creinemann commented 2 years ago

https://github.com/slowe/VirtualSky/blob/8632b5ce8174578f4f104b7d6de00e9aeda95b39/virtualsky.js#L3455 https://github.com/slowe/VirtualSky/blob/8632b5ce8174578f4f104b7d6de00e9aeda95b39/virtualsky.js#L3456

When using Messier Objects on your page, IF the thumbnails DO NOT appear when moused over, then it is most likely that your server does not allow linking to an unsecured page. Here is a fix:

The code for the Virtual Sky is not adapted for secure servers, in this section: lines 2934 and 2935 in the virtualsky.js file needed to have HTTP changed to HTTPS - since I am running on a secure HTTPS server, I don't think it would matter on a local server like a pi (unless you are running it as a secure server).

Change to:

url = p.url || "https://server1.wikisky.org/v2?ra="+(p.ra/15)+"&de="+(p.dec)+"&zoom=6&img_source=DSS2";
img = p.img || 'https://server7.sky-map.org/imgcut?survey=DSS2&w=128&h=128&ra='+(p.ra/15)+'&de='+p.dec+'&angle=0.25&output=PNG';
creinemann commented 2 years ago

appears that the issue may be on the https://server7.sky-map.org site after all, not having an SSL certificate. Short-term fix? Change your browser settings on your local browser, in this case, Chrome. Under Settings - Security and Privacy->Site Settings, I added server7.sky-map.org to the allowed images setting. Of course, this would only work on your browser on any other site using the server7.sky-map.org in the virtualsky.js file.

slowe commented 2 years ago

@creinemann Thanks for pointing this out. As you say, sky-map.org don't have an SSL certificate so there isn't really much that can be done from a VirtualSky perspective other than remove the feature entirely. Let's hope sky-map.org make the switch at some point.