You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
title: Add a Geolocation column to a list programmatically in SharePoint
3
3
description: Learn how to programmatically add a Geolocation column to a list in SharePoint. Integrate ___location information and maps in SharePoint lists and ___location-based websites by using the new Geolocation field creating your own Geolocation-based field type.
4
-
ms.date: 11/08/2022
4
+
ms.date: 11/22/2022
5
5
ms.prod: sharepoint
6
6
ms.assetid: f31a3594-c328-4731-b8eb-5da6b85103ad
7
7
ms.localizationpriority: high
@@ -10,209 +10,152 @@ ms.localizationpriority: high
10
10
11
11
Learn how to programmatically add a Geolocation column to a list in SharePoint. Integrate ___location information and maps in SharePoint lists and ___location-based websites by using the new Geolocation field creating your own Geolocation-based field type.
12
12
13
-
SharePoint 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. For more information about the Geolocation column, see [Integrating ___location and map functionality in SharePoint](integrating-___location-and-map-functionality-in-sharepoint.md). The Geolocation column is not available by default in SharePoint lists. To add the column to a SharePoint list, you have to write code. In this article, learn how to add the Geolocation field to a list programmatically by using the SharePoint client object model.
14
-
15
-
16
-
13
+
SharePoint 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. For more information about the Geolocation column, see [Integrating ___location and map functionality in SharePoint](integrating-___location-and-map-functionality-in-sharepoint.md). The Geolocation column isn't available by default in SharePoint lists. To add the column to a SharePoint list, you have to write code. In this article, learn how to add the Geolocation field to a list programmatically by using the SharePoint client object model.
14
+
15
+
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 isn't for an on-premises deployment of SharePoint. 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](https://www.microsoft.com/download/details.aspx?id=30437) for SQL Server 2008, or [Microsoft SQL Server 2012 Feature Pack](https://www.microsoft.com/download/details.aspx?id=29065)for SQL Server 2012 in the Microsoft Download Center.
17
16
18
-
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. 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](https://www.microsoft.com/download/details.aspx?id=30437) for SQL Server 2008, or [Microsoft SQL Server 2012 Feature Pack](https://www.microsoft.com/download/details.aspx?id=29065)for SQL Server 2012 in the Microsoft Download Center.
19
17
## Prerequisites for adding a Geolocation column
20
-
<aname="SP15addgeo_prereq"> </a>
21
18
19
+
- Access to a SharePoint list, with sufficient privileges to add a column.
20
+
- A valid Bing Maps key set at the farm or web level, which can be obtained from the [Bing Maps Account Center](https://www.bingmapsportal.com/).
21
+
22
+
> [!IMPORTANT]
23
+
> Please note that you are responsible for compliance with terms and conditions applicable to your use of the Bing Maps key, and any necessary disclosures to users of your application regarding data passed to the Bing Maps service.
- Access to a SharePoint list, with sufficient privileges to add a column.
28
-
29
-
30
-
- A valid Bing Maps key set at the farm or web level, which can be obtained from the [Bing Maps Account Center](https://www.bingmapsportal.com/).
31
-
32
-
> **Important:**
33
-
> Please note that you are responsible for compliance with terms and conditions applicable to your use of the Bing Maps key, and any necessary disclosures to users of your application regarding data passed to the Bing Maps service.
8. Replace \<Site Url\> and \<List Title\> with valid values.
115
-
116
-
117
-
9. Set the target framework in Project Properties as .NET Framework 4.0 or 3.5, and run the example.
118
-
119
-
120
-
10. Navigate to the list. You should be able to see a column named **Location** of type Geolocation in the list. You can now enter some values and see it in action. Figure 1 shows the default ___location and map features that you can expect to see in your list.
121
-
122
-
**Figure 1. Summarized view of the default ___location and map features**
94
+
```
123
95
124
-
96
+
1. Replace `<SiteUrl>` and `<ListTitle>` withvalidvalues.
0 commit comments