opengeos / leafmap

A Python package for interactive mapping and geospatial analysis with minimal coding in a Jupyter environment
https://leafmap.org
MIT License
3.22k stars 386 forks source link

Gradio app blank #947

Closed robmarkcole closed 2 weeks ago

robmarkcole commented 2 weeks ago

Environment Information

MacOS & vscode & chrome

Description

Run the demo app

What I Did

Doesn't display:

image
giswqs commented 2 weeks ago

I have not used gradio for a long time. Need to look into it

giswqs commented 2 weeks ago

Gradio does not have good support for folium. It appears that their gradio-folium package is no longer functioning. I don't think I will invest time to further develop this. I recommend using solara instead, which has native support for ipyleaflet. See examples here.

https://github.com/gradio-app/gradio/issues/3190#issuecomment-1781778216

pip install gradio-folium
import gradio as gr
from gradio_folium import Folium
from folium import Map

with gr.Blocks() as demo:
    map = Folium(value=Map(location=[25.7617, -80.1918]), height=400)

demo.launch()