Question: The United States acquired Florida from Madrid in exchange for settling a boundary dispute through what treaty?

Context paragraphs:
Treaty of Saint Petersburg (1825): The Treaty of Saint Petersburg of 1825 or the Anglo-Russian Convention of 1825, officially the Convention Concerning the Limits of Their Respective Possessions on the Northwest Coast of America and the Navigation of the Pacific Ocean, defined the boundaries between Russian America and British claims and possessions in the Pacific Northwest of North America at parallel 54°40′ north, which had the year before been established as the limit of overlapping American claims in the parallel Russo-American Treaty of 1824.  The Russian sphere in the region was later sold to the United States, becoming Alaska, while to the south of the division point was the British claim, the remnant of which today is coast of the Canadian province of British Columbia.  and associated rights and obligations concerning waters and ports in the region.  The treaty, in establishing a vague division of coastal Russian interests and inland British interests northward from 56 degrees north, led to conflicting interpretations of the meaning of the treaty's wording which later manifested in the Alaska Boundary Dispute between the United States on the one hand, and Canada and the British Empire on the other.

Mount Root: Mount Root, also named Boundary Peak 165, is a mountain in Alaska and British Columbia, located on the Canada–United States border, and part of the Fairweather Range of the Saint Elias Mountains.  It is named for Elihu Root, who was one of the diplomats involved in settling the Alaska boundary dispute between the United States and Canada.  It is where the Margerie Glacier is located.

Adams–Onís Treaty: The Adams–Onís Treaty of 1819, also known as the Transcontinental Treaty, the Florida Purchase Treaty, or the Florida Treaty, was a treaty between the United States and Spain in 1819 that ceded Florida to the U.S. and defined the boundary between the U.S. and New Spain.  It settled a standing border dispute between the two countries and was considered a triumph of American diplomacy.  It came in the midst of increasing tensions related to Spain's territorial boundaries in North America against the United States and Great Britain in the aftermath of the American Revolution; and also during the Latin American Wars of Independence.  Florida had become a burden to Spain, which could not afford to send settlers or garrisons.  Madrid decided to cede the territory to the United States through the Adams–Onís Treaty in exchange for settling the boundary dispute along the Sabine River in Spanish Texas.  The treaty established the boundary of U.S. territory and claims through the Rocky Mountains and west to the Pacific Ocean, in exchange for the U.S. paying residents' claims against the Spanish government up to a total of $5,000,000 and relinquishing the US claims on parts of Spanish Texas west of the Sabine River and other Spanish areas, under the terms of the Louisiana Purchase.

Alaska boundary dispute: The Alaska boundary dispute was a territorial dispute between the United States and the United Kingdom, which then controlled Canada's foreign relations.  It was resolved by arbitration in 1903.  The dispute had been going on between the Russian and British Empires since 1821, and was inherited by the United States as a consequence of the Alaska Purchase in 1867.  The final resolution favored the American position, and Canada did not get an all-Canada outlet from the Yukon gold fields to the sea.  The disappointment and anger in Canada was directed less at the United States, and more at the British government for betraying Canadian interests in favour of healthier Anglo-American relations.

Tongass Passage: Tongass Passage is a strait on the Canada–United States border between Alaska and British Columbia, located on the southwest side of Wales Island.  Wales Island, and Pearse Island, to its northeast, were claimed by the United States prior to the settlement of the Alaska boundary dispute in 1903.  Prior to that time, numerous American-owned canneries lined its shores.  Canadian claims to the islands were affirmed in the Alaska Boundary Settlement of 1903, in which Tongass Passage, Pearse Canal and the Portland Canal were defined as comprising "Portland Channel", a term first used in the Anglo-Russian Treaty of 1825 as part of the marine boundary between Russian America and British claims in the region, but which remained undefined until the boundary settlement.

Pig War (1859): The Pig War was a confrontation in 1859 between the United States and Great Britain over the Canada–U.S. border in the San Juan Islands, between Vancouver Island and the mainland.  The Pig War, so called because it was triggered by the shooting of a pig, is also called the Pig Episode, the Pig and Potato War, the San Juan Boundary Dispute or the Northwestern Boundary Dispute.  With no shots exchanged and no human casualties, this dispute was a bloodless conflict.

Boundary Treaty of 1970: The 1970 Boundary Treaty between the United States and Mexico settled all then pending boundary disputes and uncertainties related to the Rio Grande (Río Bravo del Norte) border.  The most significant dispute remaining after the Chamizal Settlement in 1963 involved the location of the boundary in the area of Presidio, Texas, and Ojinaga, Chihuahua.  The river channel was jointly relocated to approximate conditions existing prior to the dispute which arose from changes in the course of the river in 1907.  The International Boundary and Water Commission was charged with its implementation.  The American-Mexican Treaty Act of October 25, 1972 authorized the United States Section's participation.  The project was undertaken in 1975 and completed in 1977.

Legislative Council of the Territory of Florida: The Legislative Council of the Territory of Florida, often referred to as the Florida Territorial Council or Florida Territorial Legislative Council, was the legislative body governing the American territory of Florida (Florida Territory) before statehood.  The territory of Florida was acquired by the U.S. in 1821 under the Adams–Onís Treaty.  Replacing the form of martial law that had existed in the territory since Florida was acquired, the U.S. Congress in 1822 established a territorial government consisting of a governor, secretary, thirteen-member Legislative Council, and judiciary, all of whom were appointed by the U.S. president.

Oregon Treaty: The Oregon Treaty is a treaty between the United Kingdom and the United States that was signed on June 15, 1846, in Washington, D.C. Signed under the presidency of James K. Polk, the treaty brought an end to the Oregon boundary dispute by settling competing American and British claims to the Oregon Country; the area had been jointly occupied by both Britain and the U.S. since the Treaty of 1818.

Penn–Calvert boundary dispute: The Penn–Calvert boundary dispute (also known as Penn vs. Baltimore) was a long-running legal conflict between William Penn and his heirs on one side, and Charles Calvert, 3rd Baron Baltimore and his heirs on the other side.  The overlapping nature of their charters of land in Colonial America required numerous attempts at mediation, surveying, and intervention by the king and courts of England to ultimately be resolved.  Subsequent questions over these charters have also been adjudicated by American arbitrators and the Supreme Court of the United States.  The boundary dispute shaped the eventual borders of five U.S. states: Pennsylvania, Maryland, Delaware, New Jersey, and West Virginia.

Supporting paragraphs: Legislative Council of the Territory of Florida Adams–Onís Treaty
Answer: Adams–Onís Treaty