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); }
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); }
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); }
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); }