Example #1
0
        //-----------------------------------------------------------------
        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());
        }
Example #2
0
        //---------------------------------------------------------------------------
        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());
        }
Example #3
0
        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());
        }
Example #4
0
        //---------------------------------------------------------------------------
        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());
        }
Example #5
0
 //-------------------------------------------------------
 public CGPSLineSegment(CGPSLineTrace trace)
 {
     m_trace = trace;
 }