This is the first entry in a series of post about converting Google Maps directions to GPX. Update #1, Update #2, Update #3, Update #4, Update #5, Update #6.
Every time I need to use our Satnav (Garmin Nuvi) I find myself in the same impossible place.
I have planned a route and stops in Google Maps (because yes, it is simply awesome) and now I need to get this information onto my satnav. And every time I realize that no, there is no easy way to do this yet! I should have done this the last time.
Unfortunately the existing solutions don't create the exactly correct format for route planning, e.g. http://www.gpsvisualizer.com.
So this time I decided to be the change and build a simple but powerful converter to get route and waypoint information from the Google Maps website to a Satnav supported format. I focused on a converter to the GPX format.
The project
Due to the fact that Garmin has decided to abandon their rather awesome Communicator plugin, I needed to figure out how to get from maps.google.com and to the satnav device.
Currently this project is going to be divided into the following sub components:
Google Maps Directions Parser Requirement would be that the user could, with minimal effort, point the parser to already prepared directions using officially supported ways to share.
Website to visualize and manage the preparation of the GPX files. Simple website that allows finding and adding new waypoints and importing direction routes directly. Ideally this would incorporate a Google Map instance as well as their Place and Directions services.
*Application to upload the resulting GPX file to the satnav Maybe this is needed. It seems like there are quite a few applications that can interact with various devices. Perhaps this step is unnecessary if I simply support more file formats.
Hacking Google Maps
After spending an evening digging around under the covers on maps.google.com and learning about the different ways that they handle and integrate directions and services I was able to build a web service that when given a maps link can extract start, end and all intermediate waypoints on a A to B route (between two places, support for more destinations is pending).
The link is obtained by copying the "share this map" link and pasting directly into my webform. Below is a gif explaining how to obtain the link.
Here is a link to pre made directions for your convenience :)
This article is also available on LinkedIn: https://www.linkedin.com/pulse/converting-google-maps-directions-gpx-data-sverrir-sigmundarson
Developer & Programmer with +15 years professional experience building software.
Seeking WFH, remoting or freelance opportunities.