You see the city in the background?
It wasn't really there.
The secrets of the digital city are revealed in this video from Industrial Light and Magic about the special effects illusions of the 2012 The Avengers movie:
Although roughly a third of "The Avengers" is set in New York City precious little was actually filmed there. ILM crew members photographed 7-miles of city streets from a variety of heights and at different times of day totaling 250,000 images. The crew then digitally recreated roughly 20 square blocks of mid-town Manhattan using a variety of techniques. Live action shoots were held primarily on sound stages in New Mexico and in the streets of Cleveland.Building a Digital New York for "The Avengers"