diff --git a/src/Controls/tests/TestCases.HostApp/CoreViews/CorePageView.cs b/src/Controls/tests/TestCases.HostApp/CoreViews/CorePageView.cs
index 129c0bf1f5ba..63df1cd8bcc3 100644
--- a/src/Controls/tests/TestCases.HostApp/CoreViews/CorePageView.cs
+++ b/src/Controls/tests/TestCases.HostApp/CoreViews/CorePageView.cs
@@ -93,6 +93,7 @@ public override string ToString()
new GalleryPageFactory(() => new ImageButtonControlPage(), "ImageButton Feature Matrix"),
new GalleryPageFactory(() => new BoxViewControlPage(), "BoxView Feature Matrix"),
new GalleryPageFactory(() => new EditorControlPage(), "Editor Feature Matrix"),
+ new GalleryPageFactory(() => new MapControlPage(), "Map Feature Matrix"),
};
public CorePageView(Page rootPage)
diff --git a/src/Controls/tests/TestCases.HostApp/FeatureMatrix/Map/MapControlPage.xaml b/src/Controls/tests/TestCases.HostApp/FeatureMatrix/Map/MapControlPage.xaml
new file mode 100644
index 000000000000..997b24b6aa5e
--- /dev/null
+++ b/src/Controls/tests/TestCases.HostApp/FeatureMatrix/Map/MapControlPage.xaml
@@ -0,0 +1,60 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/Controls/tests/TestCases.HostApp/FeatureMatrix/Map/MapControlPage.xaml.cs b/src/Controls/tests/TestCases.HostApp/FeatureMatrix/Map/MapControlPage.xaml.cs
new file mode 100644
index 000000000000..68f8c53dc545
--- /dev/null
+++ b/src/Controls/tests/TestCases.HostApp/FeatureMatrix/Map/MapControlPage.xaml.cs
@@ -0,0 +1,237 @@
+using System.Collections.Specialized;
+using System.ComponentModel;
+using Microsoft.Maui.Controls.Maps;
+
+namespace Maui.Controls.Sample;
+
+public class MapControlPage : NavigationPage
+{
+ private MapViewModel _viewModel;
+ public MapControlPage()
+ {
+ _viewModel = new MapViewModel();
+ PushAsync(new MapControlMainPage(_viewModel));
+ }
+}
+
+public partial class MapControlMainPage : ContentPage
+{
+ private MapViewModel _viewModel;
+ public MapControlMainPage(MapViewModel viewModel)
+ {
+
+ InitializeComponent();
+ _viewModel = viewModel;
+ BindingContext = _viewModel;
+
+ // Set initial label text to 'Not clicked'
+ var mapLabel = this.FindByName("MapClickedLabel");
+ if (mapLabel != null)
+ mapLabel.Text = "Map Clicked: Not clicked";
+ var markerLabel = this.FindByName("MarkerClickedLabel");
+ if (markerLabel != null)
+ markerLabel.Text = "Marker Clicked: Not clicked";
+
+ // Handle MapElements collection changes manually since it's not directly bindable
+ _viewModel.MapElements.CollectionChanged += OnMapElementsCollectionChanged;
+
+ // Note: Pins collection changes are handled through ItemsSource binding
+ // Manual Pins handling is only needed when ItemsSource is null
+ _viewModel.Pins.CollectionChanged += OnPinsCollectionChanged;
+ _viewModel.PropertyChanged += OnViewModelPropertyChanged;
+
+ // ItemsSource, ItemTemplate, and ItemTemplateSelector are already bound in XAML
+ // No need for programmatic binding as it can cause conflicts
+
+ // Set initial map region to Pearl City
+ TestMap.MoveToRegion(_viewModel.InitialRegion);
+
+ // Ensure ItemTemplate and ItemTemplateSelector are synchronized with ViewModel
+ if (_viewModel.ItemTemplate != null)
+ {
+ TestMap.ItemTemplate = _viewModel.ItemTemplate;
+ }
+ if (_viewModel.ItemTemplateSelector != null)
+ {
+ TestMap.ItemTemplateSelector = _viewModel.ItemTemplateSelector;
+ }
+
+ // Subscribe to map events to sync VisibleRegion back to ViewModel
+ TestMap.PropertyChanged += OnMapPropertyChanged;
+
+ // Subscribe to MessagingCenter for label updates
+ Microsoft.Maui.Controls.MessagingCenter.Subscribe