In 1878, Cockburn was elected as the first mayor of the Corporate Town of Jamestown. In that role he lobbied the Government of South Australia to construct a railway line to the New South Wales border to tap the newly developed silver mining fields of the Barrier Ranges. Between 1884 and 1888, during Cockburn's parliamentary career, the South Australian Railways line through Jamestown to Petersburg was extended to the border to meet the tramway built by the Silverton Tramway Company, which linked the growing mines of Broken Hill to the South Australian coast at Port Pirie, where a smelter was built in 1889, effectively capturing the economic benefits of the Broken Hill mining field for South Australia. The town surveyed at the colonial border in 1886 was named Cockburn in his honour.