sparkle1981
路人甲
路人甲
  • 注册日期2005-07-07
  • 发帖数2
  • QQ
  • 铜币112枚
  • 威望0点
  • 贡献值0点
  • 银元0个
阅读:731回复:1

高手指点

楼主#
更多 发布于:2005-07-12 20:03
<P>高手帮忙看看,为什么clone的features可以取到featureid,centerx,centery,属性,就是不能取到name 属性呢?</P>
<P>int i,id<BR>string name,ls_name="test",name1,name2,featureid,xx,yy<BR>OleObject Layers ,kh_layer,layer1<BR>OleObject features ,feature,clonefeature<BR>OleObject points<BR>double count<BR> <BR>kh_Layer = map_1.Object.Layers.CreateLayer (ls_name)<BR>kh_Layer.Editable = true<BR>map_1.Object.Layers.InsertionLayer = kh_Layer</P>
<P>layers = map_1.object.Layers<BR>layer1=layers.item(5)<BR>features=layer1.allfeatures<BR>clonefeature =features.clone</P>
<P>messagebox("",string(features.item(10).name))<BR>messagebox("",string(features.item(10).featureid))<BR>messagebox("",string(features.item(10).centerx))<BR>messagebox("",string(features.item(10).centery))<BR>for i=1 to 100<BR>kh_Layer.addfeature(clonefeature.item(i))<BR>next<BR>layer1=layers.item(1)<BR>features=layer1.allfeatures<BR>for i=1 to 100<BR>name=features.item(i).name+name<BR>featureid=string(features.item(i).featureid)+string(featureid)<BR>xx=string(features.item(i).centerx)+string(xx)<BR>yy=string(features.item(i).centery)+string(yy)</P>
<P>next<BR>messagebox("",string(layer1.name))<BR>messagebox("",string(name))<BR>messagebox("",string(featureid))<BR>messagebox("",string(xx))<BR>messagebox("",string(yy))</P>
喜欢0 评分0
游客

返回顶部