A simple map navigator application with a graphical user interface (GUI) built using Tkinter in Python. This application allows users to search for locations and view them on an interactive map using Folium.
- Search for Locations: Enter a location name to find and view it on a map.
- Interactive Map: Displays the location on an interactive map with a marker.
- Python 3.x
tkinter
(usually included with Python installations)folium
(for generating interactive maps)geopy
(for geocoding and reverse geocoding)webbrowser
(to open the generated HTML map)
-
Clone the repository or download the script:
git clone https://github.com/yourusername/map-navigator.git cd map-navigator
-
Install the required Python libraries:
pip install folium geopy
-
Run the Script:
python map_navigator.py
- Start the Application: Run the script to open the Map Navigator application.
- Enter Location: Type a location name (e.g., "Eiffel Tower, Paris, France") into the input field.
- Click "Search": The application will generate a map centered on the entered location and open it in your default web browser.
- MapNavigator Class: Handles the GUI and map display logic.
create_widgets()
: Initializes the GUI components.search_location()
: Geocodes the entered location and triggers map display.display_map()
: Generates and saves the map, then opens it in a web browser.
When you run the script and enter a location like "Statue of Liberty, New York, USA," the application will display a map centered on the Statue of Liberty with a marker.
This project is licensed under the MIT License.