add_buttons module
add_buttons.py: Adds download and home page buttons to a folium map.
- get_map_with_buttons(output_map, session_id)[source]
Generate a Folium map with download and homepage buttons.
This function takes a Folium map object and a session identifier and adds download and homepage buttons to the map’s HTML content. It returns the modified map HTML with buttons and a copy of the map HTML without the buttons for saving.
- Parameters:
output_map (folium.Map) – A Folium map object.
session_id (str) – A unique session identifier.
- Returns:
- A tuple containing two elements:
str: The modified map HTML content with buttons.
str: A copy of the map HTML content without buttons for saving.
- Return type:
tuple