Peter Kosler or Kozler (16 February 1824 – 16 April 1879) was a Carniolan lawyer, geographer, cartographer, activist, and manufacturer. He was of ethnic German origin, but also identified with Slovene culture and advocated the peaceful coexistence of the Slovene and German cultures in Carniola.
Kosler was born in Koče, a village south of Kočevje in Gottschee County, in what was then the Austrian Kingdom of Illyria, and is now Slovenia. He is best known for creating the first map of the Slovene Lands, called Zemljovid Slovenske dežele in pokrajin (Map of Slovene Lands and Provinces). Made already from 1848 until the end of 1852, it was published only in 1861. Despite this, it had a significant impact in the time of the Slovene national awakening.
Born in a relatively well-to-do family, Kosler made a fortune with beer manufacturing and was the founder of the Union Brewery. He gave large amounts of money to support Slovenian cultural associations and institutions. He was close to the conservative Old Slovene political movement.
Kosler bought Cekin Mansion just outside the center of Ljubljana and renovated it in a neoclassical style. Today, the mansion houses the National Museum of Contemporary History. The Koslers also owned a mansion (Slovene: Kozlerjeva palača) in the center of Ljubljana, close to Congress Square (Kongresni trg) and Čop Street (Čopova ulica), which was regarded as one of the finest Baroque buildings in the city. The building was slated for demolition in 1956 and torn down by the Communist authorities in 1961 in order to widen the nearby street, which caused a public outcry and marked a milestone in the development of postwar urban development in Ljubljana. According to an interview with art historian Damjan Prelovšek in October 2006, trees now grow at the site of the former building, demonstrating that its demolition was a political decision and unnecessary in order to widen the street.