Google Maps Distance Calculator is a web application that allows users to calculate the distance between an origin and a destination with multiple stops in between. The app uses Google Maps APIs to display the route and calculate the distance.
- Add multiple stops along the route.
- Autocomplete suggestions for locations using Google Places API.
- Calculate the total distance of the route.
- Display the route on Google Maps.
- Remove stops from the route.
- Responsive design for both desktop and mobile devices.
Live Website - Google Maps Distance Calculator
- Google Maps APIs
- Maps JavaScript API
- Places API
- Directions API
- @react-google-maps/api
- @reach/combobox
-
Clone the repository:
git clone https://github.com/your-username/google-maps-distance-calculator.git cd google-maps-distance-calculator
-
Install the dependencies:
npm install
OR
yarn
-
Create a
.env
file in the root directory and add your Google Maps API key:GOOGLE_MAPS_API_KEY=your_google_maps_api_key
-
Start the development server:
npm start
OR
yarn start
- Open your browser and navigate to
http://localhost:3000
. - Enter the origin and destination locations.
- Add multiple stops by clicking the "Add another stop" button.
- Click the "Calculate" button to display the route and distance.
- Fork the repository.
- Create a new branch (git checkout -b feature-branch).
- Make your changes.
- Commit your changes (git commit -m 'Add new feature').
- Push to the branch (git push origin feature-branch).
- Create a pull request.
This project is licensed under the MIT License.