Getting started with Google Maps

One of the projects I’ve been working on in my free time is a web site for the wedding. Nothing too fancy, this is a little two or three pager with just the basic info, dates, locations, some pictures, and so on. I’m not posting a link because it’s not up yet, but I will when it’s ready. I’m a hopeless designer, so Sarai will be doing this part before it goes up.

We thought it would be neat to have Google Maps for the wedding location and recommended hotels in the area (since most of our guests will be from out of town). I took a look over the Google Maps API and was pleasantly surprised. I haven’t written much JavaScript and I’ve never implemented a third-party API before, but I was able to start from scratch and have a finished project in the space of last weekend. I’m not doing anything complicated, just two maps on a single page with JavaScript wrappers to avoid code duplication, but a few hours work from zero to completion is pretty good, I think, especially when you consider that it was entirely new to me.

In addition to Google’s great API documentation, I picked up a copy of the Google Maps API, V2 e-book from the Pragmatic Programmers. Part of their Fridays series, this is an inexpensive book, only available in PDF format, with short, focused information on a single topic. At $8.50 for a 75 page PDF, I think this was a pretty good deal. This and the API docs were all I needed to get up and running. I probably wouldn’t have bought something like this from many other publishers but I have a few other titles from the Pragmatic bookshelf and find them to be well written and accessible.

From this admittedly limited exposure, I’ll say Google Maps are really nice to work with. It’s amazing how easy it is to get this kind of functionality for your own site just using simple JavaScript. I had a bit of trouble at one point getting an event listener to work, but aside from that most of my time was spent figuring out what I wanted to do and reading about how to do it, as opposed to fighting with it to make it work.