qpfqpf
路人甲
路人甲
  • 注册日期2007-09-08
  • 发帖数11
  • QQ
  • 铜币141枚
  • 威望0点
  • 贡献值0点
  • 银元0个
阅读:1358回复:0

[求助]请问mapobjects中CommonEventCode什么意思,有什么用法

楼主#
更多 发布于:2007-09-30 09:45
<P>[求助]请问mapobjects中CommonEventCode什么意思,有什么用法?</P>
<P>代码如下:</P>
<P>Dim pt As MapObjects2.Point<BR>Set pt = Map2.ToMapPoint(X, Y)<BR>Dim shpevent As Object<BR>If evr.EndMeasureField = "" Then<BR>Set shpevent = CommonEventCode.ReturnClosestPointEvents(pt, lyr, Map2.Extent)<BR>Else<BR>Set shpevent = CommonEventCode.ReturnClosestLinearEvents(pt, lyr, Map2.Extent)<BR>End If<BR>If shpevent Is Nothing Then<BR>Dim feature As MapObjects2.Line<BR>Set feature = CommonEventCode.ReturnClosestLinearEvents(pt, lyr, "", "", Map2.Extent)<BR>If Not feature Is Nothing Then<BR>Map2.FlashShape shpevent, 2<BR>MsgBox "当前地理对象上并无任何事件", vbExclamation, Me.Caption<BR>Else<BR>MsgBox "未找到地理对象。", vbExclamation, Me.Caption<BR>End If<BR>Exit Sub<BR>Else<BR>Map2.FlashShape shpevent, 2<BR>End If<BR>End If<BR>End Sub</P>
<P>请高手不吝赐教,小弟感激不尽.</P>
喜欢0 评分0
游客

返回顶部