Hello,
I have built the example outlined in the SharpMap tutorial and have it running in my project. All I need for it to do is to center on ( and eventually place a marker on ) a set of user input geodetic coordinates ( WGS 84 coordinate system ). This seems
to me like it should be an extremely simple task, but so far I have been unable to find it here. I am able to move the map to any position and zoom using the:
mapBox1.Map.Center.X = ####;
mapBox1.Map.Center.Y = ####;
So I figured all I needed to do was find a method that converted my latitude and longitude to image coordinates. Like this one outlined in the How To secion, "Transforming between image coordinates and world coordinates."
ma
System.Drawing.PointF
p = mapBox1.Map.WorldToImage(new
SharpMap.Geometries.Point(30,
95));
Where
I input my geodetic coordinates expected to get image coordinates to put back into here:
mapBox1.Map.Center.X
= p.X;
mapBox1.Map.Center.Y
= p.Y;
But the point p comes out equalling (0,0), so I have to assume for now that it is a little more complicated than this? If anyone could push me in the right direction it would be helpful,
Thanks
