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

Maplibre-based streamlit maps do not render in Safari #965

Closed
cassiebuhler opened this issue Nov 8, 2024 · 10 comments
Closed

Maplibre-based streamlit maps do not render in Safari #965

cassiebuhler opened this issue Nov 8, 2024 · 10 comments
Labels
bug Something isn't working

Comments

@cassiebuhler
Copy link

Environment Information

  • leafmap version: 0.38.12
  • Python version: 3.12.7
  • Operating System: macOS Sonoma 14.7.1

Description

I am trying to make streamlit apps that display maps with leafmap.maplibregl. However, I've found that maps on streamlit apps with the maplibre backend don’t appear when they’re opened on Safari on macOS desktop (which also means it can't appear on iPhone browsers).

Please refer to this app for an example:
https://huggingface.co/spaces/giswqs/streamlit-maplibre

It seems to just be a maplibregl module issue, as I’ve tested out leafmap.foliumap (https://huggingface.co/spaces/boettiger-lab/tpl) which showed up just fine in Safari.

What I Did

Clicking the link to view the app. It shows a blank window where the map should display. The image below is a screenshot of the issue:

maplibregl-safari
@cassiebuhler cassiebuhler added the bug Something isn't working label Nov 8, 2024
@giswqs
Copy link
Member

giswqs commented Nov 9, 2024

Can you try out this to see if it works with Safari? I am not sure if this is a leafmap or maplibre issue.
https://eoda-dev.github.io/py-maplibregl/streamlit/

@giswqs
Copy link
Member

giswqs commented Nov 10, 2024

This is probably an issue with Hugging Face. If you clone the app and run it locally, it renders fine in Safari.

image

@cassiebuhler
Copy link
Author

Thanks for looking into this. I cloned your repo and it still isn’t showing up in Safari. I also tried the example you linked and had the same result.

For reference, I’m using Safari 18.1, streamlit 1.35.0, maplibre 0.2.6, and geopandas 1.0.1.

sfparking maplibre-ex

@giswqs
Copy link
Member

giswqs commented Nov 10, 2024

I meant cloning the repo and run it locally, not on Hugging Face

@cboettig
Copy link

@giswqs thanks , note the above examples are already a local jupyterhub, no huggingface involved.

@giswqs
Copy link
Member

giswqs commented Nov 11, 2024

This is probably an upstream issue as the SF Bike Parking example is from the maplibre package. Leafmap is not used in this example.

https://eoda-dev.github.io/py-maplibregl/streamlit/

@cboettig
Copy link

@giswqs thanks, we'll test with that. yeah looks like this is probably upstream of leafmap. Appreciate you testing.

Will have to figure out why your local safari works but ours does not. Just to be clear, you also see safari not able to render in huggingface, but for you safari works locally? can you share your safari version?

(sorry Cassie has Safari but I just have a ubuntu box here)

@giswqs
Copy link
Member

giswqs commented Nov 11, 2024

Correct. Safari can render the streamlit-maplibre app running locally, but it gets a black screen when rendering the same app on Hugging Face.

@giswqs
Copy link
Member

giswqs commented Nov 25, 2024

Closing this issue as it is an upstream issue. Hope it will be resolved upstream soon.

@giswqs giswqs closed this as completed Nov 25, 2024
@cassiebuhler
Copy link
Author

Hey @giswqs, what version of Safari did you test this in? We think it's working in <=17.1 versions but we aren't sure how to test this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants