-
Notifications
You must be signed in to change notification settings - Fork 4
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
Added RACS and VAST Pilot surveys to Aladin #284
Conversation
I still have CORS issue. We need to fix that before merge. |
This isn't a problem with our code or configuration. The ATNF web server isn't sending the appropriate CORS headers. However, you'll notice that loading the HiPS surveys from there still works! Looking at the Aladin Lite source, it has a mechanism in place to circumvent CORS issues by using a proxy. To determine if it needs to proxy the request, it first attempts to fetch the HiPS properties file. If there is no error, it will then attempt to fetch the image tiles with CORS enabled. If there was an error (e.g. a CORS error), it will attempt to fetch the image tiles through a proxy. It is this error that gets logged to the console by the browser as it was a request that failed. Aladin has attached an error handler to the request to then proceed with proxied requests, but that won't stop the browser from logging an error for the initial failed request. As far as I know, there isn't anything we can do to prevent that. To fix, I think we'd need to do any of the following:
Otherwise, I think we just ignore it and move on. We seem to only get one or two errors, and thankfully not one for each image survey. |
For reference, this is where that initial "test" request happens in the Aladin Lite source It would be nice if we could trigger the else block with an extra option as I mentioned above, but I don't think it's worth pursuing that option. Aladin Lite will log a lot of errors when you navigate to an area of the sky not covered by the HiPS survey, so we're likely going to have JS errors anyway. |
I guess it might not hurt asking if they could configure the CORS header, even though yes I agree it's very unlikely. Where would we direct that, do you know? It's just a bit frustrating as while the HiPS load, they load poorly with the option to change the colour scheme missing. But you're right about Nimbus, we don't want to be hosting them there. So I'm not sure what the 'solution' would be for this apart from users installing the CORS extension to their browser! |
Probably Vince McIntyre at CASS. Might be better to ask Emil first. I don't think we need to do anything. The error is just the browser logging that a request failed, which Aladin expected and handles. It just doesn't suppress the error, I guess because there isn't a way to do so. The error is transparent to the user unless they're looking at the Javascript console. |
But the user does see the error indirectly by having a non-fully functional HiPS to look at. But I agree there's nothing we can do about it. |
Sorry, I missed that. You're right, I just spotted this:
Pretty frustrating that it tells us that on an "examples" page rather than in the API docs! |
I've asked Vince about this. |
* To account for lower res VAST HiPS.
We can incorporate this in the first release |
Default loaded survey set to RACS.
There's just the CORS question, it may work fine in production?
Fixes #282.