ying_gang
路人甲
路人甲
  • 注册日期2006-04-13
  • 发帖数1
  • QQ
  • 铜币106枚
  • 威望0点
  • 贡献值0点
  • 银元0个
阅读:1436回复:5

大家好,在c#中用mo2.3出现过这种问题吗?谢谢

楼主#
更多 发布于:2006-04-17 11:06
<P>大家好,在c#中用mo2.3出现过这种问题吗?谢谢</P>
<P>    pit =new PointClass ();<BR>    pit=mMap.ToMapPoint(e.x,e.y);<BR>    MapLayer aMapLayer;<BR> <BR>    for(int i=0;i<mMap.Layers.Count;i++)<BR>    {<BR>     aMapLayer=(MapLayer)mMap.Layers.Item(i);<BR>     resc=aMapLayer.SearchShape((object)pit,SearchMethodConstants.moPointInPolygon ,"");<BR>     if (resc!=null) break;<BR>    }</P>
<P>    if(resc!=null)<BR>    {<BR>     ........此刻foreach ( Object fld in resc.Fields )中有问题,好像是取得的resc中无数据..................................<BR>    }</P>

<P>大家遇到过这种问题吗?请大家帮帮忙,谢谢啊</P>
喜欢0 评分0
xueshanfei
路人甲
路人甲
  • 注册日期2004-07-06
  • 发帖数159
  • QQ
  • 铜币641枚
  • 威望0点
  • 贡献值0点
  • 银元0个
1楼#
发布于:2006-04-18 10:51
pit =new PointClass ();//是不是这里可能给你出的问题<BR>
如果我执着远方,你能否穿越千里沙漠?如果我一无所有,你能否依然地爱我?
举报 回复(0) 喜欢(0)     评分
cheie
路人甲
路人甲
  • 注册日期2003-09-15
  • 发帖数39
  • QQ
  • 铜币245枚
  • 威望0点
  • 贡献值0点
  • 银元0个
2楼#
发布于:2006-04-25 16:24
我现在也在弄这个,跟楼主的问题有点像,高手指点一下?
举报 回复(0) 喜欢(0)     评分
xiaoguoch
路人甲
路人甲
  • 注册日期2006-07-26
  • 发帖数4
  • QQ
  • 铜币54枚
  • 威望0点
  • 贡献值0点
  • 银元0个
3楼#
发布于:2006-08-03 14:38
<P>    pit =new PointClass ();<BR>    pit=mMap.ToMapPoint(e.x,e.y);<BR>    MapLayer aMapLayer;<BR><BR>    for(int i=0;i<mMap.Layers.Count;i++)<BR>    {<BR>     aMapLayer=(MapLayer)mMap.Layers.Item(i);<BR>     resc=aMapLayer.SearchShape((object)pit,SearchMethodConstants.moPointInPolygon ,"");<BR>     if (!resc.Eof) break;<BR>    }</P>
<P>    if(!resc.Eof)<BR>    {<BR>     ........此刻foreach </P>
<P>    }</P>
举报 回复(0) 喜欢(0)     评分
xiaoguoch
路人甲
路人甲
  • 注册日期2006-07-26
  • 发帖数4
  • QQ
  • 铜币54枚
  • 威望0点
  • 贡献值0点
  • 银元0个
4楼#
发布于:2006-08-03 14:40
<IMG src="http://www.gisempire.com/bbs/Skins/Default/topicface/face1.gif"> <B></B><BR>
<P>    pit =new PointClass ();<BR>    pit=mMap.ToMapPoint(e.x,e.y);<BR>    MapLayer aMapLayer;<BR><BR>    for(int i=0;i<mMap.Layers.Count;i++)<BR>    {<BR>     aMapLayer=(MapLayer)mMap.Layers.Item(i);<BR>     resc=aMapLayer.SearchShape((object)pit,SearchMethodConstants.moPointInPolygon ,"");<BR>     if (!resc.Eof) break;<BR>    }</P>
<P>    while(!resc.Eof)<BR>    {<BR>     ........此刻无需foreach</P>
<P>           recs.MoveNext; </P>
<P>    }</P>
举报 回复(0) 喜欢(0)     评分
whmwxhanshan123
路人甲
路人甲
  • 注册日期2006-06-17
  • 发帖数3108
  • QQ
  • 铜币6445枚
  • 威望0点
  • 贡献值0点
  • 银元0个
5楼#
发布于:2006-08-03 14:50
<img src="images/post/smile/dvbbs/em05.gif" />
举报 回复(0) 喜欢(0)     评分
游客

返回顶部