- 积分
- 1322
- 贡献
-
- 精华
- 在线时间
- 小时
- 注册时间
- 2011-12-8
- 最后登录
- 1970-1-1

|

楼主 |
发表于 2012-9-22 17:09:17
|
显示全部楼层
MeteoInfo 发表于 2012-9-17 22:02
可以参考我刚发的二次开发教程贴:MeteoInfo二次开发教程(九)
http://bbs.06climate.com/forum.php?mo ...
王老师,不好意思老师打扰您,LegendScheme aLS参数也设置好了,最后一步创建图层的时候还是不知道用哪个方法?- //以下为测试流域面雨量
- VectorLayer lyLayer = new VectorLayer(ShapeTypes.Polygon);
- lyLayer = (VectorLayer)MapDataManage.OpenLayer(aFile);
- lyLayer.LayerName = "流域面雨量";
- lyLayer.EditAddField("Rain", typeof(double));//添加字段
- double[] rainfall=new double[60];
- Color[] colors = new Color[60];
- for (int i = 0; i < 60; i++)
- {
- lyLayer.EditCellValue("Rain", i, i);
- rainfall[i]=i;
- colors[i] = Color.FromArgb(i, 100, 150);
- }
- MeteoDataInfo aDataInfo = new MeteoDataInfo();
- LegendScheme aLS = LegendManage.CreateGraduatedLegendScheme(rainfall, colors, ShapeTypes.Polygon, 1, 60, false, -9999);
- for (int i = 0; i < aLS.BreakNum; i++)
- ((PolygonBreak)aLS.breakList[i]).OutlineSize = 8;
复制代码 最后一步,用设置的aLS参数来创建图层,如例子中:VectorLayer aLayer = DrawMeteoData.CreateSTPointLayer(visData, aLS, "StationPoint_Vis", "Vis")的这一步,我应该用哪个函数来创建呢?思考了好久,还是没想出来啊。。。。希望王老师能提示下学生,灰常感激! |
|