You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@output
@render_widget
def ddd():
return m()
# return m # Does NOT Work
# return m._repr_html_() # Does NOT Work
# return L.Map(center=(51, 0), zoom=12) # WORKS!
app = App(app_ui, server)
The text was updated successfully, but these errors were encountered:
Description
Looking for way to display outputs from Folium and pivis.Network on Shiny
Code attached. Works for ipyleaflet maps.
import folium
from shiny import *
from shinywidgets import output_widget, register_widget, render_widget
import ipyleaflet as L
m = folium.Map(location=[45, -122], zoom_start = 12)
m.save('map.html')
app_ui = ui.page_fluid(
ui.output_text_verbatim("txt"),
output_widget('ddd')
)
def server(input, output, session):
@output
@render.text
def txt():
return 'Map from Folium'
app = App(app_ui, server)
The text was updated successfully, but these errors were encountered: