在教程(五)的基础上加了Faded,Grid_Fill,Grid_Point,Raster,Vector,Barb,Streamline
1.同样注意修改LegendStyleEnum改为LegendStyles
2.DrawMeteoData.CreateShadedLayer()的参数是4个,Grid_Fill,Grid_Point的参数类似也是4个,但Raster的参数是3个,且参数顺序和前三个函数的略不同。
3.在画出Shaded图之后,发现陆地上区域被country1图层覆盖,这时需要把country1透明度设置为100,如下line5:
1 private void LoadLayers() 2 { 3 string aFile = Application.StartupPath + "\Map\country1.shp"; 4 MapLayer aLayer = MapDataManage.OpenLayer(aFile); 5 aLayer.TransparencyPerc = 100; 6 }
4.country1图层中边界线的颜色是浅灰色,为突出显示,设置为黑色,需要OutlineColor属性:
还是在LoadLayers()函数中添加:
1 PolygonBreak aPGB = (PolygonBreak)aLayer.LegendScheme.LegendBreaks[0]; 2 aPGB.OutlineColor = Color.Black; 3 aPGB.OutlineSize = 2;
直接aLayer.LegendScheme.LegendBreaks[0].OutlineColor属性是没有的。