用SharpMap编程的Gis.最后一层涵盖其他层

Kho*_* Le 2 c# shapefile sharpmap

我刚刚开始使用GIS编程.我想建立一个带有地图的简单网站.所以,我选择C#和SharpMap作为地图库.一切正常,直到我从形状文件添加许多图层.我添加的最后一层是我看到的唯一一层.这是我的代码的一部分:

SharpMap.Map map = new SharpMap.Map(outputsize);


        SharpMap.Layers.VectorLayer layCountry = new SharpMap.Layers.VectorLayer("nuoc");
        layCountry.DataSource = new SharpMap.Data.Providers.ShapeFile(@"D:\code\SharpMapDemo\SharpmapDemo\App_data\vn_tinh_region.shp", false);
        layCountry.Style.Fill = new SolidBrush(Color.Yellow);
        layCountry.Style.Outline = new Pen(Color.Black, 1);
        layCountry.Enabled = true;            
        layCountry.Style.EnableOutline = true;

        SharpMap.Layers.VectorLayer newLay = new SharpMap.Layers.VectorLayer("tinh");
        newLay.DataSource = new SharpMap.Data.Providers.ShapeFile(@"D:\code\SharpMapDemo\SharpmapDemo\App_Data\5tinh_region.shp", false);
        newLay.Style.Fill = new SolidBrush(Color.Red);
        newLay.Style.Outline = new Pen(Color.Black, 1);
        newLay.Style.EnableOutline = true;
        map.Layers.Add(newLay);
        map.Layers.Add(layCountry);
Run Code Online (Sandbox Code Playgroud)

所以layCountry是我唯一看到的人.当我将最后两行更改为:

map.Layers.Add(layCountry);
map.Layers.Add(newLay);
Run Code Online (Sandbox Code Playgroud)

newLay是唯一的一个.任何帮助都很感激.感谢您阅读此内容并抱歉我的英语不好.

Pra*_*tel 5

尝试半透明层,如下所示

// 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);
Run Code Online (Sandbox Code Playgroud)