Nothing in this article shall be construed to authorize the doing of any work outside the county without the consent of the legislative body of the county in which the work is to be done if in unincorporated territory or of the legislative body of any city in which any of the works are situated in whole or in part.