Skip to content
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

Merged

Conversation

HaudinFlorence
Copy link
Contributor

@HaudinFlorence HaudinFlorence commented May 10, 2022

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
demo_gallery_short1
demo_gallery_short2

Copy link
Member

@martinfleis martinfleis left a 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 :).

}

getJSON(
"https://raw.githubusercontent.com/geopandas/xyzservices/main/xyzservices/data/providers.json",
Copy link
Member

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.

Copy link
Contributor Author

@HaudinFlorence HaudinFlorence May 24, 2022

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 ?

Copy link
Contributor Author

@HaudinFlorence HaudinFlorence Jun 7, 2022

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.

@martinfleis
Copy link
Member

Hmm, this change does not seem to work on RTD https://xyzservices--114.org.readthedocs.build/en/114/gallery.html

@HaudinFlorence
Copy link
Contributor Author

HaudinFlorence commented Jun 7, 2022

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.
@davidbrochart davidbrochart force-pushed the doc_add_a_gallery_of_basemaps branch 2 times, most recently from 4ee9a29 to 2265168 Compare June 24, 2022 13:09
@davidbrochart
Copy link
Contributor

davidbrochart commented Jun 24, 2022

@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.

Copy link
Member

@martinfleis martinfleis left a 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!

@martinfleis martinfleis merged commit 0d47712 into geopandas:main Jun 24, 2022
@davidbrochart davidbrochart deleted the doc_add_a_gallery_of_basemaps branch June 24, 2022 19:03
@martinfleis martinfleis mentioned this pull request Jul 18, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants