Hung Truong: The Blog!

Craigslist and Google Maps Mashup Thingy: Day 1

April 05, 2007 | 1 Minute Read

So I’m sort of looking for housing in Michigan since I’m gonna be living there for two years. The apartments apparently go fast, so I should be looking for them a few months ago. Which is to say now.

A while back, some guy made a mashup of Craigslist and Google Maps. HousingMaps shows a giant google map with pushpins corresponding to communities on Craigslist. I think this was one or two years ago. Since then, other communities have been added to Craigslist, but the person who wrote this site hasn’t updated anything. Guess what? Ann Arbor isn’t one of the communities supported by HousingMaps.

So I figured it’d be a good exercise in coding (in PHP and some javascript for the Google Maps component) for me to do something similar. Sure, I’m not doing anything very original, but at least I’ll learn something, and I think it’ll be difficult enough without being impossible.

So far, I’ve gotten the important chunks of info parsed out of the individual Craigslist listings. Note to Craigslist: Your HTML is horrendous. It is formed: horribly. Okay, so maybe it’s not that bad, but it’s certainly not semantic. Honestly, figuring out how to parse this very crappily formed HTML took some crazy logic, but I think it came out okay in the end.

Next, I’m going to have to figure out putting these listings into the database (shouldn’t be that hard), so that they can populate the map. After that, adding stuff to the map and getting the map to do what I want. Now, sleep.