AGI STK X 11Send comments on this topic.
GetWindowProjectedPosition Method (AgUiAx2DCntrl)
See Also
Lat
Latitude in deg
Lon
Longitude in deg
Alt
Altitude in Connect distance unit
DrawCoords

 

Windows






Windows & Linux

Description

Get the window projected position for given values.

Syntax

[Visual Basic .NET]
Public Function GetWindowProjectedPosition( _
    ByVal Lat As Double, _
    ByVal Lon As Double, _
    ByVal Alt As Double, _
    ByVal DrawCoords As AgEGfxDrawCoords _
) As AgWinProjPos
[C#]
public AgWinProjPos GetWindowProjectedPosition(
    double Lat,
    double Lon,
    double Alt,
    AgEGfxDrawCoords DrawCoords
);
[Managed C++]
public: AgWinProjPos^ GetWindowProjectedPosition(
    double Lat,
    double Lon,
    double Alt,
    AgEGfxDrawCoords DrawCoords
);
[Java]
public AgWinProjPos getWindowProjectedPosition(
    double Lat,
    double Lon,
    double Alt,
    AgEGfxDrawCoords DrawCoords
);
[Unmanaged C++]
public: HRESULT GetWindowProjectedPosition(
    double Lat,
    double Lon,
    double Alt,
    AgEGfxDrawCoords DrawCoords,
    AgWinProjPos ** ppWinProjPos
);

Parameters

Lat
Latitude in deg
Lon
Longitude in deg
Alt
Altitude in Connect distance unit
DrawCoords

 

Return Type

This method returns pixel or screen coordinate values for given latitude, longitude and altitude values.

See Also

Example

[Viusal Basic .NET]
Private Sub AxAgUiAx2DCntrl1_MouseMoveEvent( _
ByVal sender As Object, _
ByVal e As AxAGI.STKX.IAgUiAx2DCntrlEvents_MouseMoveEvent) _
Handles AxAgUiAx2DCntrl1.MouseMoveEvent

Dim PickData As AGI.STKX.AgPickInfoData
Dim oWinProjPos As AGI.STKX.AgWinProjPos

PickData = AxAgUiAx2DCntrl1.PickInfo(e.x, e.y)

oWinProjPos = AxAgUiAx2DCntrl1.GetWindowProjectedPosition( _
PickData.Lat, _
PickData.Lon, _
PickData.Alt, _
AGI.STKX.AgEGfxDrawCoords.ePixelDrawCoords)

If (oWinProjPos.IsWinProjPosValid) Then

Debug.Print("XPos = " & oWinProjPos.XPos & vbCrLf & "YPos = " & oWinProjPos.YPos)

End If

End Sub
© 2019 Analytical Graphics, Inc. All Rights Reserved.