STK Graphics PrimitivesSend comments on this topic.
TryWindowToCartographic Method (IAgStkGraphicsCamera)
See Also
CentralBody
The Central Body of the position.
Position
An array containing the pixel coordinate (in the order x, y) to convert.
Windows





Windows & Linux

Description

Converts a pixel coordinate relative to the globe control to a Cartographic position. For speed, terrain is not considered. This method does not throw an exception.

Syntax

[Visual Basic .NET]
Public Function TryWindowToCartographic( _
    ByVal CentralBody As String, _
    ByVal Position As System.Array _
) As System.Array
[C#]
public System.Array TryWindowToCartographic(
    string CentralBody,
    System.Array Position
);
[Managed C++]
public: System::Array TryWindowToCartographic(
    String __gc ^ CentralBody,
    System::Array ^ Position
);
[Unmanaged C++]
public: HRESULT TryWindowToCartographic(
    BSTR CentralBody,
    SAFEARRAY * * Position,
    SAFEARRAY * * ppRetVal
);
[Java]
public AgSafeArray tryWindowToCartographic(
    String CentralBody,
    AgSafeArray Position
);
[Python - STK API ]
def TryWindowToCartographic(self, CentralBody:str, Position:list) -> list:

Parameters

CentralBody
The Central Body of the position.
Position
An array containing the pixel coordinate (in the order x, y) to convert.

See Also

Example

Shows the format of the Position parameter when converting a pixel coordinate to a cartographic position.
[C#]
Array position = new object[]
{
    150,
    116
};

Array cartographicPos = scene.Camera.WindowToCartographic(
    "Earth", 
    ref position);
Shows the format of the Position parameter when converting a pixel coordinate to a cartographic position.
[Visual Basic .NET]
Dim position As Array = New Object() {150, 116}

Dim cartographicPos As Array = scene.Camera.WindowToCartographic("Earth", position)
© 2024 Analytical Graphics, Inc. All Rights Reserved.