- 积分
- 33
- 贡献
-
- 精华
- 在线时间
- 小时
- 注册时间
- 2014-11-27
- 最后登录
- 1970-1-1
|
登录后查看更多精彩内容~
您需要 登录 才可以下载或查看,没有帐号?立即注册
x
哪位老师能给我指点一下: meteoinfo不支持14类 所以就用数据流读文本文档里的点坐标 然后在地图上画出来形成一个圆圈 但是在设置图例时遇到问题 如何才能让14类数据画出的圆圈所代表的范围跟图例里面的范围对应起来 然后用图例所对应的颜色填充圆圈
ArrayList LINESlinesnum = chafen(list[ListCount++]);
int LINESlines = Convert.ToInt32(LINESlinesnum[0]);
if (LINESlines > 0)
{
for (int n = 1; n <= LINESlines; n++)
{
PolygonShape pls1 = new PolygonShape();
List<PointD> list2 = new List<PointD>();
ArrayList PLnum = chafen(list[ListCount++]);
int points1 = Convert.ToInt32(PLnum[1]);
int LineSize = Convert.ToInt32(PLnum[0]);
int i = ListCount;
for (; i <= ListCount + points1 - 1; i++)
{
ArrayList StratPoint1 = chafen(list[i]);
list2.Add(new PointD(Convert.ToDouble(StratPoint1[0]), Convert.ToDouble(StratPoint1[1])));
}
ListCount = i;
ArrayList GNnum = chafen(list[ListCount++]);
int grade = Convert.ToInt32(GNnum[0]);
int number = Convert.ToInt32(GNnum[1])
ArrayList OverPoint = chafen(list[ListCount++]);
list2.Add(new PointD(Convert.ToDouble(OverPoint[0]), Convert.ToDouble(OverPoint[1])));
pls1.Points = list2;
PolygonBreak plb1 = new PolygonBreak();
plb1.Color = Color.FromArgb(80, Color.LightBlue);
Graphic g2 = new Graphic(pls1, plb1);
addLayer(lgsTxt, g2, n);
}
public void addLayer( string lgs, Graphic g, int j)
{
VectorLayer pLayer = new VectorLayer(ShapeTypes.Polygon);
pLayer.LayerName = "Rain";
pLayer.Visible = true;
pLayer.EditAddField("ID", typeof(double));
pLayer.EditAddField("Rain_Low", typeof(string));
Graphic pGraphic = null;
aLS.ImportFromXMLFile(lgs);
pGraphic = g;
Shape pShape = pGraphic.Shape;
int shapNum = layersLegend1.ActiveMapFrame.GetLayerNodes().Count;
int shapeNum = pLayer.ShapeNum;
int i = 1;
if (pLayer.EditInsertShape(pShape, shapeNum))
{
pLayer.EditCellValue("ID", shapeNum, i);
}
i += 1;
pLayer.UpdateLegendScheme(LegendType.SingleSymbol, "ID");
//PolygonBreak aPGB = (PolygonBreak)pLayer.LegendScheme.LegendBreaks[0];
//aPGB.Color = aLS.LegendBreaks[j].Color;
layersLegend1.ActiveMapFrame.AddLayer(pLayer);
pLayer.IsMaskout = true;
layersLegend1.ActiveMapFrame.MapView.PaintLayers();
}
|
|