The governing authorities of municipalities shall have the power to regulate parks, public grounds, depots, depot grounds, and places for storage of freight and goods within the corporate limits. Said authorities shall have the power to compel railroads and other common carriers of passengers to furnish and maintain sanitary water toilets, where the municipality has a waterworks system, the facilities of which are available to said railroad or other common carrier, and in other cases to have a sanitary toilet, in their depots or stations. Said authorities shall have the power to provide for and regulate the construction and passage of railways and street railroads through the streets, avenues, alleys, lanes, and public grounds of the municipality.