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.

 

JavaScript

 

CreateLocation(

       Position ,

       GroupID ,

       Description )

 

C#

 

ITerrainLocation61 CreateLocation(

       IPosition61   Position = 0,

       int     GroupID = 0,

       string Description = "")

 

C++

 

HRESULT CreateLocation(

        IPosition61            Position,

        LONG_PTR                  GroupID,

        BSTR                      Description,

        ITerrainLocation61 **     pITerrainLocation61)

Parameters

Position

An IPosition61 representing the position of the location on the terrain.

GroupID

The Project Tree group in which the location is created. If it is set to zero, the object is created under the root. You can obtain the GroupID by one of the following methods:

§  Create the group using IProjectTree61.CreateGroup.

§  Find the group, if you know the name, using IProjectTree61.FindItem.

§  Traverse the Tree using IProjectTree61 methods such as GetNextItem (), until you come to the desired GroupID.

Description

The name of the location as it appears in the Project Tree. If an empty string is passed into this parameter, TerraExplorer assigns it a unique name.

Return Value

pITerrainLocation61

An ITerrainLocation61, representing the newly created location.

Exceptions

See: HRESULT Return Values for a list of possible values returned by the HRESULT.