From 6b17e22eb6a7e22cc11de231cb2aaf3f0533f5fd Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sun, 24 May 2026 12:57:07 +0000 Subject: [PATCH 1/5] Initial plan From 3fe4cb5cfbc7c7e280512a3566b7e4e1c0685b43 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sun, 24 May 2026 12:59:12 +0000 Subject: [PATCH 2/5] Update Windows Maps docs for Azure Maps Agent-Logs-Url: https://github.com/dotnet/docs-maui/sessions/2571c4f5-9b29-42a0-97e2-099d42bd022a Co-authored-by: jfversluis <939291+jfversluis@users.noreply.github.com> --- docs/user-interface/controls/map.md | 45 +++++++++++++++++++++++++++-- 1 file changed, 42 insertions(+), 3 deletions(-) diff --git a/docs/user-interface/controls/map.md b/docs/user-interface/controls/map.md index fa757e69d3..60cc63e040 100644 --- a/docs/user-interface/controls/map.md +++ b/docs/user-interface/controls/map.md @@ -1,7 +1,7 @@ --- title: "Map" description: "Learn how to use the Map control, which is a cross-platform view for displaying and annotating maps. The Map control is available in the Microsoft.Maui.Controls.Maps NuGet package." -ms.date: 03/23/2026 +ms.date: 05/24/2026 --- # Map @@ -10,12 +10,23 @@ ms.date: 03/23/2026 The .NET Multi-platform App UI (.NET MAUI) control is a cross-platform view for displaying and annotating maps. The control uses the native map control on each platform, and is provided by the [Microsoft.Maui.Controls.Maps NuGet package](https://www.nuget.org/packages/Microsoft.Maui.Controls.Maps/). +::: moniker range="<=net-maui-9.0" + > [!IMPORTANT] > The control isn't supported on Windows due to lack of a map control in WinUI. However, the [CommunityToolkit.Maui.Maps](https://www.nuget.org/packages/CommunityToolkit.Maui.Maps) NuGet package provides access to Bing Maps through a `WebView` on Windows. For more information, see [Get started](/dotnet/communitytoolkit/maui/get-started?tabs=CommunityToolkitMauiMaps). +::: moniker-end + +::: moniker range=">=net-maui-10.0" + +> [!IMPORTANT] +> On Windows, the control uses the WinUI 3 `MapControl`, which is backed by Azure Maps. To display maps on Windows, configure an Azure Maps subscription key. For more information, see [Windows](#windows). + +::: moniker-end + ## Setup -The control uses the native map control on each platform. This provides a fast, familiar maps experience for users, but means that some configuration steps are needed to adhere to each platforms API requirements. +The control uses the native map control on each platform. This provides a fast, familiar maps experience for users, but means that some configuration steps are needed to adhere to each platform's API requirements. ### Map initialization @@ -56,7 +67,7 @@ Once the NuGet package has been added and initialized, control uses the WinUI 3 `MapControl`, which is backed by Azure Maps. To display map data, create an Azure Maps account and configure your app with an Azure Maps subscription key: + +```csharp +builder + .UseMauiApp() + .UseMauiMaps(); + +builder.ConfigureEssentials(essentials => +{ + essentials.UseMapServiceToken("YOUR_AZURE_MAPS_KEY"); +}); +``` + +Without a valid Azure Maps subscription key, the Windows map control can't authenticate with Azure Maps. + +The Windows implementation supports moving the map region, street, satellite, and hybrid map types, traffic data, scrolling and zooming, and pins. Due to WinUI 3 `MapControl` limitations, the following features aren't supported on Windows and have no effect: + +- Displaying the user's location with `IsShowingUser`. +- Displaying polygons, polylines, and circles from the `MapElements` collection. +- Pin labels and info windows. +- The `MapClicked` event for taps on the map background. + +::: moniker-end + ## Map control The class defines the following properties that control map appearance and behavior: From de03a6fc838ad0cb01317678e0fd8c6f10e38427 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sun, 24 May 2026 12:59:46 +0000 Subject: [PATCH 3/5] Clarify Windows Maps support details Agent-Logs-Url: https://github.com/dotnet/docs-maui/sessions/2571c4f5-9b29-42a0-97e2-099d42bd022a Co-authored-by: jfversluis <939291+jfversluis@users.noreply.github.com> --- docs/user-interface/controls/map.md | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/docs/user-interface/controls/map.md b/docs/user-interface/controls/map.md index 60cc63e040..3189d11889 100644 --- a/docs/user-interface/controls/map.md +++ b/docs/user-interface/controls/map.md @@ -177,9 +177,17 @@ builder.ConfigureEssentials(essentials => }); ``` -Without a valid Azure Maps subscription key, the Windows map control can't authenticate with Azure Maps. +Without a valid Azure Maps subscription key, the Windows map control can't authenticate with Azure Maps and won't display map data. -The Windows implementation supports moving the map region, street, satellite, and hybrid map types, traffic data, scrolling and zooming, and pins. Due to WinUI 3 `MapControl` limitations, the following features aren't supported on Windows and have no effect: +The Windows implementation supports: + +- Moving the map region. +- Street, satellite, and hybrid map types. +- Traffic data. +- Scrolling and zooming. +- Pins. + +Due to WinUI 3 `MapControl` limitations, the following features aren't supported on Windows and have no effect: - Displaying the user's location with `IsShowingUser`. - Displaying polygons, polylines, and circles from the `MapElements` collection. From 1622610bd9570947e6683fdefec2655530c7032e Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sun, 24 May 2026 13:00:16 +0000 Subject: [PATCH 4/5] Address Azure Maps docs review feedback Agent-Logs-Url: https://github.com/dotnet/docs-maui/sessions/2571c4f5-9b29-42a0-97e2-099d42bd022a Co-authored-by: jfversluis <939291+jfversluis@users.noreply.github.com> --- docs/user-interface/controls/map.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/docs/user-interface/controls/map.md b/docs/user-interface/controls/map.md index 3189d11889..bd53d15640 100644 --- a/docs/user-interface/controls/map.md +++ b/docs/user-interface/controls/map.md @@ -20,7 +20,7 @@ The .NET Multi-platform App UI (.NET MAUI) [!IMPORTANT] -> On Windows, the control uses the WinUI 3 `MapControl`, which is backed by Azure Maps. To display maps on Windows, configure an Azure Maps subscription key. For more information, see [Windows](#windows). +> On Windows, the control uses the WinUI 3 `MapControl`, which is backed by Azure Maps. To display maps on Windows, configure an Azure Maps subscription key. ::: moniker-end @@ -179,6 +179,8 @@ builder.ConfigureEssentials(essentials => Without a valid Azure Maps subscription key, the Windows map control can't authenticate with Azure Maps and won't display map data. +You can retrieve the subscription key from your Azure Maps account in the Azure portal. + The Windows implementation supports: - Moving the map region. From 928951c434c493e6bb34fcd6513e5719c2413c9d Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sun, 24 May 2026 13:00:51 +0000 Subject: [PATCH 5/5] Refine Azure Maps key guidance Agent-Logs-Url: https://github.com/dotnet/docs-maui/sessions/2571c4f5-9b29-42a0-97e2-099d42bd022a Co-authored-by: jfversluis <939291+jfversluis@users.noreply.github.com> --- docs/user-interface/controls/map.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/user-interface/controls/map.md b/docs/user-interface/controls/map.md index bd53d15640..9a6bd088d6 100644 --- a/docs/user-interface/controls/map.md +++ b/docs/user-interface/controls/map.md @@ -173,17 +173,17 @@ builder builder.ConfigureEssentials(essentials => { - essentials.UseMapServiceToken("YOUR_AZURE_MAPS_KEY"); + essentials.UseMapServiceToken("YOUR_AZURE_MAPS_SUBSCRIPTION_KEY"); }); ``` Without a valid Azure Maps subscription key, the Windows map control can't authenticate with Azure Maps and won't display map data. -You can retrieve the subscription key from your Azure Maps account in the Azure portal. +You can retrieve the subscription key from your Azure Maps account in the Azure portal. For more information, see [Manage authentication in Azure Maps](/azure/azure-maps/how-to-manage-authentication). The Windows implementation supports: -- Moving the map region. +- Programmatically moving the map region with `MoveToRegion`. - Street, satellite, and hybrid map types. - Traffic data. - Scrolling and zooming.