time_slider not in the Map when I exported as HTML
isaacarroyov opened this issue · 1 comments
isaacarroyov commented
I'm creating a map with a slider in it. In the notebook, everything runs fine:
import ee
ee.Initialize()
import geemap
from ipyleaflet import basemaps
# . . .
# . . .
Mapa = geemap.Map(basemap = basemaps.CartoDB.DarkMatter)
Mapa.center_object(geom_mexico, 5)
Mapa.add_time_slider(img_coll_pdsi_tag_month_year, mapVisParamsPDSI,
layer_name = "Índice de Severidad de Sequía de Palmer",
labels = labels_dates,
position='topleft',
slider_length = "300px",
time_interval=1)
However, when I exported the map:
Mapa.to_html("./../charts_html/Mapa_sequia_meses_1960-2022.html",
title = "SequiaEnMexico",
width = "100%", height = "400px")
The slider is not in the HTML file. Am I doing something wrong?
Thanks in advance for the help ✨
giswqs commented
No, ipywidgets won't work when the map is exported as static HTML. You can use voila or solara to develop interactive web apps that support ipywidgets.