- 积分
- 581
- 贡献
-
- 精华
- 在线时间
- 小时
- 注册时间
- 2012-7-5
- 最后登录
- 1970-1-1
|
登录后查看更多精彩内容~
您需要 登录 才可以下载或查看,没有帐号?立即注册
x
本帖最后由 龙吸水 于 2016-12-21 08:47 编辑
代码如下:
string aFile = Application.StartupPath + "\\Sample\\SATE_L2_F2E_VISSR_MWB_LBT_SEC_LCN-IR1-20161219-0830.AWX";
aDataInfo.OpenAWXData(aFile);
GridData cloud = aDataInfo.GetGridData("");
//Create raster layer
string palFile = Application.StartupPath + "\\Sample\\I-01.pal";
//"Raster_Cloud"
RasterLayer aLayer = DrawMeteoData.CreateRasterLayer(cloud, "Raster_Cloud", palFile);
aLayer.ProjInfo = aDataInfo.ProjInfo;
//Porject mapview
layersLegend1.ActiveMapFrame.MapView.LockViewUpdate = true;
layersLegend1.ActiveMapFrame.MapView.ProjectLayers(aDataInfo.ProjInfo, false);
//Add layer
layersLegend1.ActiveMapFrame.AddLayer(aLayer);
layersLegend1.ActiveMapFrame.MoveLayer(aLayer.Handle, 0);
layersLegend1.Refresh();
layersLegend1.ActiveMapFrame.MapView.ZoomToExtent(aLayer.Extent);
// layersLegend1.ActiveMapFrame.MapView.ZoomToExtent(78, 110, 16, 55);
layersLegend1.ActiveMapFrame.MapView.LockViewUpdate = false;
layersLegend1.ActiveMapFrame.MapView.PaintLayers();
|
|