- 积分
- 376
- 贡献
-
- 精华
- 在线时间
- 小时
- 注册时间
- 2011-8-13
- 最后登录
- 1970-1-1
|
楼主 |
发表于 2015-4-13 08:29:07
|
显示全部楼层
谢谢老师,通过老师指点能获得各个多边形的顶点的坐标。
for (int i = 0; i < mapView1.GraphicCollection.GraphicList.Count; i++)
{
MeteoInfoC.Shape.Graphic pGraphic = this.mapView1.GraphicCollection.GraphicList;
MeteoInfoC.Shape.PolygonShape pShape = (PolygonShape)pGraphic.Shape;
pShape.GetPoints();
string RegionPoint = "";
MeteoInfoC.PointD[] temp = new MeteoInfoC.PointD[pShape.PointNum];
for (int j = 0; j < pShape.PointNum; j++)
{
if (j == pShape.PointNum - 1)
{
temp[j] = pShape.Points[j];
RegionPoint += (temp[j].X + "," + temp[j].Y);
}
else
{
temp[j] = pShape.Points[j];
RegionPoint += (temp[j].X + "," + temp[j].Y + ";");
}
}
}
在这继续想咨询老师,我如果针对每一个多边形设置个中文名字,并且名字和图形能一一对应。这样我保存各个多边形的时候针对名字也一起保存?? |
|