but i ve got an error , unable to fetch the json
Problem accessing service http://www.astrophotozone.com/am_test_service.json. Fetch Error :
the file is avaible on the net , i dont understant why it does work
“Access to fetch at ‘https://www.astrophotozone.com/am_test_service.json’ from origin ‘https://ruuth.xyz’ has been blocked by CORS policy: No ‘Access-Control-Allow-Origin’ header is present on the requested resource. If an opaque response serves your needs, set the request’s mode to ‘no-cors’ to fetch the resource with CORS disabled.”
My understanding is that you need to set on your web server a setting as
Otherwise browsers will block cross origin requests.
There are two solutions I can see:
Your server https://www.astrophotozone.com should allow cross origin requests as described above. I changed setting on Access-Control-Allow-Origin setting to * on my own site and it solved the problem when I got a similar error.
Copy AstroMosaic.html to your site and run it from there. Then you do not get automatic fix updates but avoid changing site settings.
It is also possible to set a browser extension that allows cross origin requests. But it is not a generic solution.
Here is a web site that explains the case quite well:
I just tested and yes, you need to the the .js file too.
Maybe the easiest way is to go to https://github.com/jarmoruuth/AstroMosaic/releases, download the source code zip file and unzip all files to your destination folder. Then it is easy to update to the latest version if needed.
Hi
i ve test it this weekend , it works nice when i put the two file on my website .
so i can make a link on a google sheet for my target list. Thanks for your work !
just a question , is your api able to catch only the rise , set and transit time of an object ?