it stretched nearly a full kilometer from the eastern corner of the boboli gardens to the heart of the old palace itself , crossing the ponte vecchio and snaking through the uffizi gallery in between .