WASHINGTON — The Wharf is a gleaming, $2.5 billion development that has transformed a long-stagnant waterfront into a major destination in the nation’s capital.

Along a mile of the Potomac River is an array of high-end hotels, entertainment venues, shops, restaurants and apartments. They include the 6,000-capacity Anthem concert venue, an InterContinental hotel and Vio, a luxury condominium where prices have soared up to $2.9 million.

But the city has also required the developer to include affordable housing on the project’s 24 acres . Of the 761 units in the first phase of the development, 26 percent are listed as affordable, and more are promised in the second phase.

From Washington to San Francisco, municipal leaders are facing increased pressure to provide affordable housing. Using a combination of government subsidies, tax credits and zoning changes, they are encouraging developers to incorporate affordable units into mixed-use projects.