He,
I want to draw a Countrymap in C# with LAT/LNG coordinates. I have to translate the lat/lng to pixels, what would be the best way? I can draw the 'Map' but it's very small and it's not in the center of the window.
Can someone help? I have this code:
void draw(Graphics g, PointF[] points, Pen p)
{
Graphics gfx = g;
gfx.PageUnit = GraphicsUnit.Point;
GraphicsPath gpath = new GraphicsPath();
gpath.StartFigure();
gpath.AddLines(points);
gpath.CloseFigure();
Matrix m = new Matrix();
m.Scale(5, 5);
gfx.Transform = m;
gfx.DrawPath(p, gpath);
gfx.Dispose();
gpath.Dispose();
return;
}