Ejemplo n.º 1
0
        public override void Render()
        {
            MapHelper mapHelper = MapHelper.Instance();


            string tooltip = "Date: " + this.Datetimestamp.ToString() + "\n" + this.Text;

            mapHelper.AddMarker("facebook", new Bitmap(Properties.Resources.facebook), this.Location, tooltip, this);
        }
Ejemplo n.º 2
0
        public override void Render()
        {
            List <XMLTracklogLoader.Track> tracks = XMLTracklogLoader.GetTracks(this.Filepath);
            MapHelper mapHelper = MapHelper.Instance();

            List <PointLatLng> points = new List <PointLatLng>();
            string             name   = null;
            int indexCount            = 0;

            foreach (var track in tracks)
            {
                foreach (var point in track.Segments)
                {
                    points.Add(new PointLatLng(point.Coordinates.Latitude, point.Coordinates.Longitude));
                    if (indexCount != 0 && indexCount != track.Segments.Count - 1)
                    {
                        mapHelper.AddMarker("tracklogPoints", new Bitmap(20, 20), point.Coordinates, "Date: " + point.Date + "\n" + "elevation: " + point.Elevation, this);
                    }
                    indexCount++;
                }
                name = track.Name;
                mapHelper.AddRoute("tracklog", points);
            }

            //used to resize the bitmap
            Bitmap start = new Bitmap(Properties.Resources.start);
            Bitmap end   = new Bitmap(Properties.Resources.end);
            int    size  = 20;

            mapHelper.AddMarker("tracklog", new Bitmap(end, size, size), new Coordinates(points[0].Lat, points[0].Lng), "Date: " + this.Datetimestamp.ToString() + "\nTrack start\n" + name, this);
            mapHelper.AddMarker("tracklog", new Bitmap(start, size, size), new Coordinates(points[points.Count - 1].Lat, points[points.Count - 1].Lng), "Track end\n" + name, this);
            List <XMLTracklogLoader.WayPoints> waypoints = XMLTracklogLoader.GetWaypoints(this.Filepath);
            List <PointLatLng> waypoint = new List <PointLatLng>();

            Bitmap wpimage = new Bitmap(Properties.Resources.waypoint);

            foreach (var point in waypoints)
            {
                mapHelper.AddMarker("waypoints", new Bitmap(wpimage, size, size), point.Coordinates, "Track " + name + " Waypoint\n" + point.Name, this);
            }
        }
Ejemplo n.º 3
0
        public override void Render()
        {
            Bitmap thumb = null;
            int    size  = 52;

            try
            {
                Stream thumbJpegStream = new MemoryStream();
                var    ffMpeg          = new NReco.VideoConverter.FFMpegConverter();
                ffMpeg.GetVideoThumbnail(this.Filepath, thumbJpegStream, 1);
                thumb = new Bitmap(thumbJpegStream);
            }
            catch (ArgumentException)
            {
                thumb = new Bitmap(Properties.Resources.error);
            }

            MapHelper mh = MapHelper.Instance();

            mh.AddMarker("video", new Bitmap(thumb, size, size), this.Location, "Date: " + this.Datetimestamp.ToString() + "\nVideo", this);
        }
Ejemplo n.º 4
0
        public override void Render()
        {
            MapHelper mh = MapHelper.Instance();
            string    iconPath;

            iconPath = this.Filepath;
            int    size  = 52;
            Bitmap thumb = null;

            try
            {
                thumb = new Bitmap(iconPath);
            }
            catch (ArgumentException)
            {
                //Have error image here

                thumb = new Bitmap(Properties.Resources.error);
            }

            mh.AddMarker("photo", new Bitmap(thumb, size, size), this.Location, "Date: " + this.Datetimestamp.ToString() + "\nPhoto", this);
        }
Ejemplo n.º 5
0
        public override void Render()
        {
            MapHelper mh = MapHelper.Instance();

            mh.AddMarker("twitter", new Bitmap(Properties.Resources.twitter), this.Location, "Date: " + this.Datetimestamp.ToString() + "\n" + this.Text, this);
        }