//----------------------------------------------------------------- public IEnumerable <CMoveablePoint> GetMoveablePoints(CMapDatabase database) { List <CMoveablePoint> lstPoints = new List <CMoveablePoint>(); CGPSLineTrace trace = DetailLigne; lstPoints.Add(new CMoveablePointForLineStart(database, this)); foreach (CGPSLineSegment segment in trace.Segments) { lstPoints.Add(new CMoveablePointForLineSegment(database, this, segment)); } return(lstPoints.AsReadOnly()); }
//--------------------------------------------------------------------------- public IEnumerable <IMapItem> FindMapItems(CMapDatabase database) { CGPSLineTrace trace = DetailLigne; List <IMapItem> lstPaths = new List <IMapItem>(); foreach (CGPSLineSegment segment in trace.Segments) { CMapItemPath path = database.FindItemFromTag(segment) as CMapItemPath; if (path != null) { lstPaths.Add(path); } } return(lstPaths.AsReadOnly()); }
public IEnumerable <IMapItem> CreateMapItems(CMapLayer layer) { List <IMapItem> lstItems = new List <IMapItem>(); CGPSLineTrace trace = DetailLigne; SLatLong lastPoint = trace.PointDepart; foreach (CGPSLineSegment segment in trace.Segments) { CMapItemPath path = new CMapItemPath(layer); path.Points = new SLatLong[] { lastPoint, segment.PointDestination }; path.LineColor = segment.Couleur; path.LineWidth = segment.Width; path.Tag = segment; path.ToolTip = segment.Libelle; path.EnableClick = true; lstItems.Add(path); lastPoint = segment.PointDestination; } return(lstItems.AsReadOnly()); }
//--------------------------------------------------------------------------- public IEnumerable <IMapItem> UpdateMapItems(CMapDatabase database, List <IMapItem> itemsToDelete) { CGPSLineTrace trace = DetailLigne; SLatLong lastPoint = trace.PointDepart; List <IMapItem> lstPaths = new List <IMapItem>(); foreach (CGPSLineSegment segment in trace.Segments) { CMapItemPath path = database.FindItemFromTag(segment) as CMapItemPath; if (path != null) { path.Points = new SLatLong[] { lastPoint, segment.PointDestination }; path.LineColor = segment.Couleur; path.LineWidth = segment.Width; path.Tag = segment; path.ToolTip = segment.Libelle; lstPaths.Add(path); lastPoint = segment.PointDestination; } } return(lstPaths.AsReadOnly()); }
//------------------------------------------------------- public CGPSLineSegment(CGPSLineTrace trace) { m_trace = trace; }