导航

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

Posted on 2017-06-06 17:48  PanDaSong  阅读(1414)  评论(0编辑  收藏  举报

1.ActiveMapFrame部分没有大问题,按教程来就行。

private void SetMapView()和private void ActiveMapFrameChanged(object sender, EventArgs e)函数与public Form1()并列

语句:

1 layersLegend1.ActiveMapFrameChanged += new EventHandler(ActiveMapFrameChanged);

在public Form1()中。

2.画Grads数据部分

VectorLayer aLayer = DrawMeteoData.CreateContourLayer(press, aLS, "Contour_PS");

这一句中参数需要4个,改为:

VectorLayer aLayer = DrawMeteoData.CreateContourLayer(press, aLS, "Contour_PS","SongPan");

“Contour_PS”参数是Legend的名称,图例的标题会显示“PS”,如果改为“ContPS”,则显示“ContPS”,而改成“Contour_Song”,则显示“Song”,似乎“Contour_”是一个格式。

最后一个参数“SongPan”似乎没什么显著作用,可以任意设置。

3.LegendStyleEnum不再使用

1 aLegend.LegendStyle = LegendStyleEnum.Normal;
2 改为:
3 aLegend.LegendStyle = LegendStyles.Normal; 

4.Sample\model.ctl和model.dat需要copy到Projects\MeteoInfoDemo\MeteoInfoDemo\bin\Debug\Sample中