This project has moved. For the latest updates, please go here.

Point Color Problem

Topics: SharpMap v0.9 / v1.x
Aug 2, 2010 at 4:05 PM


I'm trying to show a point on map using sharpmap.geometries but the point is shown in red and i can't change the color.

here is the code :


            SharpMap.Geometries.Point point = new SharpMap.Geometries.Point(latitude, longtitude);
            SharpMap.Data.Providers.GeometryProvider provider = new SharpMap.Data.Providers.GeometryProvider(point);
            SharpMap.Layers.VectorLayer layer = new SharpMap.Layers.VectorLayer("point", provider);

            layer.Enabled = true;
            layer.MinVisible = double.Epsilon;
            layer.Style.Enabled = true;
            layer.Style.Fill = new SolidBrush(Color.Blue);

            layer.Style.EnableOutline = true;
            layer.Style.Outline = new Pen(Color.Yellow);

            layer.Style.MaxVisible = 200;

            //--> add layer and refresh

and here is the picture of the point :

how can i change the color ?


Aug 3, 2010 at 10:17 AM
Hi noyfound you need to change the Symbol property not the fill for Points, assign it to a bitmap of your choice.. cheers jd
Aug 3, 2010 at 11:41 AM


i used layer.Style.Symbol and it works.

Aug 16, 2013 at 2:38 PM
Hi noyfound,

Could I ask how do you do that? I have same problem like you.
Aug 18, 2013 at 6:56 PM
Have a look at this example of the Example code snipplets.
There is lots of demonstration code in
  • ExampleCodeSnipplets and
  • WinFormSamples
projects to help you show your way around.