This project has moved and is read-only. For the latest updates, please go here.

Dot point doesn't display in expected position

Topics: SharpMap v0.9 / v1.x
Oct 2, 2009 at 7:19 AM



I'd like to dot a point on my map.
Coordinates (XY image positions, XY World positions, LatLon projected positions) are correct when I display them.

I used this code to do this :

   SharpMap.Layers.VectorLayer Layer = new SharpMap.Layers.VectorLayer("Test");
   SharpMap.Geometries.Point Pt = new SharpMap.Geometries.Point(0, 43);
   Layer.DataSource = new SharpMap.Data.Providers.GeometryProvider( Pt );
   Layer.Enabled = true;


Whatever the point coordinates (X, Y below), it always appears at the same position on the map. When Map is panned, point is moved too correctly.

SharpMap.Geometries.Point(X, Y);

1/ What are X, Y units here ?
2/ Do I need to specify projections in the layer ? If I do : how ?

Please, what I have forgotten to add this point to my map to the correct positions ?



Oct 2, 2009 at 10:33 AM

X and Y are in World units (found by tests).

Sorry to have asked, but when values are very wrong, point is dotted in the middle of the map whatever the coordinate values...


Here is a link of point code :