A few days ago I was planning a road trip with my roommates for spring break and we weren't sure where we could stop on they way to our destination.

What it does

It uses Google Maps to display a route when the user enters a starting and ending location. Then it plots markers along the route of the nearest hotels, attractions, and restaurants. These all have descriptions provided by the TripAdvisor API.

How I built it

I integrated Google Maps first with an autocomplete function for the user to enter their starting and ending points. THe Google Map assumes the user is driving. Then I found a JavaScript program on GitHub that aids in finding coordinates along a route. I coded it to have one of each type of location (hotels, attractions, and restaurants) every 10 kilometers. I took those coordinates and plugged them into the TripAdvisor to get the locations around each coordinate. Then I plotted those locations on the map and configured the information windows for the markers.

Challenges I ran into

Gathering the coordinates along the path, rather than just the first and last locations. Changing the markers on the map from the traditional Google markers.

Accomplishments that I'm proud of

Getting the points along the route functioning.

What I learned

I learned how to use the Google API and tie in the TripAdvisor API to create a custom map.

What's next for Roadies

User selection for the type of locations they want to see (restaurants, hotels, or attractions).

Share this project: