Skip Ribbon Commands
Skip to main content
SharePoint

Markus' Blog

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

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("<Field Type='Geolocation' DisplayName='Location'/>")
$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

Body
  
Hi Markus,
ich bin auch gerade über das GEOLocation feld gestolpert und wollte fragen ob man (als ON PREMISE Nutzer)wirklich ein Update am MSSQL Server einspielen muß?
7/7/2014 8:43 AM

Comments

There are no comments for this post.

 

About me...

About this blog

                                
My thoughts and findings about SharePoint 2016/2013/2010 and SQL Server

 

Markus Hintner
MCM_2013(rgb)_1406.jpg

MCSM_2013(rgb)_1543.jpg