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
Copy file name to clipboardExpand all lines: articles/azure-maps/how-to-dev-guide-csharp-sdk.md
+27-30Lines changed: 27 additions & 30 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -12,16 +12,16 @@ services: azure-maps
12
12
13
13
# C# REST SDK Developers Guide
14
14
15
-
The Azure Maps C# SDK supports functionality available in the [Azure Maps Rest API][Rest API], like searching for an address, routing between different coordinates, and getting the geo-location of a specific IP address. This article introduces the C# REST SDK with examples to help you get started building location-aware applications in C# that incorporates the power of Azure Maps.
15
+
The Azure Maps C# SDK supports functionality available in the Azure Maps [Rest API], like searching for an address, routing between different coordinates, and getting the geo-location of a specific IP address. This article introduces the C# REST SDK with examples to help you get started building location-aware applications in C# that incorporates the power of Azure Maps.
16
16
17
17
> [!NOTE]
18
-
> Azure Maps C# SDK supports any .NET version that is compatible with [.NET standard2.0][.NET standard]. For an interactive table, see [.NET Standard versions][.NET Standard versions].
18
+
> Azure Maps C# SDK supports any .NET version that is compatible with [.NET standard] version 2.0 or higher. For an interactive table, see [.NET Standard versions].
19
19
20
20
## Prerequisites
21
21
22
-
-[Azure Maps account][Azure Maps account].
23
-
-[Subscription key][Subscription key]or other form of [authentication][authentication].
24
-
-[.NET standard][.NET standard] version 2.0 or higher.
22
+
-[Azure Maps account].
23
+
-[Subscription key]or other form of [Authentication with Azure Maps].
24
+
-[.NET standard] version 2.0 or higher.
25
25
26
26
> [!TIP]
27
27
> You can create an Azure Maps account programmatically, Here's an example using the Azure CLI:
The client object used to access the Azure Maps Search APIs require either an `AzureKeyCredential` object to authenticate when using an Azure Maps subscription key or a `TokenCredential` object with the Azure Maps client ID when authenticating using Azure Active Directory (Azure AD). For more information on authentication, see [Authentication with Azure Maps][authentication].
64
+
The client object used to access the Azure Maps Search APIs require either an `AzureKeyCredential` object to authenticate when using an Azure Maps subscription key or a `TokenCredential` object with the Azure Maps client ID when authenticating using Azure Active Directory (Azure AD). For more information on authentication, see [Authentication with Azure Maps].
65
65
66
66
### Using an Azure AD credential
67
67
@@ -71,7 +71,7 @@ You can authenticate with Azure AD using the [Azure Identity library][Identity l
71
71
dotnet add package Azure.Identity
72
72
```
73
73
74
-
You need to register the new Azure AD application and grant access to Azure Maps by assigning the required role to your service principal. For more information, see [Host a daemon on non-Azure resources][Host daemon]. The Application (client) ID, a Directory (tenant) ID, and a client secret are returned. Copy these values and store them in a secure place. You need them in the following steps.
74
+
You need to register the new Azure AD application and grant access to Azure Maps by assigning the required role to your service principal. For more information, see [Host a daemon on non-Azure resources]. The Application (client) ID, a Directory (tenant) ID, and a client secret are returned. Copy these values and store them in a secure place. You need them in the following steps.
75
75
76
76
Set the values of the Application (client) ID, Directory (tenant) ID, and client secret of your Azure AD application, and the map resource’s client ID as environment variables:
77
77
@@ -167,7 +167,7 @@ foreach (var result in searchResult.Results)
167
167
}
168
168
```
169
169
170
-
The above code snippet demonstrates how to create a `MapsSearchClient` object using your Azure credentials, then uses its [FuzzySearch][FuzzySearch] method, passing in the point of interest (POI) name "_Starbucks_" and coordinates _GeoPosition(-122.31, 47.61)_. The SDK packages and sends the results to the Azure Maps REST endpoints. When the search results are returned, they're written out to the screen using `Console.WriteLine`.
170
+
The above code snippet demonstrates how to create a `MapsSearchClient` object using your Azure credentials, then uses its [FuzzySearch] method, passing in the point of interest (POI) name "_Starbucks_" and coordinates _GeoPosition(-122.31, 47.61)_. The SDK packages and sends the results to the Azure Maps REST endpoints. When the search results are returned, they're written out to the screen using `Console.WriteLine`.
-[Subscription key] or other form of [authentication].
23
+
-[Subscription key] or other form of [Authentication with Azure Maps].
24
24
-[Node.js].
25
25
26
26
> [!TIP]
@@ -69,7 +69,7 @@ mapsDemo
69
69
70
70
## Create and authenticate a MapsSearchClient
71
71
72
-
You need a `credential` object for authentication when creating the `MapsSearchClient` object used to access the Azure Maps search APIs. You can use either an Azure Active Directory (Azure AD) credential or an Azure subscription key to authenticate. For more information on authentication, see [Authentication with Azure Maps][authentication].
72
+
You need a `credential` object for authentication when creating the `MapsSearchClient` object used to access the Azure Maps search APIs. You can use either an Azure Active Directory (Azure AD) credential or an Azure subscription key to authenticate. For more information on authentication, see [Authentication with Azure Maps].
73
73
74
74
> [!TIP]
75
75
> The`MapsSearchClient` is the primary interface for developers using the Azure Maps search library. See [Azure Maps Search client library][JS-SDK] to learn more about the search methods available.
0 commit comments