Death’s Door Spirits: Mapping Wisconsin’s Finest Craft Distillery

I only have a few rules in life. One of them is when the makers of this gin offer you a straight-up trade–bottles for maps–you take it… and you don’t cut your partners in on the deal. That was the situation when a friend-of-a-friend approached me to build this simple locator Google maps mashup which I took on as a side-project away from my normal Axis Maps work.

Death’s Door Spirits is a craft distillery based out of Washington Island, WI and distilled in Madison, WI. They use locally-sourced ingredients for their gin, vodka, and whisky which they distill in small batches. While their small-scale makes their products excellent, it also makes them tricky to locate. The purpose of the map is to simply show where you can buy bottles or cocktails containing their spirits.

Since the map was so straightforward, it gave me the opportunity to experiment with a few new technologies I’ve been meaning to check out. Here’s what I thought…

Styled Google Maps:Death’s Door has a fantastic graphic identity thanks to some great work by Grip Design (who also contributed some designs to this map). I wanted the map to fit in with their existing style while stripping out a lot of the extra Google Maps data that would clutter up a map like this. Google Maps Styled Map API allowed me to do both. The styled map wizard was helpful for sketching out styles but mostly I was making whole groups of features invisible and going with stock colors for the roads and water. Not being able to input RGB values for these styles made the process harder than it should have been.

Amazon SimpleDB / CloudFusion: I’ve been a big fan of Amazon’s SimpleDB technology since we used at as the foundation for indiemapper user management. I’ve found it to be more reliable than MySQL and faster as well (but that could just be our budget hosting plan). It was a little unapproachable to me at first but the CloudFusion PHP library made it as easy–if not easier–to query the database and parse the results for the map. The biggest missing feature here is a nice front-end browser like PHPMyAdmin which would have allowed the client to edit their data directly. Instead, I had to build some rudimentary tools so they could manage their data themselves.

Google Font Directory: It was nice to have access to a wider variety of fonts than just the standard web-safe font-family sets. The Google Font Directory gave me access to a limited but FREE selection of a nice variety of fonts distributed across Google’s massive network. Most useful was Yanone Kaffeesatz which is a dead ringer for the Death’s Door title font. The fonts can be a lot to load at runtime so it was important to pare down only to the fonts I was using in the map.

jQuery Ajax / jQueryUI: Made it incredibly easy for someone with my level of programming skill (let’s call it “recreational” to be polite) to efficiently get the data into the map and build some nice UI effects like animation and the accordion component. I can’t recommend it highly enough so there’s going to be no italics section with the caveats in it.

You’re right. All the data is stored in SimpleDB, attributes and geography. Since it’s just simple point locations, there’s just a field for both lat and lon which essentially makes the data just a simple table (except for being able to define multiple attribute pairs for locations that stock multiple kinds of booze).

I loop through each point (not very efficient; lots of room for improvement here) calculate the change in x and y (“Delta X” if you’re a high school geometry teacher) and then run the standard equation for distance to determine the distance from the target:

From there I do some unit conversion (multiply by 111 to get from degrees to kilometers and multiply by 1.6 to get from kilometers to miles) and then push the matches into their own array so I can adjust the display from there.

It’s not the most efficient or accurate function but for a map of this size and complexity, it does the job just fine.