If you have been using Google Contacts (or any other address book*) to store the postal addresses of your friends and colleagues, you can easily create an online Google Map with all these address or even view them inside Google Earth. Here are the steps:

From the Google Contacts menu in the sheet, choose Initialize and authorize the script (see source code) to access your Google Contacts.

Next choose Generate KML under the same menu and the script will send a KML file to your email account.

Go to your mailbox and download the KML file to the desktop. You can double-click this file to directly open it inside Google Earth. You can click the pin /marker to read the full address and name of the contact.

Alternatively, you can upload the KML file to the web and copy-paste the URL of the KML file into the Google Maps Search box as shown below (see a sample map).

Internally, the Google Apps Script reads the home /work postal addresses of your Google Contacts and then uses the geocoding service** of Google Maps to transform these human-readable address into latitudes and longitude values. These points (or placemarks) are finally put in a KML file that you can open inside Google Earth or Google Maps.

[*] If you aren’t using Google Contacts, you can still use the script. Export the contacts data from your existing address book (like Hotmail or Yahoo Mail) as a CSV file and import the file into Google Contacts. [**] Google’s Geocoding service allows you make 2,500 requests per IP per day.

Amit Agarwal is a web geek and founder of Digital Inspiration, a popular tech & how-to website. He has been blogging for over a decade and has also contributed to the Wall Street Journal, Lifehacker and The Financial Express. Sign-up for the email newsletter for your daily dose of tips & tutorials.