An interactive map presentation tool built with Python and Folium, allowing users to visualize markers, lines, and polygons with associated multimedia content. The map includes features like tile layer switching, coordinate copying, and length/area calculations for lines and polygons. Fun way to tell a quick story.
- Markers, Lines, and Polygons: Display various geometries with custom styles and content.
- Tile Layer Switching: Automatically switch tile layers when navigating between bookmarks.
- Coordinate Copying: Click anywhere on the map to copy latitude and longitude to the clipboard.
- Length and Area Calculations: Automatically calculate and display the length of lines and the area of polygons.
- Navigation Pane: Easily navigate between bookmarks using a side panel.
- Zoom Level Indicator: Display the current zoom level on the map.
- Layer Control: Toggle between different tile layers using the built-in layer control.
- Python 3.6 or higher
- Virtual Environment Tool:
venvorvirtualenv
- Clone this Repository
git clone https://github.com/SeaDude/interactive-map-presentation.git- Navigate to the Project Directory
cd interactive-map-presentation
- Create a Virtual Environment
python3 -m venv venv
- Activate the Virtual Environment
- On macOS and Linux:
source venv/bin/activate - On Windows:
venv\Scripts\activate
- Install the Required Packages
pip install -r requirements.txt
-
Update bookmarks.json
- Modify the bookmarks.json file to include your own markers, lines, and polygons.
- Ensure that the tile_layer names match the available layers: "Esri Satellite", "Dark Matter", "OpenStreetMap", "Positron".
-
Run the Script:
python map.py -
Open the Generated Map
- The script will generate a file named presentation.html.
- Open this file in your web browser to view the interactive map.
map.py: The main Python script that generates the interactive map.bookmarks.json: A JSON file containing the bookmarks (markers, lines, polygons) and their properties.requirements.txt: A file listing all the Python dependencies required for the project.presentation.html: The output HTML file containing the interactive map (generated by running map.py).
- OpenAI: For co-developing this with me
- Claude: For also co-developing this with me
- Folium: For providing a powerful library to generate interactive maps.
- Leaflet.js: The JavaScript library powering the interactive map features.