SharePoint – Add Google Maps to your pages

Hello everyone. Some days ago I discovered that you can use Google Maps to visualize contact or address information on a map. Since I thought that this is pretty cool I wanted to share this information with you.

The first thing you need to do is to create a Document Library to store the Javascript file which will add Google Maps to your page. I called my Document Library “Script”. You can download the Google Maps Javascript file from here.

Before I uploaded the script I changed the following variables:

var useCoordinates = false;
var hideMapUntilClick = false;

I set those variables to false since I wanted to use address information instead of coordinates and I wanted the map to open up by default without having to enable it manually.

Now create a Contacts List. It has already all fields we need to test our Google Maps Script. I called my Contacts List “Addresses”.


Next step: Now add your Contacts List and a Content Editor Webpart to your SharePoint page.


Now you need to edit your Contacts List and choose the setting Show Toolbar. This is a necessary step for the Google Maps Javascript to make it work correctly.


Now edit your Content Editor Webpart and add the Url of your Google Maps Javascript into the textbox.


Now your SharePoint page will look like this: (Don´t worry, the map will load after you have at least created one entry in your Contacts List.)


Now we will create our first entry. You need to fill out the following fields to make it work:

  • Address
  • City
  • State/Province
  • ZIP/Postal Code
  • Country/Region

I added the address of the Stephansdom (a famous building in Austria) and the Statue of Liberty in the USA to test the Script.


Now Google Maps will show on your SharePoint page and mark your entries on the map.


That´s it. Pretty simple and cool, right? (By the way: You can download the Script I used for my example from here.)

Important note: I did not create this script. I just discovered it and wanted to share it. Please give the guy who created this script some credit for his awesome work. (For more information about this topic have a look at the sources.)


Tagged ,

One thought on “SharePoint – Add Google Maps to your pages

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: