Posted by & filed under Google Maps.

Having drawn the routes for Tasmania, Syd-to-Melb, New Zealand, South East Asia, and India, suddenly things started to get pretty slow with my Cycle Tour Google Map. Adding more photos to the corresponding albums made things even slower so I had to find a way of making the performace atleast reasonable.

The solution I found was to use album filters so that the different tours are separated and hence only the tracks and photos for the selected area are loaded. I had to go through the Google Module code to add a test for $map.Filter using Smarty, I’ve had to use so many different languages for this Google Maps project and they all start to merge and mix with each other in my head! Anyway it’s working now and the performace is reasonable.

The next problem was that many of the photos were very close together and would sit on top of each other so the user wouldn’t be able to select them unless she zoomed right in. I started changing the GPS values through the Google Module Admin form but that was very painful because it is not interactive, I needed a better way of editing the GPS of the photos. So after consulting with Termite, who is one of the main developers of the Map Module, I started programming my first Gallery2 Module.

The aim of the module is to allow you to interactively move many photo markers around the map and have their GPS data saved to database via AJAX. After a crash course through Gallery2 Module development I made a copy of a simlar module and dove right in. It took about a day to get something working and another half a day to code some helper classes for the module, it works but it is pretty scary, if you dont know what you are doing you can easily stuff up your database up and there are some security risks as well if you leave the module installed so I am not going to release the module publicly but if anyone is interested in it and want to try it at their own risk then drop me a line.

Today I added some photos for the Tasmania Cycle Tour which was my first Tour, back then I didnt have a digital camera so the photos dont have timestamps and I cann’t work out the GPS automatically, so for some of the photos I had to guess where the photo was taken. But atleast for the New Zealnad tour which I am scanning the photos in soon, I wrote the place names on the back of the photos which will make it a bit easier.

Comments are closed.