EDGEWATER, N.J. — The developers snatched up possibly the last large building site here on New Jersey’s red-hot gold coast, a weed-covered, waterfront parcel offering spectacular views of Manhattan.

They devised a plan they thought local officials could not refuse: They would create two parks, a waterfront esplanade, space for retail, a ferry terminal, an elementary school, and 1,863 apartments in five high-rise buildings, including 375 units for low- and moderate-income tenants. The project would pay an estimated $12 million a year in taxes.

Instead of embracing the plan, Michael McPartland, the mayor of Edgewater, and the town council moved last month to seize the 19-acre parcel under eminent domain to construct a new Department of Public Works building and a public park. The developers’ proposal was too big, the mayor said, and would increase the population of an already congested Edgewater by 30 percent or more.

The developer is vowing to fight.

The battle in Edgewater is just the latest skirmish in a war over affordable housing and overdevelopment that has broken out from Brooklyn to San Francisco. Major cities, and towns as small as Edgewater — a 3.5-mile long, two-block wide community wedged between the Hudson River and the Palisades cliffs — are dealing with an unprecedented wave of luxury development that is transforming the social fabric, as housing prices soar beyond the reach of many families.