STK X Send comments on this topic.
GetWindowProjectedPosition Method (AgUiAx2DCntrl)
See Also  Example
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 ** ReturnValue
);

Parameters

Lat
Latitude in deg
Lon
Longitude in deg
Alt
Altitude in Connect distance unit
DrawCoords
Member Value Description
ePixelDrawCoords 1 The draw coordinates values in pixels.
eScreenDrawCoords 2 The draw coordinates values in screen coordinates.

 

Return Type

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

Example

[Viusal Basic .NET] Copy Code
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

See Also

© 2017 Analytical Graphics, Inc. All Rights Reserved.

STK Engine for UNIX 11.2