(municipal corporations owe their origin to,and derive their powers and rights wholly from,the legislature.