The governing body of a general-law municipality or special-law municipality may close temporarily or permanently any part of a street or alley for the exclusive use by a railroad company or other corporation having the right of eminent domain or may ratify an ordinance closing a street or alley for that purpose if:
(1) the municipality operates under a municipal charter that authorizes the governing body to take that action; or
(2) a majority of the qualified voters of the municipality voting at an election on the question approve the grant of authority to the governing body.