This is a how-to of how I created the ottpee.ca application. This is not a how-to of how to use the bathrooms. You're on your own there.
I wanted to write this up because is it's amazing how little I had to do; maps.ottawa.ca is actually doing all the work behind the scenes. All I did was write a static HTML page to
tell it about the Public Bathrom layer on maps.ottawa.ca
tell it how to generate the popup HTML based on the raw data
It is so simple to do I can even embed the map right here in this article. If you're using anything remotely close to a modern browser you should see an embedded map below.
It is seriously amazing how powerful maps.ottawa.ca is. Fantastically accurate data is sitting right there waiting to be put to use by anyone in the city. The city is doing a great job creating this data and much of it also ends up in the data.ottawa.ca portal as well.
Even better, by accessing the data directly from maps.ottawa.ca it is as accurate as the source data. Copying the data over to the Opendata portal is a good idea; CSV files make it possible for more people to use it. But if I had created ottpee.ca by taking a dump it could easily fall out of date. Using the city's own authoritative data removes this potential failure.
Do you really want to rely on me keeping my copy of bathroom data up to date? That could lead to ... um ... disaster?
So tip-of-the-hat to the unsung heros toiling away in the city's GIS department. You are kicking ass.