Getty Images has a series of photos of the Dajing Pavilion 大境阁, aka Guandimiao 关帝庙, or even "Piece-Goods Temple" as the westerners knew it, but the Getty doesn't know what building is on these photos. Leaving aside the history of the Dajing Pavilion, I will just point out how beautiful it was! The drawing (top) published in the Great Views of Shanghai (申江胜景图, 1884) represents it quite accurately: we can see the protruding central part on stilts, the openwork panels on both sides embedded in the white stucco wall, and the arched door on the right, which leads to the top of the city wall.
The pavilion was perched on the northwestern edge of the old city wall, with its back to the wall. "It is a fine specimen of the architecture of Southern China. It also has oyster shell windows and woodwork framing of most quaint design, the centre of each casement having a small square of glass, thus increasing the dim light admitted by the oyster shells." (Hodgson, China, Its Marvel and Mystery, 1909)
[See the rest of the images...]
Here are more images from other sources. This is looking south while standing on the city wall.
And this is looking south from where the tree is in the picture above. The French Concession, to the right of the city wall, is packed with terrace houses, but in the walled Chinese City (center and left) we mostly see gardens. “Walled cities always had to have open spaces in them, to grow as much food as possible in times of siege.” (Darwent, Handbook for Travellers and Residents, 1904)
A more common way of depicting the Dajing Pavilion was from outside of the city wall, across the defense moat. The postcard calls this area a "suburb": indeed, it remained agricultural and sparsely populated until the second decade of the 20th century:
On this colorized image the photographer is closer to the Dajing Pavilion, and the creek has more water:
This is what the building looked like in the 1980s, seen from roughly the same angle, before its massive renovation and rebuilding, which started c. 1996:
Source: Xu at Panoramio.
This is during the 2013 redevelopment of the area. Because of the widening of Renmin Road, the building is missing its entire western part, but there is a fake city wall instead:
Finally, the Dajing Pavilion was enlarged and rebuilt to resemble its original shape – without the intricacy of the decoration, but with an extra-large fake wall: