STK X Send comments on this topic.
PickInfo Method (AgUiAx2DCntrl)
See Also  Example
X
Specifies the x-coordinate of the point in windows coordinates of the control.
Y
Specifies the y-coordinate of the point in control coordinates.
Windows






Windows & Linux

Description

Get detailed information about a mouse pick.

Syntax

[Visual Basic .NET]
Public Function PickInfo( _
   ByVal X As Integer, _
   ByVal Y As Integer _
) As AgPickInfoData

[C#]
public AgPickInfoData PickInfo(
int X,
int Y
);

[Managed C++]
public: AgPickInfoData^ PickInfo(
int X,
int Y
);

[Java]
public AgPickInfoData pickInfo(
int X,
int Y
);

[Unmanaged C++]
public: HRESULT PickInfo(
long X,
long Y,
AgPickInfoData ** ReturnValue
);

Parameters

X
Specifies the x-coordinate of the point in windows coordinates of the control.
Y
Specifies the y-coordinate of the point in control coordinates.

Return Type

The PickInfo method processes the point clicked during a mouse pick and returns a AgPickInfoData object which contains (if available):

  • the corresponding map latitude, longitude and altitude;
  • the STK object clicked (if available).

Remarks

Picks outside the 2D Map area are invalid.

Example

[Visual Basic .NET] Copy Code
Sub GxPickInfo(ByVal Str As String, ByVal x As Single, ByVal y As Single)

        Dim pickInfoData As AGI.STKX.AgPickInfoData
        pickInfoData = Me.AxAgUiAx2DCntrl1.PickInfo(x, y)

        If pickInfoData.IsObjPathValid Then
            WriteMsg(Str & "Object: " & path)
        End If

        If pickInfoData.IsLatLonAltValid Then
            WriteMsg(Str & "LLA: " & Lat & " " & Lon & " " & Alt)
        End If

        pickInfoData = Nothing

End Sub

See Also

© 2017 Analytical Graphics, Inc. All Rights Reserved.

STK 11.2.1 Programming Interface