- 积分
- 1322
- 贡献
-
- 精华
- 在线时间
- 小时
- 注册时间
- 2011-12-8
- 最后登录
- 1970-1-1
|
发表于 2015-12-3 23:57:42
|
显示全部楼层
谢谢王老师,问题大部分解决了,可是最新的控件按您的提示修改,还是有点错误,请教王老师如何修改?
private void TSMI_StationModel_Click(object sender, EventArgs e)
{
//Create a MeteoDataInfo object
MeteoDataInfo aDataInfo = new MeteoDataInfo();
//Open SYNOP data file
string aFile = Application.StartupPath + "\\Sample\\12010615.syn";
string stFile = Application.StartupPath + "\\Sample\\SYNOP_Stations.csv";
aDataInfo.OpenSYNOPData(aFile, stFile);
//Create a legend scheme
LegendScheme aLS = LegendManage.CreateSingleSymbolLegendScheme(ShapeTypes.Point, Color.Blue, 12);
//Get station model data
double[,] stationModelData = new double[10, 1];
Extent aExtent = new Extent();
stationModelData = aDataInfo.GetStationModelData();//错误1无法将类型“MeteoInfoC.Data.StationModelData”隐式转换为“double[*,*]”
VectorLayer aLayer = new VectorLayer(ShapeTypes.Point);
aLayer = DrawMeteoData.CreateStationModelLayer(stationModelData,
aDataInfo.MissingValue, aLS, "StationModel", true); //错误 2 与“MeteoInfoC.Data.MeteoData.DrawMeteoData.CreateStationModelLayer(MeteoInfoC.Data.StationModelData, double, MeteoInfoC.Legend.LegendScheme, string, bool)”最匹配的重载方法具有一些无效参数
错误 3 参数 1: 无法从“double[*,*]”转换为“MeteoInfoC.Data.StationModelData”
//Add layer
layersLegend1.ActiveMapFrame.AddLayer(aLayer);
layersLegend1.Refresh();
//Change title of the layout
LayoutGraphic aTitle = mapLayout1.GetTexts()[0];
aTitle.SetLabelText("MeteoInfo Class Library Demo - Station Model Layer");
}
|
|