In many major cities it is hard to find a public restroom. This article in Slate details the building of public pay toilets in the U.S.. In most cases pay toilets in the US bring in far less “sales” (25 cents per use) than maintenance cost. Cities make toilets profitable to companies by allowing advertising on the outside of the booth.
In many cases extra toilets are located in places where homeless people would congregate, losing the 25 cents fare might be a good trade off if it prevents public urination.
However, in some places free toilets might not be enough to encourage the use. The slate article discusses payments to villagers in India to use the public toilet in order to prevent human waste pollution. Another idea is to try to change the norm of public deffication and urination. A paper presented at a conference I attended recently by Dickinson and Pattanayak (linked here) highlights a program in India that successfully combined subsidies for latrine construction with social mobilization programs to encourage the use of latrines.