private ContourMap CreateContourMap() { ContourMap contour = new ContourMap(m_sceneControl.Scene); contour.Interval = m_countourLineInterval; contour.Opacity = m_opacity; contour.LineColor = m_contourLineColor; contour.BorderVisible = m_bShowBorer; contour.BorderColor = m_BorderColor; //设置等高线颜色表 ColorDictionary colorDict = new ColorDictionary(); /////////////////////////////////////////////////////////////// ///////北京地形//////////////////////// colorDict[0] = Color.Blue; colorDict[800] = Color.Green; colorDict[1500] = Color.Red; contour.ColorDictTable = colorDict; contour.MaxVisibleAltitude = m_maxVisibleAlt; contour.MinVisibleAltitude = m_minVisibleAlt; contour.DisplayStyle = m_fillMode; contour.Build(); return(contour); }
private void btn_DrawAnalystRange_Click(object sender, EventArgs e) { if (m_timer != null && m_timer.Enabled) { m_timer.Enabled = false; m_timer.Stop(); } if (m_contour == null) { m_contour = new ContourMap(m_sceneControl.Scene); m_contour.DisplayStyle = ContourMap.DisplayMode.Face; m_contour.Opacity = 50; m_contour.BorderVisible = true; //设置等高线颜色表 ColorDictionary colorDict = new ColorDictionary(); colorDict[0] = Color.FromArgb(36, 65, 171); colorDict[100] = Color.FromArgb(80, 107, 191); colorDict[500] = Color.FromArgb(124, 149, 210); colorDict[800] = Color.FromArgb(168, 191, 230); colorDict[1200] = Color.FromArgb(212, 233, 250); m_contour.ColorDictTable = colorDict; } m_contour.MinVisibleAltitude = m_minVisibleAltidute; m_contour.MaxVisibleAltitude = m_minVisibleAltidute + 5; this.RegisterEvents(false); this.RegisterEvents(true); m_oldAction = m_sceneControl.Action; m_sceneControl.Action = SuperMap.UI.Action3D.CreateLine; m_contour.Build(); m_contour.BorderColor = Color.Blue; this.btn_StartAnalysis.Enabled = true; this.btn_Clear.Enabled = true; }