Summary
Demonstration of a SharePoint Contacts List displayed on a Google Map.
Key Points
- The Contacts List Template in SharePoint provides fields for addresses
- Google Maps provides a mapping service
- SharePoint integrates easily with web services
Overview
- Part 1
- Create a new contacts list
- Create a new Page
- Add a Google Map to the page
- Part 2
- Add a Data View of the contacts list to the page
- Modify the Data View to show the contact’s locations on the map
Demonstration
Create a new contacts list
Open the Site Actions Menu and Select Create
Select the Contacts Template
Name the new list Map Contacts
Add a couple of contacts
I’ve chosen to add a SharePoint MVP who lives in Houston, Texas. For this example, I’m just mapping the city and state, but with a little more work you could map a street address.
Create a new Page
This is similar to the first step, but Choose Web Part Page.
Name the page, then pick any layout and select a Document Library.
Note: If you don’t have a Document library to use, you can add one from the Create button and then come back to this step.
Add a map
On our new page, select Add a Web Part
Select the Content Editor Web Part
The next part is a little bit complicated, but I have tried to make it a little simpler by providing this download, GoogleMapsGeocodeExtract.txt.html. The one modification required to the html file is to change the API key. After you edit the file, upload it to your Document Library and put the URL in the Content Link property of the Content Editor Web Part.
Note about the API Key: Google Maps API Keys are linked to your domain name of your website. To acquire a key, signup by entering your website URL.
At this point you will have a working map displayed on a SharePoint page. In Part 2, you will display the contacts on the map.
Update 9/9/08: I added the demo link and the reference to SharePoint blogs for added detail.
Update 5/23/16: I restored images and sample code from backup. And, I removed the demo links and references to other posts that no longer exist.
Examples using Virtual Earth
Multiple pins on map http://www.wssdemo.com/pages/map.aspx
Single location from address http://www.wssdemo.com/demo/default.aspx
Regards,
Ian
Those are great Virtual Earth examples. Thanks for giving back to the community Ian!
thanks for the useful article, when u gonna post part 2 ?
Jar,
Thanks for the feedback! I plan to publish part 2 this week.
Tom
Great Tutorial. Got the map piece going. Looking forward to how I might be able to pass my contact list parameters to the Google Maps geocoder. Your adoring public awaits part 2.