[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6EXKV8RMKCP57JSS0M63RE7":3,"skill-same:01M6EXKV8RMKCP57JSS0M63RE7":74},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":38,"linkOnly":39,"markdownContent":40,"markdownBody":41,"frontMatter":42,"refName":45,"commitSha":46,"skillDirectory":47,"forksCount":48,"repositoryHtmlUrl":49,"repositoryHomepageUrl":50,"ownerHtmlUrl":51,"ownerBlogUrl":6,"ownerDescription":52,"updatedAt":53,"install":54,"resources":67},"01M6EXKV8RMKCP57JSS0M63RE7","azure-maps-search-dotnet",null,"Azure Maps SDK for .NET. Location-based services including geocoding, routing, rendering, geolocation, and weather. Use for address search, directions, map tiles, IP geolocation, and weather data. Triggers: \"Azure Maps\", \"MapsSearchClient\", \"MapsRoutingClient\", \"MapsRenderingClient\", \"geocoding .NET\", \"route directions\", \"map tiles\", \"geolocation\".","ComeOnOliver\u002Fskillshub","ComeOnOliver","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F43215937?v=4","01M6E5JNFECJAAVFE0W7SMWWD2","Haoran Shu","01M6E5JNNDQS7AJZDYFQ8TPZCK",66,"MIT","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Faiskillstore\u002Fmarketplace\u002Fsickn33\u002Fazure-maps-search-dotnet\u002FSKILL.md",[],[19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37],"azure maps","dotnet","azure","azure maps search dotnet","search","maps","use","rendering","triggers","ip","map","route","location","geocoding","weather","data","services","routing","sdk","2026-11-10 10:12:30",false,"---\nname: azure-maps-search-dotnet\ndescription: |\n  Azure Maps SDK for .NET. Location-based services including geocoding, routing, rendering, geolocation, and weather. Use for address search, directions, map tiles, IP geolocation, and weather data. Triggers: \"Azure Maps\", \"MapsSearchClient\", \"MapsRoutingClient\", \"MapsRenderingClient\", \"geocoding .NET\", \"route directions\", \"map tiles\", \"geolocation\".\npackage: Azure.Maps.Search\n---\n\n# Azure Maps (.NET)\n\nAzure Maps SDK for .NET providing location-based services: geocoding, routing, rendering, geolocation, and weather.\n\n## Installation\n\n```bash\n# Search (geocoding, reverse geocoding)\ndotnet add package Azure.Maps.Search --prerelease\n\n# Routing (directions, route matrix)\ndotnet add package Azure.Maps.Routing --prerelease\n\n# Rendering (map tiles, static images)\ndotnet add package Azure.Maps.Rendering --prerelease\n\n# Geolocation (IP to location)\ndotnet add package Azure.Maps.Geolocation --prerelease\n\n# Weather\ndotnet add package Azure.Maps.Weather --prerelease\n\n# Resource Management (account management, SAS tokens)\ndotnet add package Azure.ResourceManager.Maps --prerelease\n\n# Required for authentication\ndotnet add package Azure.Identity\n```\n\n**Current Versions**:\n- `Azure.Maps.Search`: v2.0.0-beta.5\n- `Azure.Maps.Routing`: v1.0.0-beta.4\n- `Azure.Maps.Rendering`: v2.0.0-beta.1\n- `Azure.Maps.Geolocation`: v1.0.0-beta.3\n- `Azure.ResourceManager.Maps`: v1.1.0-beta.2\n\n## Environment Variables\n\n```bash\nAZURE_MAPS_SUBSCRIPTION_KEY=\u003Cyour-subscription-key>\nAZURE_MAPS_CLIENT_ID=\u003Cyour-client-id>  # For Entra ID auth\n```\n\n## Authentication\n\n### Subscription Key (Shared Key)\n\n```csharp\nusing Azure;\nusing Azure.Maps.Search;\n\nvar subscriptionKey = Environment.GetEnvironmentVariable(\"AZURE_MAPS_SUBSCRIPTION_KEY\");\nvar credential = new AzureKeyCredential(subscriptionKey);\n\nvar client = new MapsSearchClient(credential);\n```\n\n### Microsoft Entra ID (Recommended for Production)\n\n```csharp\nusing Azure.Identity;\nusing Azure.Maps.Search;\n\nvar credential = new DefaultAzureCredential();\nvar clientId = Environment.GetEnvironmentVariable(\"AZURE_MAPS_CLIENT_ID\");\n\nvar client = new MapsSearchClient(credential, clientId);\n```\n\n### Shared Access Signature (SAS)\n\n```csharp\nusing Azure;\nusing Azure.Core;\nusing Azure.Identity;\nusing Azure.ResourceManager;\nusing Azure.ResourceManager.Maps;\nusing Azure.ResourceManager.Maps.Models;\nusing Azure.Maps.Search;\n\n\u002F\u002F Authenticate with Azure Resource Manager\nArmClient armClient = new ArmClient(new DefaultAzureCredential());\n\n\u002F\u002F Get Maps account resource\nResourceIdentifier mapsAccountResourceId = MapsAccountResource.CreateResourceIdentifier(\n    subscriptionId, resourceGroupName, accountName);\nMapsAccountResource mapsAccount = armClient.GetMapsAccountResource(mapsAccountResourceId);\n\n\u002F\u002F Generate SAS token\nMapsAccountSasContent sasContent = new MapsAccountSasContent(\n    MapsSigningKey.PrimaryKey, \n    principalId, \n    maxRatePerSecond: 500, \n    start: DateTime.UtcNow.ToString(\"O\"), \n    expiry: DateTime.UtcNow.AddDays(1).ToString(\"O\"));\n\nResponse\u003CMapsAccountSasToken> sas = mapsAccount.GetSas(sasContent);\n\n\u002F\u002F Create client with SAS token\nvar sasCredential = new AzureSasCredential(sas.Value.AccountSasToken);\nvar client = new MapsSearchClient(sasCredential);\n```\n\n## Client Hierarchy\n\n```\nAzure.Maps.Search\n└── MapsSearchClient\n    ├── GetGeocoding()                    → Geocode addresses\n    ├── GetGeocodingBatch()               → Batch geocoding\n    ├── GetReverseGeocoding()             → Coordinates to address\n    ├── GetReverseGeocodingBatch()        → Batch reverse geocoding\n    └── GetPolygon()                      → Get boundary polygons\n\nAzure.Maps.Routing\n└── MapsRoutingClient\n    ├── GetDirections()                   → Route directions\n    ├── GetImmediateRouteMatrix()         → Route matrix (sync, ≤100)\n    ├── GetRouteMatrix()                  → Route matrix (async, ≤700)\n    └── GetRouteRange()                   → Isochrone\u002Freachable range\n\nAzure.Maps.Rendering\n└── MapsRenderingClient\n    ├── GetMapTile()                      → Map tiles\n    ├── GetMapStaticImage()               → Static map images\n    └── GetCopyrightCaption()             → Copyright info\n\nAzure.Maps.Geolocation\n└── MapsGeolocationClient\n    └── GetCountryCode()                  → IP to country\u002Fregion\n\nAzure.Maps.Weather\n└── MapsWeatherClient\n    ├── GetCurrentWeatherConditions()     → Current weather\n    ├── GetDailyForecast()                → Daily forecast\n    ├── GetHourlyForecast()               → Hourly forecast\n    └── GetSevereWeatherAlerts()          → Weather alerts\n```\n\n## Core Workflows\n\n### 1. Geocoding (Address to Coordinates)\n\n```csharp\nusing Azure;\nusing Azure.Maps.Search;\n\nvar credential = new AzureKeyCredential(subscriptionKey);\nvar client = new MapsSearchClient(credential);\n\nResponse\u003CGeocodingResponse> result = client.GetGeocoding(\"1 Microsoft Way, Redmond, WA 98052\");\n\nforeach (var feature in result.Value.Features)\n{\n    Console.WriteLine($\"Coordinates: {string.Join(\",\", feature.Geometry.Coordinates)}\");\n    Console.WriteLine($\"Address: {feature.Properties.Address.FormattedAddress}\");\n    Console.WriteLine($\"Confidence: {feature.Properties.Confidence}\");\n}\n```\n\n### 2. Batch Geocoding\n\n```csharp\nusing Azure.Maps.Search.Models.Queries;\n\nList\u003CGeocodingQuery> queries = new List\u003CGeocodingQuery>\n{\n    new GeocodingQuery() { Query = \"400 Broad St, Seattle, WA\" },\n    new GeocodingQuery() { Query = \"1 Microsoft Way, Redmond, WA\" },\n    new GeocodingQuery() { AddressLine = \"Space Needle\", Top = 1 },\n};\n\nResponse\u003CGeocodingBatchResponse> results = client.GetGeocodingBatch(queries);\n\nforeach (var batchItem in results.Value.BatchItems)\n{\n    foreach (var feature in batchItem.Features)\n    {\n        Console.WriteLine($\"Coordinates: {string.Join(\",\", feature.Geometry.Coordinates)}\");\n    }\n}\n```\n\n### 3. Reverse Geocoding (Coordinates to Address)\n\n```csharp\nusing Azure.Core.GeoJson;\n\nGeoPosition coordinates = new GeoPosition(-122.138685, 47.6305637);\nResponse\u003CGeocodingResponse> result = client.GetReverseGeocoding(coordinates);\n\nforeach (var feature in result.Value.Features)\n{\n    Console.WriteLine($\"Address: {feature.Properties.Address.FormattedAddress}\");\n    Console.WriteLine($\"Locality: {feature.Properties.Address.Locality}\");\n}\n```\n\n### 4. Get Boundary Polygon\n\n```csharp\nusing Azure.Maps.Search.Models;\n\nGetPolygonOptions options = new GetPolygonOptions()\n{\n    Coordinates = new GeoPosition(-122.204141, 47.61256),\n    ResultType = BoundaryResultTypeEnum.Locality,\n    Resolution = ResolutionEnum.Small,\n};\n\nResponse\u003CBoundary> result = client.GetPolygon(options);\n\nConsole.WriteLine($\"Boundary copyright: {result.Value.Properties?.Copyright}\");\nConsole.WriteLine($\"Polygon count: {result.Value.Geometry.Count}\");\n```\n\n### 5. Route Directions\n\n```csharp\nusing Azure;\nusing Azure.Core.GeoJson;\nusing Azure.Maps.Routing;\nusing Azure.Maps.Routing.Models;\n\nvar client = new MapsRoutingClient(new AzureKeyCredential(subscriptionKey));\n\nList\u003CGeoPosition> routePoints = new List\u003CGeoPosition>()\n{\n    new GeoPosition(-122.34, 47.61),  \u002F\u002F Seattle\n    new GeoPosition(-122.13, 47.64)   \u002F\u002F Redmond\n};\n\nRouteDirectionQuery query = new RouteDirectionQuery(routePoints);\nResponse\u003CRouteDirections> result = client.GetDirections(query);\n\nforeach (var route in result.Value.Routes)\n{\n    Console.WriteLine($\"Distance: {route.Summary.LengthInMeters} meters\");\n    Console.WriteLine($\"Duration: {route.Summary.TravelTimeDuration}\");\n    \n    foreach (RouteLeg leg in route.Legs)\n    {\n        Console.WriteLine($\"Leg points: {leg.Points.Count}\");\n    }\n}\n```\n\n### 6. Route Directions with Options\n\n```csharp\nRouteDirectionOptions options = new RouteDirectionOptions()\n{\n    RouteType = RouteType.Fastest,\n    UseTrafficData = true,\n    TravelMode = TravelMode.Bicycle,\n    Language = RoutingLanguage.EnglishUsa,\n    InstructionsType = RouteInstructionsType.Text,\n};\n\nRouteDirectionQuery query = new RouteDirectionQuery(routePoints)\n{\n    RouteDirectionOptions = options\n};\n\nResponse\u003CRouteDirections> result = client.GetDirections(query);\n```\n\n### 7. Route Matrix\n\n```csharp\nRouteMatrixQuery routeMatrixQuery = new RouteMatrixQuery\n{\n    Origins = new List\u003CGeoPosition>()\n    {\n        new GeoPosition(-122.34, 47.61),\n        new GeoPosition(-122.13, 47.64)\n    },\n    Destinations = new List\u003CGeoPosition>() \n    { \n        new GeoPosition(-122.20, 47.62),\n        new GeoPosition(-122.40, 47.65)\n    },\n};\n\n\u002F\u002F Synchronous (up to 100 route combinations)\nResponse\u003CRouteMatrixResult> result = client.GetImmediateRouteMatrix(routeMatrixQuery);\n\nforeach (var cell in result.Value.Matrix.SelectMany(row => row))\n{\n    Console.WriteLine($\"Distance: {cell.Response?.RouteSummary?.LengthInMeters}\");\n    Console.WriteLine($\"Duration: {cell.Response?.RouteSummary?.TravelTimeDuration}\");\n}\n\n\u002F\u002F Asynchronous (up to 700 route combinations)\nRouteMatrixOptions routeMatrixOptions = new RouteMatrixOptions(routeMatrixQuery)\n{\n    TravelTimeType = TravelTimeType.All,\n};\nGetRouteMatrixOperation asyncResult = client.GetRouteMatrix(WaitUntil.Completed, routeMatrixOptions);\n```\n\n### 8. Route Range (Isochrone)\n\n```csharp\nRouteRangeOptions options = new RouteRangeOptions(-122.34, 47.61)\n{\n    TimeBudget = new TimeSpan(0, 20, 0)  \u002F\u002F 20 minutes\n};\n\nResponse\u003CRouteRangeResult> result = client.GetRouteRange(options);\n\n\u002F\u002F result.Value.ReachableRange contains the polygon\nConsole.WriteLine($\"Boundary points: {result.Value.ReachableRange.Boundary.Count}\");\n```\n\n### 9. Get Map Tiles\n\n```csharp\nusing Azure;\nusing Azure.Maps.Rendering;\n\nvar client = new MapsRenderingClient(new AzureKeyCredential(subscriptionKey));\n\nint zoom = 10;\nint tileSize = 256;\n\n\u002F\u002F Convert coordinates to tile index\nMapTileIndex tileIndex = MapsRenderingClient.PositionToTileXY(\n    new GeoPosition(13.3854, 52.517), zoom, tileSize);\n\n\u002F\u002F Fetch map tile\nGetMapTileOptions options = new GetMapTileOptions(\n    MapTileSetId.MicrosoftImagery,\n    new MapTileIndex(tileIndex.X, tileIndex.Y, zoom)\n);\n\nResponse\u003CStream> mapTile = client.GetMapTile(options);\n\n\u002F\u002F Save to file\nusing (FileStream fileStream = File.Create(\".\u002FMapTile.png\"))\n{\n    mapTile.Value.CopyTo(fileStream);\n}\n```\n\n### 10. IP Geolocation\n\n```csharp\nusing System.Net;\nusing Azure;\nusing Azure.Maps.Geolocation;\n\nvar client = new MapsGeolocationClient(new AzureKeyCredential(subscriptionKey));\n\nIPAddress ipAddress = IPAddress.Parse(\"2001:4898:80e8:b::189\");\nResponse\u003CCountryRegionResult> result = client.GetCountryCode(ipAddress);\n\nConsole.WriteLine($\"Country ISO Code: {result.Value.IsoCode}\");\n```\n\n### 11. Current Weather\n\n```csharp\nusing Azure;\nusing Azure.Core.GeoJson;\nusing Azure.Maps.Weather;\n\nvar client = new MapsWeatherClient(new AzureKeyCredential(subscriptionKey));\n\nvar position = new GeoPosition(-122.13071, 47.64011);\nvar options = new GetCurrentWeatherConditionsOptions(position);\n\nResponse\u003CCurrentConditionsResult> result = client.GetCurrentWeatherConditions(options);\n\nforeach (var condition in result.Value.Results)\n{\n    Console.WriteLine($\"Temperature: {condition.Temperature.Value} {condition.Temperature.Unit}\");\n    Console.WriteLine($\"Weather: {condition.Phrase}\");\n    Console.WriteLine($\"Humidity: {condition.RelativeHumidity}%\");\n}\n```\n\n## Key Types Reference\n\n### Search Package\n\n| Type | Purpose |\n|------|---------|\n| `MapsSearchClient` | Main client for search operations |\n| `GeocodingResponse` | Geocoding result |\n| `GeocodingBatchResponse` | Batch geocoding result |\n| `GeocodingQuery` | Query for batch geocoding |\n| `ReverseGeocodingQuery` | Query for batch reverse geocoding |\n| `GetPolygonOptions` | Options for polygon retrieval |\n| `Boundary` | Boundary polygon result |\n| `BoundaryResultTypeEnum` | Boundary type (Locality, AdminDistrict, etc.) |\n| `ResolutionEnum` | Polygon resolution (Small, Medium, Large) |\n\n### Routing Package\n\n| Type | Purpose |\n|------|---------|\n| `MapsRoutingClient` | Main client for routing operations |\n| `RouteDirectionQuery` | Query for route directions |\n| `RouteDirectionOptions` | Route calculation options |\n| `RouteDirections` | Route directions result |\n| `RouteLeg` | Segment of a route |\n| `RouteMatrixQuery` | Query for route matrix |\n| `RouteMatrixResult` | Route matrix result |\n| `RouteRangeOptions` | Options for isochrone |\n| `RouteRangeResult` | Isochrone result |\n| `RouteType` | Route type (Fastest, Shortest, Eco, Thrilling) |\n| `TravelMode` | Travel mode (Car, Truck, Bicycle, Pedestrian) |\n\n### Rendering Package\n\n| Type | Purpose |\n|------|---------|\n| `MapsRenderingClient` | Main client for rendering |\n| `GetMapTileOptions` | Map tile options |\n| `MapTileIndex` | Tile coordinates (X, Y, Zoom) |\n| `MapTileSetId` | Tile set identifier |\n\n### Common Types\n\n| Type | Purpose |\n|------|---------|\n| `GeoPosition` | Geographic position (longitude, latitude) |\n| `GeoBoundingBox` | Bounding box for geographic area |\n\n## Best Practices\n\n1. **Use Entra ID for production** — Prefer over subscription keys\n2. **Batch operations** — Use batch geocoding for multiple addresses\n3. **Cache results** — Geocoding results don't change frequently\n4. **Use appropriate tile sizes** — 256 or 512 pixels based on display\n5. **Handle rate limits** — Implement exponential backoff\n6. **Use async route matrix** — For large matrix calculations (>100)\n7. **Consider traffic data** — Set `UseTrafficData = true` for accurate ETAs\n\n## Error Handling\n\n```csharp\ntry\n{\n    Response\u003CGeocodingResponse> result = client.GetGeocoding(address);\n}\ncatch (RequestFailedException ex)\n{\n    Console.WriteLine($\"Status: {ex.Status}\");\n    Console.WriteLine($\"Error: {ex.Message}\");\n    \n    switch (ex.Status)\n    {\n        case 400:\n            \u002F\u002F Invalid request parameters\n            break;\n        case 401:\n            \u002F\u002F Authentication failed\n            break;\n        case 429:\n            \u002F\u002F Rate limited - implement backoff\n            break;\n    }\n}\n```\n\n## Related SDKs\n\n| SDK | Purpose | Install |\n|-----|---------|---------|\n| `Azure.Maps.Search` | Geocoding, search | `dotnet add package Azure.Maps.Search --prerelease` |\n| `Azure.Maps.Routing` | Directions, matrix | `dotnet add package Azure.Maps.Routing --prerelease` |\n| `Azure.Maps.Rendering` | Map tiles, images | `dotnet add package Azure.Maps.Rendering --prerelease` |\n| `Azure.Maps.Geolocation` | IP geolocation | `dotnet add package Azure.Maps.Geolocation --prerelease` |\n| `Azure.Maps.Weather` | Weather data | `dotnet add package Azure.Maps.Weather --prerelease` |\n| `Azure.ResourceManager.Maps` | Account management | `dotnet add package Azure.ResourceManager.Maps --prerelease` |\n\n## Reference Links\n\n| Resource | URL |\n|----------|-----|\n| Azure Maps Documentation | https:\u002F\u002Flearn.microsoft.com\u002Fazure\u002Fazure-maps\u002F |\n| Search API Reference | https:\u002F\u002Flearn.microsoft.com\u002Fdotnet\u002Fapi\u002Fazure.maps.search |\n| Routing API Reference | https:\u002F\u002Flearn.microsoft.com\u002Fdotnet\u002Fapi\u002Fazure.maps.routing |\n| GitHub Source | https:\u002F\u002Fgithub.com\u002FAzure\u002Fazure-sdk-for-net\u002Ftree\u002Fmain\u002Fsdk\u002Fmaps |\n| Pricing | https:\u002F\u002Fazure.microsoft.com\u002Fpricing\u002Fdetails\u002Fazure-maps\u002F |\n","# Azure Maps (.NET)\n\nAzure Maps SDK for .NET providing location-based services: geocoding, routing, rendering, geolocation, and weather.\n\n## Installation\n\n```bash\n# Search (geocoding, reverse geocoding)\ndotnet add package Azure.Maps.Search --prerelease\n\n# Routing (directions, route matrix)\ndotnet add package Azure.Maps.Routing --prerelease\n\n# Rendering (map tiles, static images)\ndotnet add package Azure.Maps.Rendering --prerelease\n\n# Geolocation (IP to location)\ndotnet add package Azure.Maps.Geolocation --prerelease\n\n# Weather\ndotnet add package Azure.Maps.Weather --prerelease\n\n# Resource Management (account management, SAS tokens)\ndotnet add package Azure.ResourceManager.Maps --prerelease\n\n# Required for authentication\ndotnet add package Azure.Identity\n```\n\n**Current Versions**:\n- `Azure.Maps.Search`: v2.0.0-beta.5\n- `Azure.Maps.Routing`: v1.0.0-beta.4\n- `Azure.Maps.Rendering`: v2.0.0-beta.1\n- `Azure.Maps.Geolocation`: v1.0.0-beta.3\n- `Azure.ResourceManager.Maps`: v1.1.0-beta.2\n\n## Environment Variables\n\n```bash\nAZURE_MAPS_SUBSCRIPTION_KEY=\u003Cyour-subscription-key>\nAZURE_MAPS_CLIENT_ID=\u003Cyour-client-id>  # For Entra ID auth\n```\n\n## Authentication\n\n### Subscription Key (Shared Key)\n\n```csharp\nusing Azure;\nusing Azure.Maps.Search;\n\nvar subscriptionKey = Environment.GetEnvironmentVariable(\"AZURE_MAPS_SUBSCRIPTION_KEY\");\nvar credential = new AzureKeyCredential(subscriptionKey);\n\nvar client = new MapsSearchClient(credential);\n```\n\n### Microsoft Entra ID (Recommended for Production)\n\n```csharp\nusing Azure.Identity;\nusing Azure.Maps.Search;\n\nvar credential = new DefaultAzureCredential();\nvar clientId = Environment.GetEnvironmentVariable(\"AZURE_MAPS_CLIENT_ID\");\n\nvar client = new MapsSearchClient(credential, clientId);\n```\n\n### Shared Access Signature (SAS)\n\n```csharp\nusing Azure;\nusing Azure.Core;\nusing Azure.Identity;\nusing Azure.ResourceManager;\nusing Azure.ResourceManager.Maps;\nusing Azure.ResourceManager.Maps.Models;\nusing Azure.Maps.Search;\n\n\u002F\u002F Authenticate with Azure Resource Manager\nArmClient armClient = new ArmClient(new DefaultAzureCredential());\n\n\u002F\u002F Get Maps account resource\nResourceIdentifier mapsAccountResourceId = MapsAccountResource.CreateResourceIdentifier(\n    subscriptionId, resourceGroupName, accountName);\nMapsAccountResource mapsAccount = armClient.GetMapsAccountResource(mapsAccountResourceId);\n\n\u002F\u002F Generate SAS token\nMapsAccountSasContent sasContent = new MapsAccountSasContent(\n    MapsSigningKey.PrimaryKey, \n    principalId, \n    maxRatePerSecond: 500, \n    start: DateTime.UtcNow.ToString(\"O\"), \n    expiry: DateTime.UtcNow.AddDays(1).ToString(\"O\"));\n\nResponse\u003CMapsAccountSasToken> sas = mapsAccount.GetSas(sasContent);\n\n\u002F\u002F Create client with SAS token\nvar sasCredential = new AzureSasCredential(sas.Value.AccountSasToken);\nvar client = new MapsSearchClient(sasCredential);\n```\n\n## Client Hierarchy\n\n```\nAzure.Maps.Search\n└── MapsSearchClient\n    ├── GetGeocoding()                    → Geocode addresses\n    ├── GetGeocodingBatch()               → Batch geocoding\n    ├── GetReverseGeocoding()             → Coordinates to address\n    ├── GetReverseGeocodingBatch()        → Batch reverse geocoding\n    └── GetPolygon()                      → Get boundary polygons\n\nAzure.Maps.Routing\n└── MapsRoutingClient\n    ├── GetDirections()                   → Route directions\n    ├── GetImmediateRouteMatrix()         → Route matrix (sync, ≤100)\n    ├── GetRouteMatrix()                  → Route matrix (async, ≤700)\n    └── GetRouteRange()                   → Isochrone\u002Freachable range\n\nAzure.Maps.Rendering\n└── MapsRenderingClient\n    ├── GetMapTile()                      → Map tiles\n    ├── GetMapStaticImage()               → Static map images\n    └── GetCopyrightCaption()             → Copyright info\n\nAzure.Maps.Geolocation\n└── MapsGeolocationClient\n    └── GetCountryCode()                  → IP to country\u002Fregion\n\nAzure.Maps.Weather\n└── MapsWeatherClient\n    ├── GetCurrentWeatherConditions()     → Current weather\n    ├── GetDailyForecast()                → Daily forecast\n    ├── GetHourlyForecast()               → Hourly forecast\n    └── GetSevereWeatherAlerts()          → Weather alerts\n```\n\n## Core Workflows\n\n### 1. Geocoding (Address to Coordinates)\n\n```csharp\nusing Azure;\nusing Azure.Maps.Search;\n\nvar credential = new AzureKeyCredential(subscriptionKey);\nvar client = new MapsSearchClient(credential);\n\nResponse\u003CGeocodingResponse> result = client.GetGeocoding(\"1 Microsoft Way, Redmond, WA 98052\");\n\nforeach (var feature in result.Value.Features)\n{\n    Console.WriteLine($\"Coordinates: {string.Join(\",\", feature.Geometry.Coordinates)}\");\n    Console.WriteLine($\"Address: {feature.Properties.Address.FormattedAddress}\");\n    Console.WriteLine($\"Confidence: {feature.Properties.Confidence}\");\n}\n```\n\n### 2. Batch Geocoding\n\n```csharp\nusing Azure.Maps.Search.Models.Queries;\n\nList\u003CGeocodingQuery> queries = new List\u003CGeocodingQuery>\n{\n    new GeocodingQuery() { Query = \"400 Broad St, Seattle, WA\" },\n    new GeocodingQuery() { Query = \"1 Microsoft Way, Redmond, WA\" },\n    new GeocodingQuery() { AddressLine = \"Space Needle\", Top = 1 },\n};\n\nResponse\u003CGeocodingBatchResponse> results = client.GetGeocodingBatch(queries);\n\nforeach (var batchItem in results.Value.BatchItems)\n{\n    foreach (var feature in batchItem.Features)\n    {\n        Console.WriteLine($\"Coordinates: {string.Join(\",\", feature.Geometry.Coordinates)}\");\n    }\n}\n```\n\n### 3. Reverse Geocoding (Coordinates to Address)\n\n```csharp\nusing Azure.Core.GeoJson;\n\nGeoPosition coordinates = new GeoPosition(-122.138685, 47.6305637);\nResponse\u003CGeocodingResponse> result = client.GetReverseGeocoding(coordinates);\n\nforeach (var feature in result.Value.Features)\n{\n    Console.WriteLine($\"Address: {feature.Properties.Address.FormattedAddress}\");\n    Console.WriteLine($\"Locality: {feature.Properties.Address.Locality}\");\n}\n```\n\n### 4. Get Boundary Polygon\n\n```csharp\nusing Azure.Maps.Search.Models;\n\nGetPolygonOptions options = new GetPolygonOptions()\n{\n    Coordinates = new GeoPosition(-122.204141, 47.61256),\n    ResultType = BoundaryResultTypeEnum.Locality,\n    Resolution = ResolutionEnum.Small,\n};\n\nResponse\u003CBoundary> result = client.GetPolygon(options);\n\nConsole.WriteLine($\"Boundary copyright: {result.Value.Properties?.Copyright}\");\nConsole.WriteLine($\"Polygon count: {result.Value.Geometry.Count}\");\n```\n\n### 5. Route Directions\n\n```csharp\nusing Azure;\nusing Azure.Core.GeoJson;\nusing Azure.Maps.Routing;\nusing Azure.Maps.Routing.Models;\n\nvar client = new MapsRoutingClient(new AzureKeyCredential(subscriptionKey));\n\nList\u003CGeoPosition> routePoints = new List\u003CGeoPosition>()\n{\n    new GeoPosition(-122.34, 47.61),  \u002F\u002F Seattle\n    new GeoPosition(-122.13, 47.64)   \u002F\u002F Redmond\n};\n\nRouteDirectionQuery query = new RouteDirectionQuery(routePoints);\nResponse\u003CRouteDirections> result = client.GetDirections(query);\n\nforeach (var route in result.Value.Routes)\n{\n    Console.WriteLine($\"Distance: {route.Summary.LengthInMeters} meters\");\n    Console.WriteLine($\"Duration: {route.Summary.TravelTimeDuration}\");\n    \n    foreach (RouteLeg leg in route.Legs)\n    {\n        Console.WriteLine($\"Leg points: {leg.Points.Count}\");\n    }\n}\n```\n\n### 6. Route Directions with Options\n\n```csharp\nRouteDirectionOptions options = new RouteDirectionOptions()\n{\n    RouteType = RouteType.Fastest,\n    UseTrafficData = true,\n    TravelMode = TravelMode.Bicycle,\n    Language = RoutingLanguage.EnglishUsa,\n    InstructionsType = RouteInstructionsType.Text,\n};\n\nRouteDirectionQuery query = new RouteDirectionQuery(routePoints)\n{\n    RouteDirectionOptions = options\n};\n\nResponse\u003CRouteDirections> result = client.GetDirections(query);\n```\n\n### 7. Route Matrix\n\n```csharp\nRouteMatrixQuery routeMatrixQuery = new RouteMatrixQuery\n{\n    Origins = new List\u003CGeoPosition>()\n    {\n        new GeoPosition(-122.34, 47.61),\n        new GeoPosition(-122.13, 47.64)\n    },\n    Destinations = new List\u003CGeoPosition>() \n    { \n        new GeoPosition(-122.20, 47.62),\n        new GeoPosition(-122.40, 47.65)\n    },\n};\n\n\u002F\u002F Synchronous (up to 100 route combinations)\nResponse\u003CRouteMatrixResult> result = client.GetImmediateRouteMatrix(routeMatrixQuery);\n\nforeach (var cell in result.Value.Matrix.SelectMany(row => row))\n{\n    Console.WriteLine($\"Distance: {cell.Response?.RouteSummary?.LengthInMeters}\");\n    Console.WriteLine($\"Duration: {cell.Response?.RouteSummary?.TravelTimeDuration}\");\n}\n\n\u002F\u002F Asynchronous (up to 700 route combinations)\nRouteMatrixOptions routeMatrixOptions = new RouteMatrixOptions(routeMatrixQuery)\n{\n    TravelTimeType = TravelTimeType.All,\n};\nGetRouteMatrixOperation asyncResult = client.GetRouteMatrix(WaitUntil.Completed, routeMatrixOptions);\n```\n\n### 8. Route Range (Isochrone)\n\n```csharp\nRouteRangeOptions options = new RouteRangeOptions(-122.34, 47.61)\n{\n    TimeBudget = new TimeSpan(0, 20, 0)  \u002F\u002F 20 minutes\n};\n\nResponse\u003CRouteRangeResult> result = client.GetRouteRange(options);\n\n\u002F\u002F result.Value.ReachableRange contains the polygon\nConsole.WriteLine($\"Boundary points: {result.Value.ReachableRange.Boundary.Count}\");\n```\n\n### 9. Get Map Tiles\n\n```csharp\nusing Azure;\nusing Azure.Maps.Rendering;\n\nvar client = new MapsRenderingClient(new AzureKeyCredential(subscriptionKey));\n\nint zoom = 10;\nint tileSize = 256;\n\n\u002F\u002F Convert coordinates to tile index\nMapTileIndex tileIndex = MapsRenderingClient.PositionToTileXY(\n    new GeoPosition(13.3854, 52.517), zoom, tileSize);\n\n\u002F\u002F Fetch map tile\nGetMapTileOptions options = new GetMapTileOptions(\n    MapTileSetId.MicrosoftImagery,\n    new MapTileIndex(tileIndex.X, tileIndex.Y, zoom)\n);\n\nResponse\u003CStream> mapTile = client.GetMapTile(options);\n\n\u002F\u002F Save to file\nusing (FileStream fileStream = File.Create(\".\u002FMapTile.png\"))\n{\n    mapTile.Value.CopyTo(fileStream);\n}\n```\n\n### 10. IP Geolocation\n\n```csharp\nusing System.Net;\nusing Azure;\nusing Azure.Maps.Geolocation;\n\nvar client = new MapsGeolocationClient(new AzureKeyCredential(subscriptionKey));\n\nIPAddress ipAddress = IPAddress.Parse(\"2001:4898:80e8:b::189\");\nResponse\u003CCountryRegionResult> result = client.GetCountryCode(ipAddress);\n\nConsole.WriteLine($\"Country ISO Code: {result.Value.IsoCode}\");\n```\n\n### 11. Current Weather\n\n```csharp\nusing Azure;\nusing Azure.Core.GeoJson;\nusing Azure.Maps.Weather;\n\nvar client = new MapsWeatherClient(new AzureKeyCredential(subscriptionKey));\n\nvar position = new GeoPosition(-122.13071, 47.64011);\nvar options = new GetCurrentWeatherConditionsOptions(position);\n\nResponse\u003CCurrentConditionsResult> result = client.GetCurrentWeatherConditions(options);\n\nforeach (var condition in result.Value.Results)\n{\n    Console.WriteLine($\"Temperature: {condition.Temperature.Value} {condition.Temperature.Unit}\");\n    Console.WriteLine($\"Weather: {condition.Phrase}\");\n    Console.WriteLine($\"Humidity: {condition.RelativeHumidity}%\");\n}\n```\n\n## Key Types Reference\n\n### Search Package\n\n| Type | Purpose |\n|------|---------|\n| `MapsSearchClient` | Main client for search operations |\n| `GeocodingResponse` | Geocoding result |\n| `GeocodingBatchResponse` | Batch geocoding result |\n| `GeocodingQuery` | Query for batch geocoding |\n| `ReverseGeocodingQuery` | Query for batch reverse geocoding |\n| `GetPolygonOptions` | Options for polygon retrieval |\n| `Boundary` | Boundary polygon result |\n| `BoundaryResultTypeEnum` | Boundary type (Locality, AdminDistrict, etc.) |\n| `ResolutionEnum` | Polygon resolution (Small, Medium, Large) |\n\n### Routing Package\n\n| Type | Purpose |\n|------|---------|\n| `MapsRoutingClient` | Main client for routing operations |\n| `RouteDirectionQuery` | Query for route directions |\n| `RouteDirectionOptions` | Route calculation options |\n| `RouteDirections` | Route directions result |\n| `RouteLeg` | Segment of a route |\n| `RouteMatrixQuery` | Query for route matrix |\n| `RouteMatrixResult` | Route matrix result |\n| `RouteRangeOptions` | Options for isochrone |\n| `RouteRangeResult` | Isochrone result |\n| `RouteType` | Route type (Fastest, Shortest, Eco, Thrilling) |\n| `TravelMode` | Travel mode (Car, Truck, Bicycle, Pedestrian) |\n\n### Rendering Package\n\n| Type | Purpose |\n|------|---------|\n| `MapsRenderingClient` | Main client for rendering |\n| `GetMapTileOptions` | Map tile options |\n| `MapTileIndex` | Tile coordinates (X, Y, Zoom) |\n| `MapTileSetId` | Tile set identifier |\n\n### Common Types\n\n| Type | Purpose |\n|------|---------|\n| `GeoPosition` | Geographic position (longitude, latitude) |\n| `GeoBoundingBox` | Bounding box for geographic area |\n\n## Best Practices\n\n1. **Use Entra ID for production** — Prefer over subscription keys\n2. **Batch operations** — Use batch geocoding for multiple addresses\n3. **Cache results** — Geocoding results don't change frequently\n4. **Use appropriate tile sizes** — 256 or 512 pixels based on display\n5. **Handle rate limits** — Implement exponential backoff\n6. **Use async route matrix** — For large matrix calculations (>100)\n7. **Consider traffic data** — Set `UseTrafficData = true` for accurate ETAs\n\n## Error Handling\n\n```csharp\ntry\n{\n    Response\u003CGeocodingResponse> result = client.GetGeocoding(address);\n}\ncatch (RequestFailedException ex)\n{\n    Console.WriteLine($\"Status: {ex.Status}\");\n    Console.WriteLine($\"Error: {ex.Message}\");\n    \n    switch (ex.Status)\n    {\n        case 400:\n            \u002F\u002F Invalid request parameters\n            break;\n        case 401:\n            \u002F\u002F Authentication failed\n            break;\n        case 429:\n            \u002F\u002F Rate limited - implement backoff\n            break;\n    }\n}\n```\n\n## Related SDKs\n\n| SDK | Purpose | Install |\n|-----|---------|---------|\n| `Azure.Maps.Search` | Geocoding, search | `dotnet add package Azure.Maps.Search --prerelease` |\n| `Azure.Maps.Routing` | Directions, matrix | `dotnet add package Azure.Maps.Routing --prerelease` |\n| `Azure.Maps.Rendering` | Map tiles, images | `dotnet add package Azure.Maps.Rendering --prerelease` |\n| `Azure.Maps.Geolocation` | IP geolocation | `dotnet add package Azure.Maps.Geolocation --prerelease` |\n| `Azure.Maps.Weather` | Weather data | `dotnet add package Azure.Maps.Weather --prerelease` |\n| `Azure.ResourceManager.Maps` | Account management | `dotnet add package Azure.ResourceManager.Maps --prerelease` |\n\n## Reference Links\n\n| Resource | URL |\n|----------|-----|\n| Azure Maps Documentation | https:\u002F\u002Flearn.microsoft.com\u002Fazure\u002Fazure-maps\u002F |\n| Search API Reference | https:\u002F\u002Flearn.microsoft.com\u002Fdotnet\u002Fapi\u002Fazure.maps.search |\n| Routing API Reference | https:\u002F\u002Flearn.microsoft.com\u002Fdotnet\u002Fapi\u002Fazure.maps.routing |\n| GitHub Source | https:\u002F\u002Fgithub.com\u002FAzure\u002Fazure-sdk-for-net\u002Ftree\u002Fmain\u002Fsdk\u002Fmaps |\n| Pricing | https:\u002F\u002Fazure.microsoft.com\u002Fpricing\u002Fdetails\u002Fazure-maps\u002F |\n",{"name":5,"package":43,"description":44},"Azure.Maps.Search","Azure Maps SDK for .NET. Location-based services including geocoding, routing, rendering, geolocation, and weather. Use for address search, directions, map tiles, IP geolocation, and weather data. Triggers: \"Azure Maps\", \"MapsSearchClient\", \"MapsRoutingClient\", \"MapsRenderingClient\", \"geocoding .NET\", \"route directions\", \"map tiles\", \"geolocation\".\n","main","def8531e65114c0fca8fb8551c1871ee0eed705c","skills\u002Faiskillstore\u002Fmarketplace\u002Fsickn33\u002Fazure-maps-search-dotnet",24,"https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub","https:\u002F\u002Fskillshub.wtf","https:\u002F\u002Fgithub.com\u002FComeOnOliver","AI & Blockchain Engineer\r\n","2026-06-24 22:07:19",{"source":8,"skillName":5,"commands":55,"prompt":65,"zipAvailable":66},[56,59,62],{"tool":57,"command":58},"npx","npx skills add ComeOnOliver\u002Fskillshub --skill azure-maps-search-dotnet",{"tool":60,"command":61},"bunx","bunx skills add ComeOnOliver\u002Fskillshub --skill azure-maps-search-dotnet",{"tool":63,"command":64},"pnpm","pnpm dlx skills add ComeOnOliver\u002Fskillshub --skill azure-maps-search-dotnet","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Faiskillstore\u002Fmarketplace\u002Fsickn33\u002Fazure-maps-search-dotnet\u002FSKILL.md",true,[68],{"path":69,"resourceType":70,"resourceTypeDesc":71,"sizeBytes":72,"sourceHtmlUrl":73},"skill-report.json","REFERENCE","参考文档",8594,"https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Faiskillstore\u002Fmarketplace\u002Fsickn33\u002Fazure-maps-search-dotnet\u002Fskill-report.json",[75,89,99,107,113,120],{"skillNo":76,"name":77,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":78,"categories":79,"keywords":85,"publishedAt":38},"01M6FKJN13GMG4KY57J3QD8GY5","model-hierarchy-skill","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Fzscole\u002Fmodel-hierarchy-skill\u002Fmodel-hierarchy-skill\u002FSKILL.md",[80],{"categoryNo":81,"categoryName":82,"taxonomyType":83,"taxonomyTypeDesc":84},"01JBSEEDCAT000000000000023","Skill与智能体开发","SCENARIO","使用场景",[86,87,88],"model","model hierarchy","model hierarchy skill",{"skillNo":90,"name":91,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":92,"categories":93,"keywords":95,"publishedAt":38},"01M6FKJJJ6GCAMR4PPPRD12M5X","zoom-mcp","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Fzoom\u002Fskills\u002Fzoom-mcp\u002FSKILL.md",[94],{"categoryNo":81,"categoryName":82,"taxonomyType":83,"taxonomyTypeDesc":84},[96,97,98],"MCP","zoom","zoom mcp",{"skillNo":100,"name":101,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":102,"categories":103,"keywords":104,"publishedAt":38},"01M6FKJE3KYT3KPEZMEEHYKA6K","zoom-apps-sdk","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Fzoom\u002Fskills\u002Fzoom-apps-sdk\u002FSKILL.md",[],[37,105,106,97],"zoom apps sdk","apps",{"skillNo":108,"name":109,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":110,"categories":111,"keywords":112,"publishedAt":38},"01M6FKJ9EDH9Q5VWDF8HAJRSP0","windows","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Fzoom\u002Fskills\u002Fwindows\u002FSKILL.md",[],[109],{"skillNo":114,"name":115,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":116,"categories":117,"keywords":119,"publishedAt":38},"01M6FKJ666BEEFC3AE9GJ72Q93","whiteboard","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Fzoom\u002Fskills\u002Fwhiteboard\u002FSKILL.md",[118],{"categoryNo":81,"categoryName":82,"taxonomyType":83,"taxonomyTypeDesc":84},[115],{"skillNo":121,"name":122,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":123,"categories":124,"keywords":125,"publishedAt":38},"01M6FKJ21WFCDGTJQ2Q91T9DVW","websockets","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Fzoom\u002Fskills\u002Fwebsockets\u002FSKILL.md",[],[122]]