阅读:1436回复:5
大家好,在c#中用mo2.3出现过这种问题吗?谢谢
<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> |
|
1楼#
发布于:2006-04-18 10:51
pit =new PointClass ();//是不是这里可能给你出的问题<BR>
|
|
|
2楼#
发布于:2006-04-25 16:24
我现在也在弄这个,跟楼主的问题有点像,高手指点一下?
|
|
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> |
|
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> |
|
5楼#
发布于:2006-08-03 14:50
<img src="images/post/smile/dvbbs/em05.gif" />
|
|