#!/usr/bin/env python # coding: utf-8 # ![Saudia XYZ logo](http://alasmari.net/saudia-logo.png) # ***Code:*** Saving maps as a html file
# ***Main Source:*** leafmap
# ***Edited by:*** Saudia.xyz # # # Uncomment the following line to install leafmap if needed. # In[7]: # !pip install leafmap # In[8]: import leafmap.foliumap as leafmap # Create an interactive map. # In[9]: m = leafmap.Map(center=(24, 45), zoom=5) m.add_basemap("HYBRID") m # Specify the output HTML file name to save the map as a web page. # In[10]: 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[11]: html = m.to_html() # In[12]: print(html)