19 map to html
In [1]:
Copied!
# !pip install leafmap
# !pip install leafmap
In [2]:
Copied!
import leafmap.foliumap as leafmap
import leafmap.foliumap as leafmap
Create an interactive map.
In [3]:
Copied!
m = leafmap.Map()
m.add_basemap("HYBRID")
m
m = leafmap.Map()
m.add_basemap("HYBRID")
m
Out[3]:
Specify the output HTML file name to save the map as a web page.
In [4]:
Copied!
m.to_html("mymap.html")
m.to_html("mymap.html")
If the output HTML file name is not provided, the function will return a string containing contain the source code of the HTML file.
In [5]:
Copied!
html = m.to_html()
html = m.to_html()
In [6]:
Copied!
# print(html)
# print(html)