Configuring Location and Map Functionality in SharePoint 2013

SharePoint 2013 introduces a new field type named Geolocation that enables you to annotate SharePoint lists with location information. In columns of type Geolocation, you can enter location information as a pair of latitude and longitude coordinates in decimal degrees or retrieve the coordinates of the user’s current location from the browser if it implements the W3C Geolocation API. In the list, SharePoint 2013 displays the location on a map powered by Bing Maps. In addition, a new view named Map View displays the list items as pushpins on a Bing Maps Ajax control V7 with the list items as cards on the left pane.

Step 1 – Get & Set a Bing Maps API Key at the Farm or Web Level

SharePoint 2013 uses Bings Maps to render the map of the location. To be able to use the Bing Maps feature, you need to create a Bing Maps key and set the key at the web or farm level. You’ll see an error message on the map if you do not use a valid Bing Maps key or if a key is not set at the web that contains the list or at the farm level.

The Bing Maps key can be set at the farm or web level. To set the Bing Maps key at the farm level, you need administrator rights on the server; you can then add the key by using the SharePoint 2013 Management Shell. To set the Bing Maps key at the web level, write a console application that uses the SharePoint client object model.
In our case, we are going to use the PowerShell method to apply the Bing API Key at the farm level. First step is to grab an API key from

Once registered, go to “Create or View Keys”:


A bit about the keys:

You are able to create two keys (Trial or Basic) for most application types and one additional Windows Store app Trial key under this account. Trial keys expire after 90 days and cannot be converted to Basic keys. You cannot delete keys or generate more than 3 keys from this account. If you intend to create a non-trial application, make one of the keys a Basic key and read the governing TOU that defines usage limits.
There are two types of keys, Trial and Basic.  The details of both key types can be found here:

In our case, since we are using it on a production portal, we are going to use the Basic key of the Public Website sort:

Grab the generated key and run the following Administrative PowerShell on any of your SharePoint 2013 Servers:
Set-SPBingMapsKey –BingKey “Enter your key here”

Your farm will now be activated for that particular Bing API key.

Full reference:

Step 2 – Install SQLSysClrTypes.msi on each SharePoint Web Front-End Server

An MSI package named SQLSysClrTypes.msi must be installed on every SharePoint front-end web server to view the geolocation field value or data in a list. This package installs components that implement the new geometry, geography, and hierarchy ID types in SQL Server 2008. By default, this file is installed for SharePoint Online.
However, it is not for an on-premises deployment of SharePoint Server 2013. You must be a member of the Farm Administrators group to perform this operation. To download SQLSysClrTypes.msi, see Microsoft SQL Server 2008 R2 SP1 Feature Pack for SQL Server 2008, or Microsoft SQL Server 2012 Feature Pack for SQL Server 2012 in the Microsoft Download Center.

Step 3 – Add a GeoLocation column to a SharePoint 2013 List

Out of the box, even when you have a Bing API key applied to your farm, there is still no way to leverage GeoLocation data at the SharePoint List data – you must first programmatically  add a List field of the type GeoLocation. The following PowerShell takes a SharePoint Site and List name as input parameters and will add the field with the displayname “GeoLocation” to said List:


 Add-PSSnapin Microsoft.SharePoint.Powershell -ErrorAction SilentlyContinue

$fieldXml = "<Field Type='Geolocation' DisplayName='Location' />"

$web = Get-SPWeb $webUrl
 $list = $web.Lists[$listName]

Save the to a file named Add-SPGeoField.ps1 file and you can execute the following command from PowerShell:

Add-SPGeoField.ps1 -webUrl http://mySharePointSite -listName MyListName

You may want to go to your SharePoint and ensure the newly added “Location” field is in your view:

That’s it! You will now have a new GeoLocation field which accepts Latitude and Longitude inputs :
Users can enter latitude and longitude values from the “Specify Location” link:
..or select the “Use My Location” (requires client side internet access) which calculates the users location based on IP Address and then display that map location in the Create/Edit/Display form for the item:
You can also create a special map view for the list/library containing a Geolocation column:


geolocation, latitude and longitude, sharepoint map

Comments (4)

    • Hi Juan,

      If you want to customize the map or add complex shapes (like polygons), you will need to do some additional custom development, starting with the Bing Maps AJAX Control: . I’m currently not aware of a simple way to modify the built-in SharePoint 2013 Bing maps, although i’m pretty for sure for sizing all you’d need to do is resize the bounding DIV tag that contains the map.

  • I have registered the map key on my farm and add a geolation on my site collection.

    I then create a contact list and create a map view.

    But here is the thing.

    Only user who are site collection admins can see the map, others the loading the map just hang on and never end?

    Can you help?

    • Hi Henry, Try running Fiddler ( to check what is being sent from the server to the client, when the map view is being loaded. If you see any 403 forbidden or long-running processes relating to assets for the Bing map, then that would be your culprit – check that those assets are in a location where appropriate permissions are applied to allow general users to read them.

Leave a Reply

Your email address will not be published. Required fields are marked *