I've got a map loaded into my program (using Visual C# 2010, and gMapControl). I can draw lines on the map (YAY). I'm using:
Any direction would be appreciated.
AW
private void gMapControl1_Paint(object sender, PaintEventArgs e)
{
e.Graphics.SmoothingMode = System.Drawing.Drawing2D.SmoothingMode.AntiAlias;
Pen fl = new Pen(Color.Red, 3.0f);
e.Graphics.DrawLine(fl, x_start, y_start, xx, yy);
}
Where x_start and y_start is the left mouseDown, and xx, yy is the current position, as below: private void gMapControl1_MouseDown(object sender, MouseEventArgs e)
{
if (e.Button == MouseButtons.Left)
{
mouseDown = 1;
Point pmousePos = new Point(e.X, e.Y);
x_start = e.X;
y_start = e.Y;
}
}
My problem is that when I pan the map, or zoom the map, my drawn lines stay in the same place on the screen; they're not "tied to the ground (map").Any direction would be appreciated.
AW