Updated Simple Google Maps Locator

Note: I updated this as of 4.13.09 to a DOM based version. It was having some issues related to the XHTML strict doctype. All linked files are up to date.

Every once in while, the cheap route does just fine. I’m not one to accept parity, but sometimes you have to embrace the path of least resistance.

I just finished up a very short task with a non-profit client who was interested in some type of city/state/zipcode locator. Orgs in the non-profit sector are always concerned with the bottom line, and although that can be frustrating at times, in this case it seemed to have worked out.

Here are the issues we had to overcome:
  • Providing a list of locations was literally going to involve tens of thousands of records. There’s anywhere from two to fifty in every town in the U.S. It’s doubtful the client could have delivered their end of that in a reasonable time frame.
  • There just wasn’t room in the budget to get into complicated server apps and development APIs that would produce a “self-hosted” solution.
  • User experience for this client has been a real struggle. If we couldn’t lead them to water very quickly the process would get out of control in a hurry.

Now I am never one for the bootstrapping methods. I hate them and I think they are the cheap way out. You risk diluting your brand and simultaneously gum up the user experience. But I also had previous experience implementing this type of task with the Google Maps API. I thought it was great in the end, but there was a much larger budget and even a fully customized implementation was filled with compromise.

The business goal of the site was to get people out to their locations, not overwhelm with a rich experience. Why not embrace that fact that Google services will provide a very quick solution if we stop the brand whoring for a second and just get out of the way. Google in the end will probably do more to get people mobilized anyway. A second break comes in the fact that it’s not a really competitive space in a traditional business sense, the client was interested in usefulness, not micromanaging search results.

So – a few hours later (mostly in testing) and 20 lines of code later, we have a simple simple simple locator for use with Google Maps. It could be used for any site as long as you don’t mind trusting your search results to the brains at Google, and you don’t mind linking offsite. If you wanted to get into manipulating search you could use this as a springboard for doing so. The URL parameters in Google Maps are pretty damn cool.

Get a copy of the source code, and do what you want with it. I’m letting the world have it under the GNU license.

Certainly not groundbreaking. But if this saves anyone out there even a minute of time – it’s worth it.

Users will give you more credit for knowing when to get out of the way, rather than trying to manage everything they interact with.