Worldphotos v1.0 last updated on 2007-04-17 This is a collection of files to create a world map of your photo album collection. It uses the Google Maps API to render the maps, and javascript to automatically create the page with very little input from the end user. It also includes a java program to automatically create a thumbnail for each album. ------------------------------------------------------------------------------ Created by Luiz de Viveiros, 2007-04-06 (http://luiz.no-ip.org/stuff/worldphotos/) Based on "jobe's gallery - map edition" (http://gallery.jobemedia.org/map_about.html) The html page is inspired on the the script found in jobe's gallery, mentioned above. However, the code from his site was a PHP script, which is not supported by my server. I wrote the code from scratch using only javascript, so that the new page is portable to more platforms, and can be more easily implemented on a greater number of servers. The java program uses functions from the ImageUtils java program by Rafael Steil (c 2003). ------------------------------------------------------------------------------ There are 2 independent modules to the package: (1) worldphotos.htm and (2) worldphotos_thumbmaker. They both read worldphotos_locations.js for the album list and locations for the map. (1) worldphotos.htm This is the main module - it displays the albums in a Google Map interface. The program reads worldphotos_locations.js for the album list, and for the location of each map in the world (latitude/longitude). The album list is in a list of folders (with their paths) - each folder is an album. The folder path should be relative to the folder where worldphotos.htm is. Try to avoid spaces in the path name. The folder with the album should have an index.html page, which will be opened when you click on an album on the map, and a thumbnail file called thumb.jpg, which will be used in the album link on the map. The thumb.jpg file should be small - 64x48 pixels is the recommended size. The included java file (described in section 2 below) can automatically generate these thumbnail files. You can have duplicates: you can have an album in multiple locations, and many albums in the same location. *** Note: You need to enter you own Google Maps API key into worldphotos.htm. You can get one for free from Google at http://www.google.com/apis/maps/ (2) worldphotos_thumbmaker.bat (for Windows - for other systems, use the .class java file) This program creates thumbnail files for the albums listed in worldphotos_location.js. It automatically looks in each album folder on the user's hard drive for a jpeg picture to use as a thumbnail, and then copies and resizes to fit the requirements for thumb.jpg (described in section 1 above). The program searches for jpegs to use as a thumbnail in the album path, and also the "thumbs", "thumbnails" and "images" subdirectories. This is a java program, and it has been pre-compiled in a Windows XP system with Java v1.6. If you need to recompile, please download the latest Java Development Kit (JDK) and compile the java file with: javac worldphotos_thumbmaker.java To Run: You can run the program in Windows by simply clicking on worldphotos_thumbmaker.bat. You can run it manually on any system (Windows, Mac, Linux, ...) using the java command: java worldphotos_thumbmaker *** Note: You need to Java v1.6 or greater installed to run worldphotos_thumbmaker.bat or worldphotos_thumbmaker.java. It is not compatible with java versions smaller than v1.6. Pre-compiled options: there are a couple of options precompiled in the included class file. If you need to change the options, remember to recompile the java file with javac, i.e.: javac worldphotos_thumbmaker.java Options: - flag_overwrite - Set it to 1 to always overwrite the existing thumbnail files; - flag_random_picture - Set it to 1 to pick a random picture from you album, instead of the default (see below); - default_picture_nb - Which picture it uses when not using a random picture. 0 is the first picture in the folder, 1 the second, and so on.