Opinion by
Mr. Justice Williams,
. The charter of the Turtle Creek Electric Railway Company authorized the building of a street railway with a circuit six or *590more miles in length. The route described passed through several boroughs and one township. The authority conferred by the charter was subject to the action of the boroughs and townships whose highways it was proposed to occupy. Until the consent of each and all of these had been duly obtained the company had no right to enter upon the construction of its line of railway or any part of it, and any attempt to do so could be restrained or punished as circumstances might seem to require. The completion of any part of its line without having obtained the necessary local consent of all the municipalities affected would have been an unauthorized occupancy of the publie streets by their tracks, and such occupancy could have been summarily ended at the instance of the public officers, or of any person having a standing to object. Municipal consent to a line of street railway connecting a given municipality with other towns or cities is to be understood as limited to the construction of the line proposed, and it would not justify the company to Avhich it was given, in building and operating a local road Avithin the boundaries of that municipality. This was distinctly said in Penn. Railroad Company v. Montgomery County Passenger Railway Co., 167 Pa. 62. The projected road is a unit. It cannot be cut up into fragments by the corporation for its own advantage, and at its oaaui pleasure. When this is attempted the company and its employees become trespassers and may be treated as such: Thomas v. Inter-County Street Railway, 167 Pa. 120. These principles were clearly stated and applied by the learned judge of the court below in this case, and in accordance with them the injunction prayed for was granted. What is now complained of is that the decree was not so comprehensive as the plaintiff thinks it should have been. We have no doubt the decree would have been more comprehensive if the bill had been drawn with a fuller knowledge of the situation; but the learned judge was impressed with the belief that the main purpose of the proceeding was the protection of the plaintiff’s property in the borough of Wilmercling, and its Wilmercling branch of its main line of railroad, and he directed his attention to this subject and made the restraining order necessary to extend the desired protection. The findings of fact and of law and the decree resting, on them do not affirm the legality of any single act of the defendants in relation to *591the construction or operation of their road, but enjoins against the threatened trespasses upon the property of the plaintiff, against which relief was prayed for. If other trespasses should be attempted by the defendant, or if work should be attempted in any of the municipalities through which the chartered line of the defendants extends, an appropriate application can be made to the court below at any time for such further relief as may be needed.
This company has no right to build or operate its road in fragments, and if this should be attempted under the provisions of its charter, without the consent of all the municipalities affected, the decree of the court would not .stand in the way. It adjudicates no more than is embraced within its terms and the findings upon which it stands.
In what the learned judge did he was clearly right. In what he declined to do he put his declination upon the scope of the bill, and not upon any legal rights of the defendants. He covered by his decree only that which he thought to be within “ the purpose of the bill.” All else he left untouched.
The decree is affirmed. The costs of this appeal to be paid by the appellant.