阅读:2833回复:9
AE中怎么实现圆选择的功能呢?
框选择比较简单, 那圆形选择怎么实现呢? 是不是用ICircularArc,但是好像没有用呀,
|
|
1楼#
发布于:2005-04-11 09:54
ICircularArc可以
|
|
|
2楼#
发布于:2005-04-11 15:09
为什么我的AE中没有ICircularArc接口?
|
|
3楼#
发布于:2005-04-11 15:51
引用一下AE接口
|
|
|
4楼#
发布于:2005-04-12 19:44
<P> Dim pRubberBand As IRubberBand
Dim pRubberBandGeometry As IGeometry Dim pPointCollection As IPointCollection pRubberBand = New RubberCircle pRubberBandGeometry = pRubberBand.TrackNew(m_pActiveView.ScreenDisplay, Nothing)</P> <P> Dim pGeom As IGeometry Dim pSegColl As ISegmentCollection Dim pPolygon As IPolygon pPolygon = New Polygon pSegColl = pPolygon</P> <P> pSegColl.AddSegment(pRubberBandGeometry) pGeom = pPolygon</P> <P> Dim pSpatialReference As ISpatialReference pSpatialReference = m_pMap.SpatialReference pGeom.SpatialReference = pSpatialReference</P> <P> m_pMap.SelectByShape(pGeom, Nothing, False) m_pActiveView.PartialRefresh(esriViewDrawPhase.esriViewGeoSelection, Nothing, m_pActiveView.Extent) </P> |
|
5楼#
发布于:2005-04-14 11:17
<P>Dim pSearchCircle As IGeometry
Set pSearchCircle = New CircularArc</P> <P>If selMethod = "circle" Then Set pSearchCircle = frmmain.MapControlDisp.TrackCircle Set pGeom = pSearchCircle End If If Not pGeom Is Nothing Then frmmain.MapControlDisp.Map.SelectByShape pGeom, pSelectionEnv, False acView.PartialRefresh esriViewGeoSelection, Nothing, Nothing End If </P> |
|
|
6楼#
发布于:2007-05-25 14:04
哥哥~ 框选择咋选啊 ?教教我吧 555555555
|
|
7楼#
发布于:2007-05-25 14:07
还有点选择 ~~~~
|
|
8楼#
发布于:2007-05-26 09:19
<P>5楼的代码已经说明了如何选择啊</P>
<P>Dim pSpatialReference As ISpatialReference<BR> pSpatialReference = m_pMap.SpatialReference<BR> pGeom.SpatialReference = pSpatialReference</P> <P> m_pMap.SelectByShape(<STRONG>pGeom</STRONG>, Nothing, False)<BR> m_pActiveView.PartialRefresh(esriViewDrawPhase.esriViewGeoSelection, Nothing, m_pActiveView.Extent)<BR></P> <P>要实现不同的形状的选择方式,大家只要把<STRONG>pGeom这个参数改变一下就行,5楼的用是polygon,还可以是point,polyline等多种大家需要的形状</STRONG></P> |
|
|
9楼#
发布于:2007-05-27 11:46
<DIV class=quote><B>以下是引用<I>aicai</I>在2005-4-12 19:44:08的发言:</B><BR>
<P>Dim pRubberBand As IRubberBand<BR> Dim pRubberBandGeometry As IGeometry<BR> Dim pPointCollection As IPointCollection<BR> pRubberBand = New RubberCircle<BR> pRubberBandGeometry = pRubberBand.TrackNew(m_pActiveView.ScreenDisplay, Nothing)</P> <P> Dim pGeom As IGeometry<BR> Dim pSegColl As ISegmentCollection<BR> Dim pPolygon As IPolygon<BR> pPolygon = New Polygon<BR> pSegColl = pPolygon</P> <P> pSegColl.AddSegment(pRubberBandGeometry)<BR> pGeom = pPolygon</P> <P> Dim pSpatialReference As ISpatialReference<BR> pSpatialReference = m_pMap.SpatialReference<BR> pGeom.SpatialReference = pSpatialReference</P> <P> m_pMap.SelectByShape(pGeom, Nothing, False)<BR> m_pActiveView.PartialRefresh(esriViewDrawPhase.esriViewGeoSelection, Nothing, m_pActiveView.Extent)<BR> </P></DIV> <br>这个兄弟的应该是正解!<img src="images/post/smile/dvbbs/em01.gif" /> |
|