An interactive web application that allows users to find and visualize routes between two locations using the GraphHopper Routing API and OpenStreetMap.
- Easy-to-use Interface: Simple form to input start and destination addresses
- Interactive Map: Powered by Leaflet.js, showing the calculated route
- Geocoding: Converts addresses to coordinates using OpenStreetMap's Nominatim service
- Detailed Route Information: Displays distance and estimated travel time
- Responsive Design: Works on both desktop and mobile devices
- HTML5
- JavaScript (vanilla)
- Leaflet.js for map visualization
- OpenStreetMap for base map tiles
- GraphHopper API for route calculation
- Nominatim API for geocoding
- GraphHopper API key (sign up at GraphHopper)
- Web browser with JavaScript enabled
- Internet connection
-
Clone the repository:
git clone https://github.com/yourusername/route-finder.git
-
Replace the API key in the JavaScript code with your own GraphHopper API key:
const apiKey = 'your-api-key-here';
-
Open
index.html
in a web browser or deploy to a web server.
- Enter a starting address in the "From" field
- Enter a destination address in the "To" field
- Click "Find Route"
- The map will display the route and show distance and time information
This project is licensed under the MIT License - see the LICENSE.md file for details
Contributions, issues, and feature requests are welcome! Feel free to check the issues page.
- Muhammad Haseeb - Initial work - haseeb5555
- GraphHopper for providing the routing API
- OpenStreetMap contributors for the map data
- Leaflet.js team for the mapping library
Active development - Bug reports and feature requests are welcome!
⭐️ If you find this project useful, please consider giving it a star on GitHub!