-
Notifications
You must be signed in to change notification settings - Fork 32
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
Add a gallery of basemaps to the documentation #114
Add a gallery of basemaps to the documentation #114
Conversation
708612a
to
40a6665
Compare
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.
Hi, thanks a lot for working on this! Though I don't seem to be able to make it work. Neither locally nor on the RTD build (https://xyzservices--114.org.readthedocs.build/en/114/gallery.html), the iframe works. Not sure why though.
I am also not able to review JavaScript code, so if there's someone with JS experience I'd appreciate a bit of help here :).
doc/source/_static/gallery.html
Outdated
} | ||
|
||
getJSON( | ||
"https://raw.githubusercontent.com/geopandas/xyzservices/main/xyzservices/data/providers.json", |
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.
This can cause a bit of a trouble. Our documentation has two versions, one (default) pointing to the latest release, not the main
branch, and the other one using the latest version of the main. This hard-coded approach only works for the latter. If we could fetch it from the shared
folder where pip installs the JSON, it would be much better.
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.
Hi ! Many thanks for the review. First issue with iframe should now be resolved with the last commit. Concerning the second comment, I am not sure to understand how to address it. Do you mean replacing the link by the access path of providers.json ?
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.
I have replaced the url by the access path to the .json file when calling getJSON.
Hmm, this change does not seem to work on RTD https://xyzservices--114.org.readthedocs.build/en/114/gallery.html |
Yes ... I don't know how to fix that. Because the relative path is correctly set in the JS code (I am able to visualize locally gallery.html). And the path given in the gallery.rst for the html file for the iframe src seems also correct... |
…ocumentation menu as Gallery. HERE and JusticeMap can't be displayed. OpenStreetMap.BlackAndWhite and HikeBiking basemaps seem to be broken API.
cfa86f7
to
2673eb3
Compare
4ee9a29
to
2265168
Compare
@HaudinFlorence @martinfleis it works now, make sure to open https://xyzservices--114.org.readthedocs.build/en/114/gallery.html in a new private window to prevent caching. |
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.
Thanks @HaudinFlorence and @davidbrochart,
let's merge this and figure out potential enhancements later!
Add a gallery of basemaps on an additionnal page named Gallery accessible from the documentation menu.
HERE basemaps (with 2 access token) and JusticeMap (problem not identified) can't be displayed. OpenStreetMap.BlackAndWhite, Stadia and HikeBiking basemaps seem not accessible or broken.
Resolve issue #61