Monday, August 20, 2012

Google map in SharePoint 2010 site

In this article we will discuss about how to show google map in a SharePoint 2010 site. Also you can check my last article on how to add JavaScript in Content Editor WebPart in SharePoint 2010.

First go to http://maps.google.co.in/maps

From the home page click on the link and copy the html code.

Save this code in the below location:

C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\TEMPLATE\LAYOUTS\STYLES

You can also chose your own location. I save the file with the name as GoogleMap.txt

Now edit the SharePoint page where you want the google map should appear.
Then click on Insert -> Web Part

This will open the web part gallary page. from there select Media and Conent and then select Content Editor web part and click on Add as shown in the figure below:

Then click on Edit Webpart as shown in the figure below:
Then from the content editor properties window in the content link give the url as below:

http://bsahoo3:2500/_layouts/styles/GoogleMap.txt

then click on OK as shown in the figure below:

Then the google map will appear in the page like below:

Also you can directly put the code to the Html source of the web part.

No comments:

Post a Comment