I don’t know if you’ve seen the City of Vancouver’s Polling Station Lookup Tool. It’s really, really terrible. And I figured that I could do something better. So I tooled around with the Google Maps API, drew up the regions, entered the polling stations into a DB, spent a couple hours coding and hey presto! I present to you: My Maps-based Polling station lookup tool!
Because I drew the voting division boundaries myself in Google maps, there’s a peculiar bug (It stems from the algorithm I use to determine whether a co-ordinate is within a particular polygon), which is if your address is right on the boundary line between two divisions, it is possible that the tool will push you into the wrong division. I suspect most of this stems from the lack of precision in the geocoding of the address lookup vs the precision of the boundaries – the divisions have a couple extra decimal points of precision, so the “dot” that is your address is pretty big on the map.
So, for 98% or so of all users, this will be accurate, but I do warn you – there’s the odd chance that this will return you the wrong polling station. If you think you might be on a boundary, I did include the map of the voting divisions, where you can view the divisions as I drew them on the map – and you can see that it’s not perfect….
I’d been wanting to do something with the Google Maps API for a while – this was a good project to wet my feet with, as I’ve got some upcoming work that will use this sort of stuff more more extensively. As a side note, while I prefer the Yahoo maps API (I tried out both), the actual maps in Google Maps are so much more pleasant that I ended up using Google Maps.
so again, here’s the link to my Polling Station Lookup Tool