コード例 #1
0
        public Image GetImageAndDrawMyLocation(double latitude, double longitude)
        {
            PixelPoint mypoint = util.GetCordinateOnStaticImage(latitude, longitude, this.m_latitude, this.m_longitude, this.m_zoom, this.m_width, this.m_height);
            Bitmap     bmp;

            if (this.m_Image != null)
            {
                bmp = new Bitmap(this.m_Image);
            }
            else
            {
                bmp = new Bitmap((int)this.m_width, (int)this.m_height);
            }

            Graphics g = Graphics.FromImage(bmp);

            //g.DrawEllipse(new Pen(Color.Blue, 5), (int)((float)mypoint.x - 3), (int)((float)mypoint.y) - 3, 7, 7);
            DrawMarker(g, new LatLng(latitude, latitude), Color.Blue);
            return(bmp);
        }
コード例 #2
0
        public Image GetImageAndDrawMyLocationNPolyLineNTurn(double latitude, double longitude, List <LatLng> PolyLine, List <DirectionStep> steps, ref PixelPoint CurLoc, ref Size ImageSize)
        {
            PixelPoint mypoint = GetPointOnMe(new LatLng(latitude, longitude));

            CurLoc    = mypoint;
            ImageSize = new Size((int)this.m_width, (int)this.m_height);
            Bitmap bmp;

            if (this.m_Image != null)
            {
                bmp = new Bitmap(this.m_Image);
            }
            else
            {
                bmp = new Bitmap((int)this.m_width, (int)this.m_height);
            }

            Graphics g = Graphics.FromImage(bmp);

            DrawMarker(g, new LatLng(latitude, longitude), Color.Blue);

            DrawPolyLine(g, PolyLine);

            foreach (DirectionStep d in steps)
            {
                this.DrawMarker(g, d.step_Location, Color.Red);
            }

            return(bmp);
        }
コード例 #3
0
        public void DrawMyLocation_PolyLine_Turns(Graphics g, LatLng CurLocation, List <LatLng> PolyLine, List <DirectionStep> steps, ref PixelPoint CurLoc, ref Size ImageSize)
        {
            PixelPoint mypoint = GetPointOnMe(CurLocation);

            CurLoc    = mypoint;
            ImageSize = new Size((int)this.m_width, (int)this.m_height);
            if (this.m_Image != null)
            {
                g.DrawImage(this.m_Image, 0, 0);
            }
            DrawPolyLine(g, PolyLine);

            foreach (DirectionStep d in steps)
            {
                this.DrawMarker(g, d.step_Location, Color.Red);
            }
            DrawMarker(g, CurLocation, Color.Blue);
        }
コード例 #4
0
        public PixelPoint GetPointOnMe(LatLng Loc)
        {
            PixelPoint mypoint = util.GetCordinateOnStaticImage(Loc.Lat, Loc.Lng, this.m_latitude, this.m_longitude, this.m_zoom, this.m_width, this.m_height);

            return(mypoint);
        }