Before any person, firm or corporation shall have the right to enter upon the streets, alleys, public parks and grounds of any city of the second or third class for the purpose of piping the same for gas, heat, light, water, or for the construction of any railways, street railways, sewerage system, telephones, or for any other purpose whatsoever, such person, firm or corporation must first procure the passage of an ordinance by the governing body of such city granting unto such person, firm or corporation such right or rights, and in which said ordinance shall be defined fully and at length the terms upon which said right is conceded.
K.S.A. 12-849