阅读:1249回复:2
请问高人, 如何获得用户使用选择工具单击地图时选择的信息
请问高人, 如何获得用户使用选择工具单击地图时选择的信息<BR>
|
|
1楼#
发布于:2005-11-22 11:06
谢谢
|
|
2楼#
发布于:2005-11-18 17:58
<P>在toolused事件中编写程序 ,用searchatpoint 方法,可以参照下面的例子</P>
<P>Private Sub Map1_MouseDown(Button As Integer, Shift As _<BR> Integer, X As Single, Y As Single)<BR> Dim Lon As Double<BR> Dim lat As Double<BR> Dim fs As Features<BR> Dim pnt As New Point<BR> If Map1.CurrentTool = miArrowTool Then<BR> Map1.ConvertCoord X, Y, Lon, lat, miScreenToMap<BR> pnt.Set Lon, lat<BR> Set fs = Map1.Layers("US Top 20 Cities").SearchAtPoint(pnt)<BR> If fs.Count > 0 Then<BR> MsgBox fs.Count ; ": " ; fs(1).Name<BR> Else<BR> MsgBox "Nothing found"<BR> End If<BR> End If</P> <P> End Sub</P> |
|