CreateLocation

In TerraExplorer, a location is defined as a point of interest (X, Y, Height). The camera is given a direction and distance from which this point of interest is viewed.  For example, if you chose the White House as your point of interest, you would need to find the x- and y-coordinates of the White House and pass those coordinates to the CreateLocation() method. To accompany the location, you could also place a label above the location signifying that it sits atop the White House.

 

HRESULT CreateLocation (

[in] double X,

[in] double Y,

[in] double Elevation,

[in] double Yaw,

[in] double Pitch,

[in] double Distance,

[in, defaultvalue(0)] HeightStyleCode HeightStyle,

[in, defaultvalue(0)] long GroupID,

[in, defaultvalue("")] BSTR Description,

[out, retval] ITerrainLocation5** pITerrainLocation5)

Parameters:

The HeightStyleCode enum can use any of the following values:

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_PARENTNOTGROUP

The group ID entered does not represent a valid group in the information tree.

TE_E_INTERNAL

TerraExplorer was unable to create the object. To get more information about this error use the IErrorInfo Interface.

TE_E_NOLICENCE

Your license does not allow the use of this feature.