- 积分
- 55
- 贡献
-
- 精华
- 在线时间
- 小时
- 注册时间
- 2011-11-6
- 最后登录
- 1970-1-1
|
发表于 2011-11-6 00:59:09
|
显示全部楼层
楼主您好!- MICAPS13DataInfo aDataInfo = new MICAPS13DataInfo();
- string aFile = Application.StartupPath + @"\09012417.000";
- aDataInfo.ReadDataInfo(aFile);
- //Create image layer
- ImageLayer aImageLayer = DrawMeteoData.CreateImageLayer(aDataInfo.ImageBytes,
- aDataInfo.XNum, aDataInfo.YNum, aDataInfo.WorldFileP, "Image");
- //Set palette to the image
- string palFile = Application.StartupPath + @"\I-01.pal";
- aImageLayer.SetPalette(palFile);
- //---Projection the MapView
- G_LayerLegend.MapView.Projection.ProjectLayers(G_LayerLegend.MapView,aDataInfo.ProjInfo);
- //---Add layer
- //报内存不够!!!
- G_LayerLegend.AddLayer(aImageLayer, true);
复制代码
这是加载一个micaps数据文件,可是到G_LayerLegend.AddLayer(aImageLayer, true)会产生内存不够而使程序死掉。
望得到您的答复。
|
|