This method retrieves the following parameters, which define the location parameters of the specified group.
HRESULT GetGroupLocation(
[in] long GroupID,
[out] VARIANT*doubleX,
[out] VARIANT* doubleY,
[out] VARIANT* doubleHeight,
[out] VARIANT* doubleDistance,
[out] VARIANT* doubleYaw,
[out] VARIANT* doublePitch,
[out] VARIANT* longFlags)
Parameters:
GroupID – Refers to the group whose location you are about to get. You can obtain the GroupID by one of the following methods:
Create the group using IInformationTree5::CreateGroup.
Find the group, if you know the name, using IInformationTree5::FindItem.
Traverse the Tree using IInformationTree5 methods such as GetNextItem(), until you come to the desired GroupID.
doubleX – The West-East coordinate of the camera position represented in MPT units. You can use the ITerrain interface to retrieve information about the MPT units. If you are working in a Lat-Long format, the Lat-Long values are presented in decimal degrees.
doubleY – The North-South coordinate of the camera position represented in MPT units. You can use the ITerrain interface to retrieve information about the MPT units. If you are working in a Lat-Long format, the Lat-Long values are presented in decimal degrees.
doubleHeight – The height of the camera, in meters. The interpretation of this parameter depends on the Flags parameter
doubleDistance – The distance from the camera to the point of interest.
doubleYaw – The Yaw angle of the plane. See: “Yaw, Pitch and Roll Angles”.
doublePitch – The Pitch angle of the plane. See: “Yaw, Pitch and Roll Angles”.
Flags – Indicates what altitude method is used in the doubleHeight parameter. This parameter can be any of the following values:
HEIGHT_AGL = 4096
The height is above the ground.
HEIGHT_ABSOLUTE = 8192
The height is above the terrain database vertical datum base
ellipsoid.
Return Values:
The return value obtained from the returned HRESULT can be one of the following:
Return value |
Meaning |
S_OK |
Success. |
E_FAIL |
Catastrophic failure. |
TE_E_MPTNOTLOADED |
An MPT file must be loaded in TerraExplorer for this method to work. |
TE_E_INFOTREE_ITEMNOTGROUP |
The item entered is not a group and therefore cannot retrieve location parameters. |
TE_E_NOLICENSE |
You are running TerraExplorer Viewer and therefore do not have permission to work with this interface. |
TE_E_INFOTREE_CANTUSEROOT |
Can not use tree root for this operation |