MCPcopy Create free account
hub / github.com/python-visualization/folium / iframe

Function iframe

docs/_static/flask_example.py:32–53  ·  view source on GitHub ↗

Embed a map as an iframe on a page.

()

Source from the content-addressed store, hash-verified

30
31@app.route("/iframe")
32def iframe():
33 """Embed a map as an iframe on a page."""
34 m = folium.Map()
35
36 # set the iframe width and height
37 m.get_root().width = "800px"
38 m.get_root().height = "600px"
39 iframe = m.get_root()._repr_html_()
40
41 return render_template_string(
42 """
43 <!DOCTYPE html>
44 <html>
45 <head></head>
46 <body>
47 <h1>Using an iframe</h1>
48 {{ iframe|safe }}
49 </body>
50 </html>
51 """,
52 iframe=iframe,
53 )
54
55
56@app.route("/components")

Callers

nothing calls this directly

Calls 1

_repr_html_Method · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…