-
Notifications
You must be signed in to change notification settings - Fork 145
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
Support API Collections + bug fixes #59
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tested, looks great! One request - to use fetchUri instead of fetch, and one take-it-or-leave-it nitpick.
src/components/Catalog.vue
Outdated
} | ||
|
||
try { | ||
const rsp = await fetch(externalCollections.href); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you use fetchUri here? This allows the proxy functionality to work, and provides an abstraction if there's any other modifications to fetching we want to do in the future.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh, I just copy pasted from externalItems below: https://github.com/radiantearth/stac-browser/pull/59/files#diff-fbae1f7e04ad34c70ca90231db3dd296764917ad88929a0860f4fe50e8627320R364
So I guess we should also change it there?
src/components/Catalog.vue
Outdated
path: href, | ||
to, | ||
title: collection.title || collection.id || href, | ||
url: this.resolve(href, this.url) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Consider assigning this.resolve(href, this.url)
to a const to use once (also used in definition of slug).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also just copied, this time from https://github.com/radiantearth/stac-browser/pull/59/files#diff-fbae1f7e04ad34c70ca90231db3dd296764917ad88929a0860f4fe50e8627320L354 - So I guess I should also change it there?
@lossyrob Thank you, I addressed your issues. As they both originate from other places where I copied the code from, I also fixed it there. |
A first attempt to implement better STAC API support. #48
This allows to show collections that have been referenced the OAFeat way (rel type data on landing page).
Some additional bug fixes sneaked in, see comments. May help a bit with #58?
Demo: https://stacindex.org/catalogs/google-earth-engine-openeo#/?t=collections