How to create a new GeoLocation field in SharePoint 2013 using PowerShell

October 15, 2012 · 1 min read

SharePoint 2013 has this new cool fieldtype called “GeoLocation”. This field allows us to save coordinates and show the location via Bing Maps:

Unfortunately, this field type can only be created via Custom Code. One way is the Client Object Model, another one is PowerShell:

$web=get-spweb http://sp2013
$list=$web.lists[“CustomList”]
$list.fields.AddFieldAsXml("")
$list.Update()

You need to add a Bing Maps Key to your SharePoint Farm in order to be able to show geographical data using Bing Maps:

Set-SPBingMapsKey –BingKey “"

You can get your key at https://www.bingmapsportal.com.

Once everything is setup and running, you are able to create a new “Map View”:

Finally, the view looks like this:

Markus