Index: Ringtoets/Integration/src/Ringtoets.Integration.Forms/Views/AssessmentSectionView.Designer.cs =================================================================== diff -u -rfea3ed82dfb6dfcad535eef16efcbaa9c01564ed -r2dfdafcd7e386a80d5e4aa0b0e63649506c3f9e4 --- Ringtoets/Integration/src/Ringtoets.Integration.Forms/Views/AssessmentSectionView.Designer.cs (.../AssessmentSectionView.Designer.cs) (revision fea3ed82dfb6dfcad535eef16efcbaa9c01564ed) +++ Ringtoets/Integration/src/Ringtoets.Integration.Forms/Views/AssessmentSectionView.Designer.cs (.../AssessmentSectionView.Designer.cs) (revision 2dfdafcd7e386a80d5e4aa0b0e63649506c3f9e4) @@ -36,10 +36,29 @@ /// private void InitializeComponent() { - components = new System.ComponentModel.Container(); + this.mapControl = new Core.Components.DotSpatial.Forms.MapControl(); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + // + // MapView + // + this.mapControl.Dock = System.Windows.Forms.DockStyle.Fill; + this.mapControl.Location = new System.Drawing.Point(0, 0); + this.mapControl.Name = "mapControl"; + this.mapControl.Size = new System.Drawing.Size(150, 150); + this.mapControl.TabIndex = 0; + this.mapControl.Text = "mapControl1"; + // + // AssessmentSectionView + // + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.Controls.Add(this.mapControl); + this.Name = "AssessmentSectionView"; + this.ResumeLayout(false); } #endregion + + private Core.Components.DotSpatial.Forms.MapControl mapControl; } } Index: Ringtoets/Integration/src/Ringtoets.Integration.Forms/Views/AssessmentSectionView.cs =================================================================== diff -u -rb5a7b175812498962303c1ce9bb55fd8b4bff18d -r2dfdafcd7e386a80d5e4aa0b0e63649506c3f9e4 --- Ringtoets/Integration/src/Ringtoets.Integration.Forms/Views/AssessmentSectionView.cs (.../AssessmentSectionView.cs) (revision b5a7b175812498962303c1ce9bb55fd8b4bff18d) +++ Ringtoets/Integration/src/Ringtoets.Integration.Forms/Views/AssessmentSectionView.cs (.../AssessmentSectionView.cs) (revision 2dfdafcd7e386a80d5e4aa0b0e63649506c3f9e4) @@ -21,11 +21,11 @@ using System.Windows.Forms; using Core.Common.Base; -using Core.Components.DotSpatial.Forms; using Core.Components.Gis.Data; using Core.Components.Gis.Forms; using Ringtoets.Common.Data.AssessmentSection; using Ringtoets.Common.Forms.Views; +using Ringtoets.HydraRing.Data; using Ringtoets.Integration.Forms.Properties; using RingtoetsCommonDataResources = Ringtoets.Common.Data.Properties.Resources; @@ -38,8 +38,6 @@ { private readonly Observer assessmentSectionObserver; - private readonly MapControl mapControl; - private readonly MapLineData referenceLineMapData; private readonly MapPointData hydraulicBoundaryDatabaseMapData; @@ -54,13 +52,6 @@ assessmentSectionObserver = new Observer(UpdateMapData); - mapControl = new MapControl - { - Dock = DockStyle.Fill - }; - - Controls.Add(mapControl); - referenceLineMapData = RingtoetsMapDataFactory.CreateReferenceLineMapData(); hydraulicBoundaryDatabaseMapData = RingtoetsMapDataFactory.CreateHydraulicBoundaryDatabaseMapData(); @@ -114,13 +105,18 @@ private void UpdateMapData() { - referenceLineMapData.Features = RingtoetsMapDataFeaturesFactory.CreateReferenceLineFeatures(data != null - ? data.ReferenceLine - : null); - hydraulicBoundaryDatabaseMapData.Features = RingtoetsMapDataFeaturesFactory.CreateHydraulicBoundaryDatabaseFeaturesWithDefaultLabels(data != null - ? data.HydraulicBoundaryDatabase - : null); + ReferenceLine referenceLine = null; + HydraulicBoundaryDatabase hydraulicBoundaryDatabase = null; + if (data != null) + { + referenceLine = data.ReferenceLine; + hydraulicBoundaryDatabase = data.HydraulicBoundaryDatabase; + } + + referenceLineMapData.Features = RingtoetsMapDataFeaturesFactory.CreateReferenceLineFeatures(referenceLine); + hydraulicBoundaryDatabaseMapData.Features = RingtoetsMapDataFeaturesFactory.CreateHydraulicBoundaryDatabaseFeaturesWithDefaultLabels(hydraulicBoundaryDatabase); + mapControl.Data.NotifyObservers(); } }