When a county hospital is located on land outside of but adjacent to a city, the ordinances of the city relating to fire and police protection and control, sanitary regulations, and public utility service shall be in force upon and over the hospital and grounds, and the city shall have jurisdiction to enforce those ordinances.