Folium Flask AppΒΆ
folium_flask_app is a function for serving an interactive Folium map via Flask that binds map clicks with python functions.
[1]:
import webbrowser
from werkzeug.serving import run_simple
from dpd.folium import folium_flask_app
hostname = "localhost"
port = 9000
app = folium_flask_app()
webbrowser.open("http://" + hostname + ":" + str(port))
run_simple(hostname, port, app)
* Running on http://localhost:9000/ (Press CTRL+C to quit)
127.0.0.1 - - [20/Mar/2020 17:16:47] "GET / HTTP/1.1" 200 -
127.0.0.1 - - [20/Mar/2020 17:16:48] "GET /favicon.ico HTTP/1.1" 404 -
[ ]: