A mashup, in case you don’t know, is a new word that means combining “content from more than one source into anmashup.jpg integrated experience”. I recently purchased a Garmin GPS device, which is useful when you want to amuse yourself on a long roadtrip. It has a little color display that shows a rough-looking map. If I hook a USB cable to it, connect to my laptop and load up my MapSource Topo maps, I can see where I am on a bigger map. Only, MapSource Topographical maps really suck. For one, the interface looks like it was programmed by a five year old, ten years ago. And the maps themselves lack detail and are crudely constructed. I want rich content, I want the elegance of Google maps with the street names overlaid on a satellite map that allows me to pan with the flick of my mouse or zoom with a touch of the scroll wheel. I need a mashup.

And so that’s what I made. I have a web server (Apache through XAMPP) running on my Windows laptop. I wrote a PHP program that calls an external program GPSBabel which queries the GPS unit and returns the current latitude and longitude. The PHP program packages that information and sends it to a web page which creates a Google map (using their API) centered upon that current position. The laptop gets the Google map images through an internet connection over another USB cable connected to my cellphone. The location is refreshed (through AJAX) every 4 seconds.

And it works! Driving to work this morning, Google maps followed me the entire way. The gory details are in my technical blog: GPS + Google Maps Mashup tech details and more details of GPS + Google Maps Mashup

Click the thumbnail for a screenshot of my mashup hack.