Tuesday, November 15, 2005

New page to see the photos

I have done a new page to see the images in Panoramio. There were several problems with the previous one, and also some advantages.

It was not really a new page, but just a bit (a big "bit") of javascript that showed and hide some parts of the main page. It was very fast to lurk the latests photos posted in Panoramio, and each time you changed the photo, only the essential of the web page changed. Switching between the photo and the map view was also very fast, as it was only a "show this, hide that" operation.

This was its advantage, and it was also its major problem.

The code was hard to grow, and the layout of the page severely "inspired" by the layout of the main page. The page was not stored in the navigator history, the back button to go back to the map did not worked, and linking to the page was as hard as linking to a particular place in the map. Some of these things were fixable, but the "hard to grow" and the layout problem were the two real, big problems that I wanted to fix and was hard to do with the current code.

When mkling asked for comments on the pictures, a feature that we had already discussed and pushed back in the TODO list due to these problems, I decided to redo the whole page, and split it from the main map.

The relayout let me show all the relevant info in the same page, without the need to scroll to see the contextual maps, to have comments on images, and to be able to navigate through the photos of the user that posted the image and through the photos in this region of the planet.

The downside is that now is slower to go back to the map. I'm putting Panoramio on a javascript diet, and I will try to pull all the needed data in the minimum number of queries possible, to speed up the "show the map" operation.

I'm also playing with the implementation of some features suggestted by Eduardo, as showing the name of the city where the photo was taken. I hope to have something to show you in the next days.