Download and install G-language Genome Analysis Environment v.1.8.3 or above following the instructions in: http://www.g-language.org/wiki/software
In your shell, type G to startup G-language Shell. For details about G-language Shell, see here.
Then type generateGMap(“yourImageFile.png”). Image can be in any format supported by ImageMagick utility (therefore virtually every possible format). This step takes up to 10~15 minutes depending on the performance of your computer, so please be patient. After this process a folder named “yourImageFile” is created in your working directory.
That's it! Now type quit and answer n to quit G-language Shell.
% G __/__/__/__/__/__/__/__/__/__/__/__/__/__/__/__/__/__/__/__/__/ G-language Genome Analysis Environment v.1.8.3 http://www.g-language.org/ Please cite: Arakawa K. et al. (2003) Bioinformatics. Arakawa K. et al. (2006) Journal of Pestice Science. License: GNU General Public License Copyright (C) 2001-2008 G-language Project Institute for Advanced Biosciences, Keio University, JAPAN __/__/__/__/__/__/__/__/__/__/__/__/__/__/__/__/__/__/__/__/__/ G > generateGMap("yourImageFile.png", -level=>2) Google Map View is generated in yourImageFile directory. G > quit save value ? y/n (or cancel) ? quit >>n %
In the newly created folder named “yourImageFile” (without the extension), find a file named “index.html”, and open this file with your favorite browser (usually double clicking on the file does the job). Now enjoy zooming into your favorite image!
By default, the maximum zoom level is set to 6, which is 8192×8192 pixels. This zoom level can be changed by supplying -level⇒ option to generateGMap, as follows:
G > generageGMap("yourImageFile.png", -level=>4)
The image size is 2^(level - 1) * 256. Note that generation of very large image takes a lot of disk space and memory. Level 7 usually requires around 4GB of RAM, so the default level should be sufficient in most cases.
You can browse the documentation for generateGMap by typing
G > help generateGMap
in G-language Shell.
G > help generateGMap Name: generateGMap - generate Google Map View from given image file Description: This method generates a zoomable AJAX viewer interface for the given image, by splitting the image and generating the HTML page, using Google Maps API v.2. Open the "index.html" file with your browser when the directory containing split images and the HTML is generated. Note that it will take a very long time to generate images with levels greater than 6. Usage: generateGMap("imageFileName.png"); Here the image format can be anything supported by ImageMagick. For best viewing experience, square image is preferred. When you wish to make the generated map public, obtain a Google Map API Key from http://www.google.com/apis/maps/signup.html and replace the string "YOUR_GOOGLE_MAP_KEY_HERE" within the generated HTML. Options: -level maximum zoom level. (default: 6) This value should be larger than 3. Image width size is 2^(level - 1) * 256, so width at level = 6 is 8192. References: 1. Google Maps API Documentation. http://www.google.com/apis/maps/documentation/ Author: Kazuharu Arakawa (firstname.lastname@example.org) History: 20070707-01 stopped tiling in the x-direction by default 20070621-01 initial posting
To publish the generated map, you need to place the generated folder in your webserver (usually in public_html folder or /var/www/html/), and then change the Google Maps Key.
First, go to Google Code Website for Google Maps API and obtain a Google Map Key for your website.
Then, open the index.html of your generated map with your favorite text editor, and edit the first <script> tag where it reads “YOUR_GOOGLE_MAP_KEY_HERE”, replacing it with the obtained key.