/// <summary> /// 显示理论路线 /// </summary> /// <param name="routeName"></param> private void LoadRoute(string routeName) { if (m_routeRoad == null) { string fileName = System.IO.Directory.GetCurrentDirectory() + "\\" + MapHelper.ShpFile4Road; if (System.IO.File.Exists(fileName)) { m_routeRoad = this.m_MainMap.AddSharpMarker(fileName); m_routeRoad.Layer.Style.Line = new System.Drawing.Pen(System.Drawing.Color.Blue, 2f); m_routeRoad.Layer.Style.Line.DashStyle = System.Drawing.Drawing2D.DashStyle.Dash; } } else { m_routeRoad.Clear(); } if (m_routeSite == null) { string fileName = System.IO.Directory.GetCurrentDirectory() + "\\" + MapHelper.ShpFile4Site; if (System.IO.File.Exists(fileName)) { m_routeSite = this.m_MainMap.AddSharpMarker(fileName); m_routeSite.Layer.Style.Fill = new System.Drawing.SolidBrush(System.Drawing.Color.Green); m_routeSite.Layer.Style.Line = new System.Drawing.Pen(System.Drawing.Color.Green, 2f); m_routeSite.Layer.Style.Line.DashStyle = System.Drawing.Drawing2D.DashStyle.Dash; } } else { m_routeSite.Clear(); } Route route = RouteDao.GetRoute(routeName); if (m_routeRoad != null && route != null && tsm显示理论路径.Checked) { if (!string.IsNullOrEmpty(route.DirectionReal)) { m_routeRoad.ShowFeature(new Predicate <DataRow>(p => { return(Feng.Utils.RouteHelper.IsInRoute(route.DirectionReal, p[MapHelper.AddrColumnName].ToString())); })); } } if (m_routeSite != null && tsm显示重要地点.Checked) { m_routeSite.ShowFeature(); //m_routeSite.ShowFeature(new Predicate<DataRow>(p => Array.IndexOf<string>(ss, p[MapHelper.AddrColumnName].ToString()) != -1)); } }
/// <summary> /// 显示理论路线 /// </summary> /// <param name="routeName"></param> private void LoadRoute(string routeName) { if (m_routeRoad == null) { string fileName = System.IO.Directory.GetCurrentDirectory() + "\\" + MapHelper.ShpFile4Road; if (System.IO.File.Exists(fileName)) { m_routeRoad = this.m_MainMap.AddSharpMarker(fileName); m_routeRoad.Layer.Style.Line = new System.Drawing.Pen(System.Drawing.Color.Blue, 2f); m_routeRoad.Layer.Style.Line.DashStyle = System.Drawing.Drawing2D.DashStyle.Dash; } } else { m_routeRoad.Clear(); } if (m_routeSite == null) { string fileName = System.IO.Directory.GetCurrentDirectory() + "\\" + MapHelper.ShpFile4Site; if (System.IO.File.Exists(fileName)) { m_routeSite = this.m_MainMap.AddSharpMarker(fileName); m_routeSite.Layer.Style.Fill = new System.Drawing.SolidBrush(System.Drawing.Color.Green); m_routeSite.Layer.Style.Line = new System.Drawing.Pen(System.Drawing.Color.Green, 2f); m_routeSite.Layer.Style.Line.DashStyle = System.Drawing.Drawing2D.DashStyle.Dash; } } else { m_routeSite.Clear(); } Route route = RouteDao.GetRoute(routeName); if (m_routeRoad != null && route != null && tsm显示理论路径.Checked) { if (!string.IsNullOrEmpty(route.DirectionReal)) { m_routeRoad.ShowFeature(new Predicate<DataRow>(p => { return Feng.Utils.RouteHelper.IsInRoute(route.DirectionReal, p[MapHelper.AddrColumnName].ToString()); })); } } if (m_routeSite != null && tsm显示重要地点.Checked) { m_routeSite.ShowFeature(); //m_routeSite.ShowFeature(new Predicate<DataRow>(p => Array.IndexOf<string>(ss, p[MapHelper.AddrColumnName].ToString()) != -1)); } }