AllskyTeam / allsky-website

Web interface displaying an image from an allsky camera.
54 stars 42 forks source link

VirtualSky: how to get objects on the map #24

Closed DarKOrange75 closed 4 years ago

DarKOrange75 commented 4 years ago

Hi,

How can I get objects like M42 to display on the VirtualSky map?

Thank you,

Laurent

thomasjacquin commented 4 years ago

You can add objects to this file https://github.com/thomasjacquin/allsky-website/blob/master/virtualsky.json

DarKOrange75 commented 4 years ago

Thank you Thomas but it does not work (I have emptied the cache before testing).

I have tried 3 fresh installs on 2 different web servers without touching anything since this option seems to be activated by default.

On this blog page you can access various AllSky cameras from various people, they all have the same virtualsky.json file. Though for some people it is displaying objects, for some it isn't. Weird.`

http://www.dentonknifeworks.com/Allsky.html

DarKOrange75 commented 4 years ago

Ok I've found the issue.

I am running an HTTPS web site and the code in virtualsky.js was trying to serve content from 2 insecure http servers. I had to modify lines 2930, 2931 and 1161 to switch from http to https. Now it works!

        $.ajax({ dataType: "jsonp", url: 'https://www.strudel.org.uk/lookUP/json/?name='+ob[o], context: this, success: function(data){

        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';