When any such telegraph or telephone company shall desire to construct lines on or along the lands of individuals, or on the right-of-way and structures of any railroad, the telegraph or telephone company may, by its agents, have the right peacefully to enter upon such lands, structures, or right-of-way, and survey, locate, and lay out its lines thereon, being liable, however, for any damage that may result by reason of such act.