No steam, or other railroad or railway, shall be laid, or maintained or operated upon or over any part of any of the parks, open spaces, public squares, beach fronts, water fronts, playgrounds, and other places for resort and recreation of any municipality, and of the boulevards or parkways leading thereto, and connecting the same, except at such places and in such manner as the governing body shall, by ordinance, designate and approve.