问题
I would like to add a folium map to a bokeh tab. Is it possible?
When I try i have an error like: expected an instance of type LayoutDOM, got folium of type map.
Otherwise is there another way to do chart in python with map and include it in tab?
Thank you :)
回答1:
Bokeh has its own set of objects to represent the built-in widgets that it can display. Only these Bokeh objects can go inside Bokeh layouts like tab panes. However, one of the available widgets is Div, which let you put an HTML div with arbitrary content inside a Bokeh layout e.g.
div = Div(text="whatever HTML code you want")
layout = column(plot, div)
So you could put the raw HTML for a map as the content for one of these Div
objects.
来源:https://stackoverflow.com/questions/56809038/include-folium-in-bokeh-tabs