Hanley was born April 14, 1847, in Ireland. He moved with his family to Australia when he was 10, where he later learned the railway business. At age 19 he took ship for San Francisco, California, and settled in Sacramento, where he joined Southern Pacific. After becoming an engineer, he was transferred to Los Angeles, and he "helped establish the first transcontinental passenger route to and from the West Coast." He retired after twenty years to go into real estate. In 1915, as war was raging in Europe, Hanley publicly proclaimed that he wanted to reaffirm the oath of allegiance he had taken to the United States when he became a citizen. "I would like to reaffirm my allegiance every ten years just as a voluntary expression of constant and sustained loyalty," he said. He died at the age of 68 on April 3, 1916, in the family home, 1152 Norton Avenue, in Arlington Heights, "from the effects of a stroke of apoplexy." Services were at Saint Thomas Church, and interment was at Calvary Cemetery, East Los Angeles. He was survived by his wife, Katie, and three children, John, Robert and Katherine. There had been another son, John T., who died in 1904.
Public service
City
A Democrat, he was elected on December 5, 1887, to represent the 1stWard on the Los Angeles Common Council, serving until February 21, 1889. He was elected Los Angeles city superintendent of streets in 1905, serving until 1907. One of his efforts was to stop the practice by the city of issuing warrants to the "About two hundred men" who worked on the streets and instead pay them weekly in cash, the idea being to stop what were called "warrant-shavers." He said that the majority of workers "assign their weekly warrants to the brokers, who draw the money from the municipal treasury and turn it over to the men, deducting a charge for their services that, in the aggregate, reaches a considerable sum each week." Hanley was the first street superintendent to order the washing of the paved city streets, which previously had been only sprinkled to keep the dust down. The work, wrote a Los Angeles Times reporter,
was more difficult than an observer would imagine and more than an hour was required to clean the block between Figueroa and Flower streets .... The mud was washed into the gutters and today it will be removed by the street department wagons. The difference between the cleaned portion of the street and that which has not been reached is surprising. One is as clean as many a kitchen floor and the other is coated deep with dirt.
County
Hanley was a county supervisor for three terms, starting in 1892, 1896 and 1900. A dispute over balloting in 1902 was resolved by the California Supreme Court on April 12 of that year, with the decision that Hanley's opponent, Charles E. Patterson, had won the election.