- 积分
- 1819
- 贡献
-
- 精华
- 在线时间
- 小时
- 注册时间
- 2013-8-24
- 最后登录
- 1970-1-1
|
发表于 2015-2-19 13:00:26
|
显示全部楼层
问一个问题,在脚本中添加PolygonBreak(面),只能添加一个么?
下面的脚本代码if len(lon[tmp_plist]) != 0:
plist = List[PointD]()
for ilon, lon in enumerate(lon[tmp_plist]):
plist.Add(PointD(lon, lat[tmp_plist][ilon]))
pShape = CurvePolygonShape()
pShape.Points = plist
pLegend = PolygonBreak()
pLegend.Color = Color.FromArgb (125,10,10);
pGraphic = Graphic(pShape, pLegend)
print tmp_plist
mipy.MapDocument.ActiveMapFrame.MapView.GraphicCollection.Add(pGraphic)
print 'abc'
tmp_plist =1
if len(lon[tmp_plist]) != 0:
plist = List[PointD]()
for ilon, lon in enumerate(lon[tmp_plist]):
plist.Add(PointD(lon, lat[tmp_plist][ilon]))
pShape = CurvePolygonShape()
pShape.Points = plist
pLegend = PolygonBreak()
pLegend.Color = Color.FromArgb (125,10,10);
pGraphic = Graphic(pShape, pLegend)
print tmp_plist
mipy.MapDocument.ActiveMapFrame.MapView.GraphicCollection.Add(pGraphic)
提示:
Traceback (most recent call last):
File "<string>", line 79, in <module>
TypeError: 'float' object is unsubscriptable
大神帮忙看看? |
|