☰Read-only archive⌕
Looking for help with Bokeh?

This is a read-only archive. Ask questions and join the conversation on GitHub.

Visit Community Support on GitHub →
Archived discussions · Captured October 28, 2026

Way to embed arbitrary html inside of Bokeh App layout?

Community Support
Jason_Ross
Jason_Ross

I have a mutli-tab bokeh dashboard with lots of graphs for my companies data. I now want to get a google map in there and I’m finding the bokeh google map rendering/interaction not very satisfying. I much prefer folium. So I’m wondering if there is a way to generate a folium map in my applications python and the embed the html into the bokeh layout so it shows up where I want it? Below code generates a map and saves the html to a file for reference

import folium

m = folium.Map(

location=[45.5236, -122.6750],

tiles=‘Stamen Toner’,

zoom_start=13

)

f = open(‘test.html’,‘w’)

f.writelines(m.get_root().render())

⌁   Link to post
Jason_Ross
Jason_Ross

It looks like someone accomplished something similar using an iframe in a Dash dashboard…
https://medium.com/@shachiakyaagba_41915/integrating-folium-with-dash-5338604e7c56

···

On Tuesday, May 21, 2019 at 2:39:18 PM UTC-7, Jason Ross wrote:

I have a mutli-tab bokeh dashboard with lots of graphs for my companies data. I now want to get a google map in there and I’m finding the bokeh google map rendering/interaction not very satisfying. I much prefer folium. So I’m wondering if there is a way to generate a folium map in my applications python and the embed the html into the bokeh layout so it shows up where I want it? Below code generates a map and saves the html to a file for reference

import folium

m = folium.Map(

location=[45.5236, -122.6750],

tiles=‘Stamen Toner’,

zoom_start=13

)

f = open(‘test.html’,‘w’)

f.writelines(m.get_root().render())

⌁   Link to post
Jason_Ross
Jason_Ross

Well I figured this out. This test.html file needs to be put into a Div object using an iframe and if it’s going to be served in a a Bokeh app, the file must live in the “static” folder inside the app directory.

···

On Tuesday, May 21, 2019 at 2:39:18 PM UTC-7, Jason Ross wrote:

I have a mutli-tab bokeh dashboard with lots of graphs for my companies data. I now want to get a google map in there and I’m finding the bokeh google map rendering/interaction not very satisfying. I much prefer folium. So I’m wondering if there is a way to generate a folium map in my applications python and the embed the html into the bokeh layout so it shows up where I want it? Below code generates a map and saves the html to a file for reference

import folium

m = folium.Map(

location=[45.5236, -122.6750],

tiles=‘Stamen Toner’,

zoom_start=13

)

f = open(‘test.html’,‘w’)

f.writelines(m.get_root().render())

⌁   Link to post

End of archived discussion · Replies are disabled