How to use Geolocation with SharePoint 2013

1 Comment

There is a Geolocation field type that is available with SharePoint 2013. The geolocation field type allows users to add a location field to list wich will display a map based on the location.

This feature is great but needs to be activated by your Farm administrator with the following PowerShell command on the SharePoint Server before you can use it:

$weburl = “http://sergepointdemos/&#8221;$fieldXml = “<Field Type =’Geolocation’ DisplayName=’GeoLocation’ />”

$web = get-spweb $weburl

$field = $web.Fields.AddFieldAsXml($fieldXml)

$web.Update()

The PowerShell command will create a new Site column with the name Geolocation.

Next you will have to add the new site column to your list, in my example I am using a Contact list.

Once the colunm is added to your contact list you will be able to enter/specify the location:


You will have to specify the longitude and latitude of the location


How do I find the latitude and the longitude?

  • Use Google map to search your location
  • Right click the location on the map
  • Click « what’s here »

  • You will then see the longitude and latitude, you just have to copy and paste

The new geolocation colum will then be displayed on the default view. The column will be clickable to display the map

In your list you will be able to create a new type of view called Map View.

This new view will display the map with pin points for every items in your list.

As you can see in the image you will you might be getting a message to tell you that “The specified credentials are invalid”. Your farm administrator will need to create a Bing account and create a key for the application. Your administrator will need to go to http://www.bingmapsportal.com/

Then create a key

Once your Bing Map Key has been generated, your administrator will need to register the key with the following PowerShell command on the server. This have to be done only once for your farm.

Set-SPBingMapsKey -BingKey yourKey

 

Before registering the key After registering the key

Inspiration: http://blog.sharepoint-videos.com/my-geolocation-video-on-mvp-award-blog/

I hope you find this helpful.

 

 

Free dev Training

Leave a comment

If you are interested in Development here is a list of free classes you can take online at your own rhythm.


SPC 2014 videos

Leave a comment

Some videos from the SharePoint Conference are now available on Channel 9 http://channel9.msdn.com/Events/SharePoint-Conference/2014