Pages Navigation Menu

Coding is much easier than you think

Geolocation Field in SharePoint 2013

Geolocation Field in SharePoint 2013

 
SharePoint 2013 has introduced a new field type called Geolocation for storing the latitude and logitude information from the end users and displaying it using Bing Maps.
 
Sp2013
 
I am not very sure why SharePoint 2013 does not offer any UI to add the use this field, but they have provided nice step by step guide to add and use these fields programmatically. I am just summarizing the step taken to get this new feature working.
 
1. Add a valid Bing Map key to web or farm.

“The Bing Maps key set at web level has higher precedence order than the Bing Maps key set at farm level.”

Go to the following link to generate the key https://www.bingmapsportal.com/ and sign in using your windows live id. I selected trial key used for non profitable work for this PoC.
 
Please refer to the following link for step by step on adding the key.

http://msdn.microsoft.com/en-us/library/jj163283.aspx
 
2. Create a Geolocation Field programmatically.

http://msdn.microsoft.com/en-us/library/jj164050.aspx

You will just have to create a console application to run the code. Make sure to select Any CPU build and .NET framework 4.0 to create the application.
 
3. Finally, create a Map View for you location list.

http://msdn.microsoft.com/en-us/library/jj656773.aspx

I followed all these steps as is and got an end result which looks something like this
 
map

 

About Karthikeyan Baskaran


Developer, blogger, speaker; specialized in Azure, DevOps, SharePoint Online/ 2016/ 2013/ 2010, .NET Core, Angular 6+, ReactJS and Office 365 Apps. Passionate about continuous improvement and high quality. Wants to automate and optimize everything! Works at one of the Top most IT Company in India.

Advertisements
%d bloggers like this: