学习 MeteoInfo二次开发教程(六)

时间:2023-03-09 17:06:06
学习 MeteoInfo二次开发教程(六)

在教程(五)的基础上加了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:

 private void LoadLayers()
{
string aFile = Application.StartupPath + "\\Map\\country1.shp";
MapLayer aLayer = MapDataManage.OpenLayer(aFile);
aLayer.TransparencyPerc = ;
}

4.country1图层中边界线的颜色是浅灰色,为突出显示,设置为黑色,需要OutlineColor属性:

还是在LoadLayers()函数中添加:

     PolygonBreak aPGB = (PolygonBreak)aLayer.LegendScheme.LegendBreaks[];
aPGB.OutlineColor = Color.Black;
aPGB.OutlineSize = ;

直接aLayer.LegendScheme.LegendBreaks[0].OutlineColor属性是没有的。