19 map to html
In [ ]:
Copied!
# !pip install leafmap
# !pip install leafmap
In [ ]:
Copied!
import leafmap.foliumap as leafmap
import leafmap.foliumap as leafmap
Create an interactive map.
In [ ]:
Copied!
m = leafmap.Map()
m.add_basemap("HYBRID")
m
m = leafmap.Map()
m.add_basemap("HYBRID")
m
Specify the output HTML file name to save the map as a web page.
In [ ]:
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 [ ]:
Copied!
html = m.to_html()
html = m.to_html()
In [ ]:
Copied!
# print(html)
# print(html)