阅读:1099回复:1
[求助]MAPX
<P>很急</P>
<P>当点击地图时,如何获得点击对象MAPX的属性值,比如:坐标,标注等的值</P> |
|
1楼#
发布于:2005-11-18 17:55
<P>用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> |
|