Google Maps Mashup: fire station distance finder

posted 10 November 2008, updated 10 November 2008

If you live in San Francisco and you are applying for renter's insurance, the insurance form will ask you how far your house is from a fire hydrant. It turns out there's no really easy way of working this out. If you search for fire station, you get one or two of the actual stations and a bunch of fire-related businesses. No good.

If you dig around the SF fire department's home page long enough, you might find this list of fire stations in San Francisco, which at least gives their addresses. But short of reading every single address and mapping it to a location in your head (omg! so much thinking!) you wouldn't know which one was closest, and if two were pretty similarly close you'd have trouble working out which one. Pshaw! We live in the future, there's got to be a better way!

My first thought was to try and build a Google MyMap of the stations. This involved a lot of tedious cutting and pasting, which I started to do, but then I realized it still wouldn't tell me which was closest -- I'd have to do all the comparison work myself! Clearly unacceptable.

So, after a few hours of fiddling around with websites, here you go: the San Francisco fire station distance finder app. See where all the stations are at a glance, and better yet, type in your address and it will tell you precisely which one is the closest to your house, and exactly how far away it is -- ta-da!

Of course, cynics might note that it took me about 3 hours to develop this and a further 2 hours to get it launched (because I spent 90 minutes debugging what turned out to be a lowercase "i" when I should have been using an uppercase one...) and that I completely failed to actually buy any renter's insurance, which is going to be super ironic when my house burns down tomorrow. But there's all sorts of side benefits:

  • I got to play with the Google Maps API, which I've been meaning to do for a while
  • I got to build some javascript, which I'm way out of practice with.
  • If I ever move, I can easily recaculate my fire station distance
  • Other people can use it to calculate their own fire station distances. I'm helping the city!
  • It gives me something nerdy to blog about
  • We live in the future. You have to do it the complicated way. Duh.