
108 Ill. App.2d 251 (1969)
247 N.E.2d 434
Kenneth A. Cooper and Beverly Ann Cooper, Plaintiffs-Appellees,
v.
Village of Lincolnshire, a Municipal Corporation, and Miles L. Abel, Building Commissioner, Defendants-Appellants.
Gen. No. 68-125.
Illinois Appellate Court  Second District.
April 14, 1969.
*252 Klein, Thorpe, Kasson and Jenkins, of Chicago (Robert F. Peck, of counsel), for appellants.
Eugene M. Snarski, of Waukegan, for appellees.
MR. JUSTICE DAVIS delivered the opinion of the court.
On May 1, 1967, the plaintiffs-appellees, Kenneth A. Cooper and Beverly Ann Cooper, presented building plans and specifications for the construction of a single-family residence in the Village of Lincolnshire to its building commissioner and requested a permit to construct a single-family dwelling, which permit issued on May 31, 1967. By its terms, the permit was expressly conditioned on the agreement of the plaintiffs that the construction of the building would conform to all ordinances of the Village relating to the construction of buildings; and was granted by the Village upon the express condition that, whether or not the plans had been approved, the plaintiffs were not relieved from constructing *253 the work in any manner other than according to the Village ordinances.
Thereafter, the plaintiffs proceeded to clear the real estate preparatory to construction, and to excavate for the installation of footings and a concrete basement. The plans and specifications submitted to the building commissioner neither indicated the elevation at which the basement floor of the proposed residence was to be constructed, nor the size of the service pipe to be used to supply water to the proposed residence from the Village water system  there being no requirement for such a showing in the Building Code.
On August 3, 1967, the plaintiffs applied for a permit to connect a one and one-half inch water service pipe to the water system of the Village, and submitted the tap-in fee of $100. The Village, by letter dated August 12, 1967, returned the $100 to the plaintiffs and advised them that their request for a permit for a one and one-half inch water tap was refused on the ground that the Building Code required that a house service pipe to a single-family residence shall be one inch; that an on-site inspection revealed that the excavation for the foundation of the basement of the residence was in the flood plain and, therefore, in violation of the Zoning Ordinance of the Village, which required that any new building shall have a minimum elevation, including the basement floor, of 646 feet above mean sea level; and that before further work was done, such violations should be corrected.
The plaintiffs then filed a petition for a writ of mandamus giving rise to this proceeding. In summary, they alleged that they owned the subject property in the Village which had issued a building permit to them for the construction of a residence; that they had begun to clear the premises and excavate, and had expended large sums of money in reliance on the issuance of the building permit; and that they had discontinued work on the property after receiving notice from the Village that their request for a *254 one and one-half inch water tap had been denied and that their excavation was below 646 feet above the mean sea level, in violation of its Zoning Ordinance.
The petition prayed that the building commissioner be commanded to approve the plans and specifications previously submitted by the plaintiffs, and to reissue to them a building permit for the construction of the building in accordance with such plans and specifications at a depth two feet lower than the existing excavation.
On the trial of the case, the defendants withdrew their answer and admitted all allegations of fact contained in the petition; and moved that the relief prayed for in the petition be denied on the theory that the petition neither specifically nor by inference set forth a clear, legal right for a writ of mandamus on the part of the plaintiffs, or a clear, legal duty on the part of the defendants to perform the acts prayed for.
The trial court denied the defendants' motion, and ruled that the relief prayed for in the petition be granted. An order was then entered by the trial court directing that the writ of mandamus be issued commanding the building commissioner to rescind the stop-work order issued by the Village and to permit the plaintiffs and their agents to construct a building in accordance with plans and specifications submitted to the Village. The order further directed that the defendants permit a connection to the water main in front of the plaintiffs' property for a service pipe of one and one-half inches from the street main to the water meter located on the plaintiffs' property, upon payment of the fee of $100.
The defendants filed a motion to vacate the order of the court, which motion was denied, and this appeal followed.
There appears to be no dispute as to the above stated facts except that the plaintiffs contend that various provisions of the municipal ordinances of the Village concerning standards, applicable to new construction, which are *255 relied on in the defendants' arguments  but which are not contained in the abstract  cannot properly be considered by this court on appeal. We find no merit to this contention.
Section 1 of an Act in relation to Judicial Notice (Ill Rev Stats 1967, c 51, par 48a) provides:
"Every court of original jurisdiction, ... shall take judicial notice of the following:
"First. All general ordinances of every municipal corporation within the city, county, judicial circuit or other territory for which such court has been established, or within the city, county or judicial circuit from which a case has been brought to such court by change of venue or otherwise."
And, section 2 thereof (Ill Rev Stats 1967, c 51, par 48b) provides:
"Upon the review by any court of appellate jurisdiction of a judgment, order or decree of an inferior court the court of appellate jurisdiction shall take judicial notice of all matters of which the inferior court was required to take judicial notice, ...."
[1] It is clear to this court that the various municipal ordinances of the Village are proper subjects for judicial notice by this court. City of Countryside v. Oak Park Nat. Bank, 78 Ill. App.2d 313, 315, 223 NE2d 293 (1966); Liberty Nat. Bank of Chicago v. Vance, 3 Ill. App.2d 1, 5, 120 NE2d 349 (1954).
[2, 3] Mandamus is an extraordinary legal remedy and will not lie until a clear and legal right to the writ becomes apparent. People v. County of LaSalle, 378 Ill Ill 578, 580, 39 NE2d 25 (1942). In the case at bar, the plaintiffs' petition is fatally deficient in several respects. Facts were not alleged in the petition which showed a clear, legal right to the relief granted, or a clear, legal duty on the part of the defendants to perform any act *256 under a municipal ordinance of the Village, and the writ of mandamus will be awarded only where there is such a showing. People v. City of Chicago, 280 Ill. 576, 580, 117 NE 779 (1917); People v. Busse, 248 Ill. 11, 16, 93 NE 237 (1910).
[4] Instead, the plaintiffs alleged general facts which the defendants admitted by withdrawing their answer to the petition, but which established no right of the plaintiffs or duty on the part of the defendants. However, in order for the plaintiffs to be entitled to a writ of mandamus, there must necessarily be a showing that they were in compliance with the applicable ordinances governing issuance of building permits. People v. City of Chicago, supra, 580; People v. Busse, supra, 18, 19. Furthermore, the petition did not allege that the defendants refused the plaintiffs the right to construct a residence according to their plans and specifications. The record, in fact, showed a willingness on the part of the defendants to permit the construction if the applicable building ordinances were complied with.
[5] The writ of mandamus will not issue to compel an act which the person sought to be coerced is willing to do. The purpose of the writ is to compel action by the unwilling. People v. Circuit Court of Pulaski County, 393 Ill. 520, 528, 66 NE2d 420 (1946); People v. Dunne, 258 Ill. 441, 447, 101 NE 560 (1913); People ex rel. Cobine v. Angsten, 274 Ill. App. 5, 9 (1933).
[6-8] The plaintiffs urged the rule that no pleading is bad in substance which contains such information as reasonably informs the opposite party of the claim he is called upon to meet. We have no quarrel with this rule in that the general policy of the Civil Practice Act has been toward a liberal construction of pleadings. However, acceptance of this rule does not do away with the necessity of stating a cause of action in any case including one asking for a writ of mandamus.
*257 In Daniels v. Cavner, 404 Ill. 372, 88 NE2d 823 (1949), at pages 375 and 376, the court stated:
"Mandamus is an extraordinary remedy, and one seeking the writ must show a clear right to it. (Wilson v. Board of Education, 394 Ill. 197; Friedman v. City of Chicago, 374 Ill. 545; People ex rel. Davidson v. Bradley, 382 Ill. 383.) A petition for mandamus must set forth every material fact necessary to show that it is the duty of the person against whom the writ is sought to perform the acts sought to be compelled. (People ex rel. City of Chicago v. Board of Review, 326 Ill. 124; People ex rel. Parker v. Board of Appeals, 367 Ill. 559.) The burden rests on the relator to show every material fact necessary to establish the existence of such right and duty. (People ex rel. Callahan v. Whealan, 356 Ill. 328.)"
[9] Even though we accept the allegations of the plaintiffs' petition as true, it still fails to state a cause of action. Consequently, the judgment awarding the writ of mandamus is reversed and the cause remanded to the Circuit Court with directions to cancel the writ and dismiss the petition.
Reversed and remanded with directions.
MORAN, P.J. and ABRAHAMSON, J., concur.
