How to add trasparency to the layers ???

Feb 23, 2010 at 12:50 PM

Hi,

I want to add transparency to some layers I added from postGIS in SharpMap.

Can any body help me?????

Feb 23, 2010 at 1:04 PM

Here's how I set up a semi-transparent layer.

That color method has a transparency parm.

        // Set up Plate Layer
        SharpMap.Layers.VectorLayer PlateLayer = new SharpMap.Layers.VectorLayer("PlateLayer");        
        PlateLayer.DataSource = new SharpMap.Data.Providers.ShapeFile(LayerPath + Region + "_plates.shp", false);
        Color c = Color.FromArgb(30, 100, 100, 100);
        Brush b = new SolidBrush(c);
        PlateLayer.Style.Fill = b;
        PlateLayer.Style.Outline = new Pen(Color.LightGray, 1);
        PlateLayer.Style.EnableOutline = true;
        MainMap.Layers.Add(PlateLayer);

 

Feb 23, 2010 at 4:26 PM

THANKS FrankR It works great .