Monday, October 15, 2012

See all your Google Contacts on a Google Map


Google Contacts on a World Map
Create a Map of your Google Contacts
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:
  1. Make a copy of this Google Sheet in your own Google Docs account.
  2. From the Google Contacts menu in the sheet, choose Initialize and authorize the script  (see source code) to access your Google Contacts.
  3. 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).
Google Map of your Contacts

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.

No comments:

Post a Comment