Index: Core/Components/src/Core.Components.DotSpatial.Forms/MapControl.Designer.cs =================================================================== diff -u -r7ab91c0d66dadb9c9cab1dcac9e47483522aabe4 -re25cbbd88e41c07ec5be2ba2f686f2e85e0f3706 --- Core/Components/src/Core.Components.DotSpatial.Forms/MapControl.Designer.cs (.../MapControl.Designer.cs) (revision 7ab91c0d66dadb9c9cab1dcac9e47483522aabe4) +++ Core/Components/src/Core.Components.DotSpatial.Forms/MapControl.Designer.cs (.../MapControl.Designer.cs) (revision e25cbbd88e41c07ec5be2ba2f686f2e85e0f3706) @@ -43,7 +43,7 @@ this.panToolStripButton = new System.Windows.Forms.ToolStripButton(); this.zoomToRectangleToolStripButton = new System.Windows.Forms.ToolStripButton(); this.toolStripSeparator1 = new System.Windows.Forms.ToolStripSeparator(); - this.zoomToAllVisibleLayersToolStripButton = new System.Windows.Forms.ToolStripButton(); + this.zoomToVisibleLayersToolStripButton = new System.Windows.Forms.ToolStripButton(); this.toolStripSeparator2 = new System.Windows.Forms.ToolStripSeparator(); this.showCoordinatesToolStripButton = new System.Windows.Forms.ToolStripButton(); this.tableLayoutPanel = new System.Windows.Forms.TableLayoutPanel(); @@ -61,7 +61,7 @@ this.panToolStripButton, this.zoomToRectangleToolStripButton, this.toolStripSeparator1, - this.zoomToAllVisibleLayersToolStripButton, + this.zoomToVisibleLayersToolStripButton, this.toolStripSeparator2, this.showCoordinatesToolStripButton}); this.toolStrip.LayoutStyle = System.Windows.Forms.ToolStripLayoutStyle.VerticalStackWithOverflow; @@ -95,15 +95,15 @@ this.toolStripSeparator1.Name = "toolStripSeparator1"; this.toolStripSeparator1.Size = new System.Drawing.Size(26, 6); // - // zoomToAllVisibleLayersToolStripButton + // zoomToVisibleLayersToolStripButton // - this.zoomToAllVisibleLayersToolStripButton.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Text; - this.zoomToAllVisibleLayersToolStripButton.Margin = new System.Windows.Forms.Padding(2, 2, 2, 3); - this.zoomToAllVisibleLayersToolStripButton.Name = "zoomToAllVisibleLayersToolStripButton"; - this.zoomToAllVisibleLayersToolStripButton.Size = new System.Drawing.Size(22, 19); - this.zoomToAllVisibleLayersToolStripButton.Text = ""; - this.zoomToAllVisibleLayersToolStripButton.ToolTipText = global::Core.Components.DotSpatial.Forms.Properties.Resources.MapControl_ZoomToExtents; - this.zoomToAllVisibleLayersToolStripButton.Click += new System.EventHandler(this.ZoomToAllVisibleLayersToolStripButtonClick); + this.zoomToVisibleLayersToolStripButton.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Text; + this.zoomToVisibleLayersToolStripButton.Margin = new System.Windows.Forms.Padding(2, 2, 2, 3); + this.zoomToVisibleLayersToolStripButton.Name = "zoomToVisibleLayersToolStripButton"; + this.zoomToVisibleLayersToolStripButton.Size = new System.Drawing.Size(22, 19); + this.zoomToVisibleLayersToolStripButton.Text = ""; + this.zoomToVisibleLayersToolStripButton.ToolTipText = global::Core.Components.DotSpatial.Forms.Properties.Resources.MapControl_ZoomToVisibleLayers; + this.zoomToVisibleLayersToolStripButton.Click += new System.EventHandler(this.ZoomToVisibleLayersToolStripButtonClick); // // toolStripSeparator2 // @@ -154,7 +154,7 @@ private System.Windows.Forms.ToolStrip toolStrip; private System.Windows.Forms.ToolStripButton panToolStripButton; private System.Windows.Forms.ToolStripButton zoomToRectangleToolStripButton; - private System.Windows.Forms.ToolStripButton zoomToAllVisibleLayersToolStripButton; + private System.Windows.Forms.ToolStripButton zoomToVisibleLayersToolStripButton; private System.Windows.Forms.ToolStripButton showCoordinatesToolStripButton; private System.Windows.Forms.ToolStripSeparator toolStripSeparator1; private System.Windows.Forms.ToolStripSeparator toolStripSeparator2; Index: Core/Components/src/Core.Components.DotSpatial.Forms/MapControl.cs =================================================================== diff -u -r49c9348f8c59265a17290c1626e67bd62f7b0436 -re25cbbd88e41c07ec5be2ba2f686f2e85e0f3706 --- Core/Components/src/Core.Components.DotSpatial.Forms/MapControl.cs (.../MapControl.cs) (revision 49c9348f8c59265a17290c1626e67bd62f7b0436) +++ Core/Components/src/Core.Components.DotSpatial.Forms/MapControl.cs (.../MapControl.cs) (revision e25cbbd88e41c07ec5be2ba2f686f2e85e0f3706) @@ -197,7 +197,7 @@ var font = new Font(fonts.Families[0], 14.0F); panToolStripButton.Font = font; zoomToRectangleToolStripButton.Font = font; - zoomToAllVisibleLayersToolStripButton.Font = font; + zoomToVisibleLayersToolStripButton.Font = font; showCoordinatesToolStripButton.Font = font; } @@ -487,14 +487,14 @@ #region Map Interaction - public void ZoomToAllVisibleLayers() + public void ZoomToVisibleLayers() { - ZoomToAllVisibleLayers(Data); + ZoomToVisibleLayers(Data); } - public void ZoomToAllVisibleLayers(MapData mapData) + public void ZoomToVisibleLayers(MapData mapData) { - Envelope envelope = CreateEnvelopeForAllVisibleLayers(mapData); + Envelope envelope = CreateEnvelopeForVisibleLayers(mapData); if (!envelope.IsNull) { @@ -523,11 +523,11 @@ /// The area definition. /// Thrown when is /// not part of the drawn map features. - private Envelope CreateEnvelopeForAllVisibleLayers(MapData mapData) + private Envelope CreateEnvelopeForVisibleLayers(MapData mapData) { if (mapData is MapDataCollection collection) { - return CreateEnvelopeForAllVisibleLayers(collection); + return CreateEnvelopeForVisibleLayers(collection); } DrawnMapData drawnMapData = drawnMapDataList.FirstOrDefault(dmd => dmd.FeatureBasedMapData.Equals(mapData)); @@ -555,13 +555,13 @@ /// The area definition. /// Thrown when or /// any of its children is not part of the drawn map features. - private Envelope CreateEnvelopeForAllVisibleLayers(MapDataCollection mapData) + private Envelope CreateEnvelopeForVisibleLayers(MapDataCollection mapData) { var envelope = new Envelope(); foreach (MapData childMapData in mapData.Collection) { - envelope.ExpandToInclude(CreateEnvelopeForAllVisibleLayers(childMapData)); + envelope.ExpandToInclude(CreateEnvelopeForVisibleLayers(childMapData)); } return envelope; @@ -629,9 +629,9 @@ zoomToRectangleToolStripButton.Checked = true; } - private void ZoomToAllVisibleLayersToolStripButtonClick(object sender, EventArgs e) + private void ZoomToVisibleLayersToolStripButtonClick(object sender, EventArgs e) { - ZoomToAllVisibleLayers(); + ZoomToVisibleLayers(); } private void ShowCoordinatesToolStripButtonClick(object sender, EventArgs e) Index: Core/Components/src/Core.Components.DotSpatial.Forms/Properties/Resources.Designer.cs =================================================================== diff -u -r6be1df7c0af906db03cea537cc4446aaef986277 -re25cbbd88e41c07ec5be2ba2f686f2e85e0f3706 --- Core/Components/src/Core.Components.DotSpatial.Forms/Properties/Resources.Designer.cs (.../Resources.Designer.cs) (revision 6be1df7c0af906db03cea537cc4446aaef986277) +++ Core/Components/src/Core.Components.DotSpatial.Forms/Properties/Resources.Designer.cs (.../Resources.Designer.cs) (revision e25cbbd88e41c07ec5be2ba2f686f2e85e0f3706) @@ -120,20 +120,20 @@ } /// - /// Looks up a localized string similar to Zoom naar alles. + /// Looks up a localized string similar to Zoom door rechthoek. /// - internal static string MapControl_ZoomToExtents { + internal static string MapControl_ZoomToRectangle { get { - return ResourceManager.GetString("MapControl_ZoomToExtents", resourceCulture); + return ResourceManager.GetString("MapControl_ZoomToRectangle", resourceCulture); } } /// - /// Looks up a localized string similar to Zoom door rechthoek. + /// Looks up a localized string similar to Zoom naar alles. /// - internal static string MapControl_ZoomToRectangle { + internal static string MapControl_ZoomToVisibleLayers { get { - return ResourceManager.GetString("MapControl_ZoomToRectangle", resourceCulture); + return ResourceManager.GetString("MapControl_ZoomToVisibleLayers", resourceCulture); } } } Index: Core/Components/src/Core.Components.DotSpatial.Forms/Properties/Resources.resx =================================================================== diff -u -r6be1df7c0af906db03cea537cc4446aaef986277 -re25cbbd88e41c07ec5be2ba2f686f2e85e0f3706 --- Core/Components/src/Core.Components.DotSpatial.Forms/Properties/Resources.resx (.../Resources.resx) (revision 6be1df7c0af906db03cea537cc4446aaef986277) +++ Core/Components/src/Core.Components.DotSpatial.Forms/Properties/Resources.resx (.../Resources.resx) (revision e25cbbd88e41c07ec5be2ba2f686f2e85e0f3706) @@ -130,7 +130,7 @@ Zoom door rechthoek - + Zoom naar alles Index: Core/Components/src/Core.Components.Gis.Forms/IMapControl.cs =================================================================== diff -u -r49c9348f8c59265a17290c1626e67bd62f7b0436 -re25cbbd88e41c07ec5be2ba2f686f2e85e0f3706 --- Core/Components/src/Core.Components.Gis.Forms/IMapControl.cs (.../IMapControl.cs) (revision 49c9348f8c59265a17290c1626e67bd62f7b0436) +++ Core/Components/src/Core.Components.Gis.Forms/IMapControl.cs (.../IMapControl.cs) (revision e25cbbd88e41c07ec5be2ba2f686f2e85e0f3706) @@ -42,14 +42,14 @@ /// /// Zooms to a level so that all visible layers are in view. /// - void ZoomToAllVisibleLayers(); + void ZoomToVisibleLayers(); /// /// Zooms to a level such that the given map data is in view. /// /// The data to zoom to. /// Thrown when /// is not part of . - void ZoomToAllVisibleLayers(MapData mapData); + void ZoomToVisibleLayers(MapData mapData); } } \ No newline at end of file Index: Core/Components/test/Core.Components.DotSpatial.Forms.Test/MapControlTest.cs =================================================================== diff -u -r87306d53439cff0049e2e65c618a2ac35c6e6f9d -re25cbbd88e41c07ec5be2ba2f686f2e85e0f3706 --- Core/Components/test/Core.Components.DotSpatial.Forms.Test/MapControlTest.cs (.../MapControlTest.cs) (revision 87306d53439cff0049e2e65c618a2ac35c6e6f9d) +++ Core/Components/test/Core.Components.DotSpatial.Forms.Test/MapControlTest.cs (.../MapControlTest.cs) (revision e25cbbd88e41c07ec5be2ba2f686f2e85e0f3706) @@ -2254,11 +2254,11 @@ #endregion - #region ZoomToAllVisibleLayers + #region ZoomToVisibleLayers [Test] [Apartment(ApartmentState.STA)] - public void ZoomToAllVisibleLayers_MapInFormWithEmptyDataSet_ViewNotInvalidatedLayersSame() + public void ZoomToVisibleLayers_MapInFormWithEmptyDataSet_ViewNotInvalidatedLayersSame() { // Setup using (var mapControl = new MapControl()) @@ -2277,7 +2277,7 @@ Assert.AreEqual(0, invalidated, "Precondition failed: map.Invalidated > 0"); // Call - mapControl.ZoomToAllVisibleLayers(); + mapControl.ZoomToVisibleLayers(); // Assert Assert.AreEqual(0, invalidated); @@ -2288,7 +2288,7 @@ [Test] [Apartment(ApartmentState.STA)] - public void ZoomToAllVisibleLayers_MapInForm_ViewInvalidatedLayersSame() + public void ZoomToVisibleLayers_MapInForm_ViewInvalidatedLayersSame() { // Setup using (var form = new Form()) @@ -2328,7 +2328,7 @@ map.Invalidated += (sender, args) => invalidated++; // Call - mapControl.ZoomToAllVisibleLayers(); + mapControl.ZoomToVisibleLayers(); // Assert Assert.AreEqual(2, invalidated); @@ -2341,7 +2341,7 @@ } [Test] - public void ZoomToAllVisibleLayers_NotAllLayersVisible_ZoomToVisibleLayersExtent() + public void ZoomToVisibleLayers_NotAllLayersVisible_ZoomToVisibleLayersExtent() { // Setup using (MapControl mapControl = CreateMapControlWithDimensionlessMap()) @@ -2358,7 +2358,7 @@ Assert.IsFalse(map.Layers.All(l => l.IsVisible), "Precondition failed: not all map layers should be visible."); // Call - mapControl.ZoomToAllVisibleLayers(); + mapControl.ZoomToVisibleLayers(); // Assert Assert.AreNotEqual(map.GetMaxExtent(), map.ViewExtents); @@ -2368,7 +2368,7 @@ [Test] [Apartment(ApartmentState.STA)] - public void ZoomToAllVisibleLayers_WithNonChildMapData_ThrowArgumentException() + public void ZoomToVisibleLayers_WithNonChildMapData_ThrowArgumentException() { // Setup var mapDataCollection = new MapDataCollection("Collection"); @@ -2380,7 +2380,7 @@ var mapData = new MapPointData("Test data"); // Call - void Call() => mapControl.ZoomToAllVisibleLayers(mapData); + void Call() => mapControl.ZoomToVisibleLayers(mapData); // Assert const string message = "Can only zoom to MapData that is part of this MapControls drawn mapData."; @@ -2391,7 +2391,7 @@ [Test] [Apartment(ApartmentState.STA)] - public void ZoomToAllVisibleLayers_MapInFormWithEmptyDataSetAndForChildMapData_ViewNotInvalidatedLayersSame() + public void ZoomToVisibleLayers_MapInFormWithEmptyDataSetAndForChildMapData_ViewNotInvalidatedLayersSame() { // Setup using (var mapControl = new MapControl()) @@ -2410,7 +2410,7 @@ Assert.AreEqual(0, invalidated, "Precondition failed: map.Invalidated > 0"); // Call - mapControl.ZoomToAllVisibleLayers(mapData); + mapControl.ZoomToVisibleLayers(mapData); // Assert Assert.AreEqual(0, invalidated); @@ -2421,7 +2421,7 @@ [Test] [Apartment(ApartmentState.STA)] - public void ZoomToAllVisibleLayers_MapInFormForChildMapData_ViewInvalidatedLayersSame() + public void ZoomToVisibleLayers_MapInFormForChildMapData_ViewInvalidatedLayersSame() { // Setup using (var form = new Form()) @@ -2461,7 +2461,7 @@ map.Invalidated += (sender, args) => invalidated++; // Call - mapControl.ZoomToAllVisibleLayers(mapData); + mapControl.ZoomToVisibleLayers(mapData); // Assert Assert.AreEqual(2, invalidated); @@ -2474,7 +2474,7 @@ } [Test] - public void ZoomToAllVisibleLayers_ForVisibleChildMapData_ZoomToVisibleLayerExtent() + public void ZoomToVisibleLayers_ForVisibleChildMapData_ZoomToVisibleLayerExtent() { // Setup using (MapControl mapControl = CreateMapControlWithDimensionlessMap()) @@ -2492,7 +2492,7 @@ Assert.IsTrue(mapData.IsVisible); // Call - mapControl.ZoomToAllVisibleLayers(mapData); + mapControl.ZoomToVisibleLayers(mapData); // Assert Assert.AreNotEqual(map.GetMaxExtent(), map.ViewExtents); @@ -2501,7 +2501,7 @@ } [Test] - public void ZoomToAllVisibleLayers_ForInvisibleChildMapData_DoNotChangeViewExtentsOfMap() + public void ZoomToVisibleLayers_ForInvisibleChildMapData_DoNotChangeViewExtentsOfMap() { // Setup using (var mapControl = new MapControl()) @@ -2521,7 +2521,7 @@ var originalViewExtents = (Extent) map.ViewExtents.Clone(); // Call - mapControl.ZoomToAllVisibleLayers(mapData); + mapControl.ZoomToVisibleLayers(mapData); // Assert Assert.AreNotEqual(unexpectedExtent, map.ViewExtents, @@ -2536,7 +2536,7 @@ [TestCase(1.0, 5.0)] [TestCase(double.MaxValue * 0.96, double.MaxValue * 0.96)] [TestCase(double.MaxValue, double.MaxValue)] - public void ZoomToAllVisibleLayers_ForMapDataOfVariousDimensions_ZoomToVisibleLayerExtent(double xMax, double yMax) + public void ZoomToVisibleLayers_ForMapDataOfVariousDimensions_ZoomToVisibleLayerExtent(double xMax, double yMax) { // Setup using (MapControl mapControl = CreateMapControlWithDimensionlessMap()) @@ -2569,7 +2569,7 @@ ExtendWithExpectedMargin(expectedExtent); // Call - mapControl.ZoomToAllVisibleLayers(mapData); + mapControl.ZoomToVisibleLayers(mapData); // Assert if (double.IsInfinity(expectedExtent.Height) || double.IsInfinity(expectedExtent.Width)) Index: Core/Gui/src/Core.Gui/Forms/MainWindow/MainWindow.xaml.cs =================================================================== diff -u -r8579bcc787ce677afba506cc6b701885bae20e78 -re25cbbd88e41c07ec5be2ba2f686f2e85e0f3706 --- Core/Gui/src/Core.Gui/Forms/MainWindow/MainWindow.xaml.cs (.../MainWindow.xaml.cs) (revision 8579bcc787ce677afba506cc6b701885bae20e78) +++ Core/Gui/src/Core.Gui/Forms/MainWindow/MainWindow.xaml.cs (.../MainWindow.xaml.cs) (revision e25cbbd88e41c07ec5be2ba2f686f2e85e0f3706) @@ -512,7 +512,7 @@ { if (e.View is IMapView mapView) { - mapView.Map.ZoomToAllVisibleLayers(); + mapView.Map.ZoomToVisibleLayers(); UpdateComponentsForMapView(mapView); } } Index: Core/Gui/src/Core.Gui/Forms/Map/MapLegendView.cs =================================================================== diff -u -r5288fa7ed81fdc72e84a7dafa72bbd674fbee08a -re25cbbd88e41c07ec5be2ba2f686f2e85e0f3706 --- Core/Gui/src/Core.Gui/Forms/Map/MapLegendView.cs (.../MapLegendView.cs) (revision 5288fa7ed81fdc72e84a7dafa72bbd674fbee08a) +++ Core/Gui/src/Core.Gui/Forms/Map/MapLegendView.cs (.../MapLegendView.cs) (revision e25cbbd88e41c07ec5be2ba2f686f2e85e0f3706) @@ -214,7 +214,7 @@ return new StrictContextMenuItem($"&{GuiResources.MapLegendView_CreateZoomToExtentsItem_ZoomToAll_DisplayName}", toolTip, GuiResources.ZoomToAllIcon, - (sender, args) => MapControl?.ZoomToAllVisibleLayers(nodeData)) + (sender, args) => MapControl?.ZoomToVisibleLayers(nodeData)) { Enabled = isEnabled }; Index: Core/Gui/test/Core.Gui.Test/Forms/Map/FeatureBasedMapDataContextTreeNodeInfoTest.cs =================================================================== diff -u -raf6538ce2677998cbc514db20c2756c9dd2eac6f -re25cbbd88e41c07ec5be2ba2f686f2e85e0f3706 --- Core/Gui/test/Core.Gui.Test/Forms/Map/FeatureBasedMapDataContextTreeNodeInfoTest.cs (.../FeatureBasedMapDataContextTreeNodeInfoTest.cs) (revision af6538ce2677998cbc514db20c2756c9dd2eac6f) +++ Core/Gui/test/Core.Gui.Test/Forms/Map/FeatureBasedMapDataContextTreeNodeInfoTest.cs (.../FeatureBasedMapDataContextTreeNodeInfoTest.cs) (revision e25cbbd88e41c07ec5be2ba2f686f2e85e0f3706) @@ -434,7 +434,7 @@ contextMenuBuilderProvider.Expect(p => p.Get(null, null)).IgnoreArguments().Return(builder); var mapControl = mocks.StrictMock(); mapControl.Expect(c => c.Data).Return(new MapDataCollection("name")); - mapControl.Expect(c => c.ZoomToAllVisibleLayers(mapData)); + mapControl.Expect(c => c.ZoomToVisibleLayers(mapData)); mocks.ReplayAll(); mapLegendView.MapControl = mapControl; Index: Core/Gui/test/Core.Gui.Test/Forms/Map/MapDataCollectionContextTreeNodeInfoTest.cs =================================================================== diff -u -raf6538ce2677998cbc514db20c2756c9dd2eac6f -re25cbbd88e41c07ec5be2ba2f686f2e85e0f3706 --- Core/Gui/test/Core.Gui.Test/Forms/Map/MapDataCollectionContextTreeNodeInfoTest.cs (.../MapDataCollectionContextTreeNodeInfoTest.cs) (revision af6538ce2677998cbc514db20c2756c9dd2eac6f) +++ Core/Gui/test/Core.Gui.Test/Forms/Map/MapDataCollectionContextTreeNodeInfoTest.cs (.../MapDataCollectionContextTreeNodeInfoTest.cs) (revision e25cbbd88e41c07ec5be2ba2f686f2e85e0f3706) @@ -674,7 +674,7 @@ contextMenuBuilderProvider.Stub(p => p.Get(null, null)).IgnoreArguments().Return(builder); var mapControl = mocks.StrictMock(); mapControl.Expect(c => c.Data).Return(mapData); - mapControl.Expect(c => c.ZoomToAllVisibleLayers(mapData)); + mapControl.Expect(c => c.ZoomToVisibleLayers(mapData)); mocks.ReplayAll(); mapLegendView.MapControl = mapControl;