Add Geolocation Column to SharePoint

Unfortunately, the new “Geolocation” column in SP2013 doesn’t come ‘turned on’ by default.

I was able to easily add it as a ‘site column’ – and then can add to any list.

  • Open Visual Studio project
  • Create a C# console app
  • Add a reference to the following :
    • Microsoft.SharePoint.Client
    • Microsoft.SharePoint.Client.Runtime
  • Include the following code :

ClientContext context = new ClientContext(“https//server/site”);
Web web = context.Web;

var newField = web.Fields.AddFieldAsXml(“<Field Type=’Geolocation’ DisplayName=’Map GeoLocation’/>”, false, AddFieldOptions.DefaultValue);


After executing the project, you should be able to go back to SharePoint – and do the following ;

Edit properties of a list, and click “add from existing site columns” :

Choose the new column :


And there it is :


That’s about it – too easy, eh !?

** The same code should work for Office 365 – I haven’t tried it yet though – will update soon…


One thought on “Add Geolocation Column to SharePoint

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s