Whenever a written agreement is made pursuant to Section 8360, or has been made and is ratified by Section 8361, each contracting local agency has a public interest in the continued opening and use of any street or highway provided for in the agreement. The legislative body of the local agency in which the street or highway is located, shall only have power to close or vacate the street or highway in accordance with the laws of this state and in accordance with the written agreement evidenced by an effective resolution carrying into effect the written agreement and passed by the legislative body of the other local agency.