Google Maps in SharePoint 2010 using standard functionality.
In SharePoint 2010 you can use Google Maps without having to download extra webparts or third party tools. In this article I will explain how you can insert “Google Maps” maps in your SharePoint 2011 site with only using standard out of the box SharePoint 2010 features.
It’s a generic solution which can also be used to store HTML code that defines Flash and Silverlight HTML ‘assets’.
1. Get your Google map code.
- Go to Google maps
- Find the location you want.
- In the right hand corner of the map click on “Link”
- Next click on “Customize and preview embedded map”.
- Enter the desired options.
- Copy the HTML code that Google generates for you.
- Paste the HTML code in a text file (use notepad).
- Save the text file to your hard drive.
So you have the Google Map HTML code sitting in a text file now. Next step is to upload this file in SharePoint
2. Store the HTML code in SharePoint.
- Go to your SharePoint site.
- Click on ‘Site Actions’ =>’More Options’.
- Click create and create a new Document Library ”
- When the library is created. Click on “Add document”.
- And upload the Google Map text file you created in the previous step
Your Google Maps HTML code is in SharePoint now. Next step: display it.
Note 1: An asset might be a more appropiate naming. So an “Asset Library” might be a better choice. For simplicity sake we stick with a standard “Document Library”
Note 2: Feel free to add your custom content types to the library and fill out out the required meta data.
3. Display the Google Map.
Get the document url :
- Go the library from the previous step.
- Click on the Google Maps document you want to display.
- SharePoint opens this file as plain text in your browser.
- Copy the link to this file from your browser address bar.
Add the Google Map to a page :
- Open the a SharePoint page.
- Edit the page.
- Add the Content Editor web part
- Clicking on “Edit Web part” in the web part context menu
- Insert the document url, of the Google Maps text document, in the “Content Link” box.
- Click on OK
- Save the page.
- If needed check-in and approve the page.
That’s it. Your Google Map is now visible on the SharePoint site.
The nice thing is that you can reuse this map in your SharePoint site. And when the map changes (change of address, etc…) you only need to change the text file in your Document Library.