As my colleague mentioned above, Adams was a nationalist who was mainly interested in consolidating American territorial gains. He was also a shrewd political realist who sought to protect American national interests on the global stage. When Antonio Jose Caoaz, Guatemala's foreign minister to the United States, proposed a canal adjoining the Pacific and Atlantic through Nicaragua, Adams was extremely supportive. As a result, many international companies put in bids for surveying and building contracts. However, the project itself was derailed by political instability in the Central American region.
We can see Adams' foresight in supporting such a project because the Chinese have now secured the rights to build a canal approximately three times the length of the Panama Canal (as of 2015, the Chinese canal project is ongoing). With the Chinese controlling such a huge undertaking and solidifying its political influence in the region, American interests may well be at stake in the Central American region.
Adams was a man before his time. He knew that protecting American interests was key to national security.
With the treaty of Ghent, Adams was one of five American negotiators (John Quincy Adams, James Bayard, Henry Clay, Albert Gallatin, and Jonathan Russell) who gained British recognition of American international relevance, power, and sovereignty. Although it is true that America did not gain compensation for her war losses through the treaty, it achieved much more in terms of America being viewed as a viable player on the world stage. In Adams' own words:
Dearly as I value peace, and much as I know it is needed and desired by our Country, I pledge myself to you that you shall never see my name to a treaty, no, nor to any one stipulation that shall give you cause to blush for your country or for your friend.
Adams and his fellow negotiators were instrumental in standing up to outrageous British demands and securing British recognition of American sovereignty, an accomplishment that preserved the national honor of the young America.
John Quincy Adams made several significant contributions to American foreign policy, especially as Secretary of State under James Monroe. His vision was that the United States would emerge as the dominant power in the Western Hemisphere, free and independent from European affairs. Adams played an important role in negotiating the Treaty of Ghent that ended the War of 1812, and five years later, he first articulated what would become known as the Monroe Doctrine, asserting that the United States would regard European interventions in Latin America, Alaska, and elsewhere in the Western Hemisphere as a threat to its national interests. One year later, Adams negotiated the Adams-Onis Treaty with Spain, securing Florida for the United States as well as ending all Spanish claims other territories west of the Mississippi River and Oregon. Adams was above all a nationalist interesting in consolidating American territorial gains on the continent.
For more information on the canal project in Nicaragua, here is another link for it. It looks like the link above may only be viewed once due to the fact that it is an article available on a subscription basis.