Azure Maps
When to Use It
Use Geocoding.Microsoft with AzureMapsGeocoder for new Microsoft-backed integrations. This is the primary Microsoft provider in the repository.
Package
powershell
Install-Package Geocoding.MicrosoftOfficial References
How to Get a Key
- Create an Azure Maps account in your Azure subscription.
- Open the Azure Maps account in the Azure portal.
- Generate or copy a primary or secondary subscription key.
- Store the key in your app configuration or secret store.
Minimal Setup
csharp
using System.Collections.Generic;
using System.Threading;
using Geocoding;
using Geocoding.Microsoft;
CancellationToken cancellationToken = default;
IGeocoder geocoder = new AzureMapsGeocoder("your-azure-maps-key");
IEnumerable<Address> results = await geocoder.ReverseGeocodeAsync(
38.8976777,
-77.036517,
cancellationToken);Provider-Specific Features
AzureMapsAddressexposes Azure Maps-specific data while keeping the sharedAddresscontract available.- The Azure implementation is the recommended migration target for existing Bing Maps consumers.
Operational Notes
- Prefer Azure Maps for new Microsoft-backed workloads instead of starting on Bing Maps compatibility.
- Keep Azure subscription key rotation in your standard secret-management workflow.
- Azure Maps failures surface as
AzureMapsGeocodingException.