In the canvass of such votes by the election authority , provided in section 22-8 hereof, the election authority shall declare who is elected to any city or town office. In the case of a tie in the election to any city, or to any office voted for only within the territory of such city, it shall be determined by lot, in such manner as such canvassers shall direct, which candidate or candidates shall hold the office, and thereupon the person in whose favor it shall result, shall be declared elected by the order entered in the court as aforesaid.
10 ILCS 5/22-12