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#

 

ITerrainLocation80 CreateLocation(

       IPosition80 Position = null,

       string        GroupID = "",

       string        Description = "")

 

C++

 

HRESULT CreateLocation(

        IPosition80 *      Position,

        BSTR  GroupID,

        BSTR  Description,

        ITerrainLocation80 **     pITerrainLocation80)

Parameters

Position

An IPosition80 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 an empty string, the object is created under the root. You can obtain the GroupID by one of the following methods:

·          Create the group using IProjectTree80.CreateGroup.

·          Find the group, if you know the name, using IProjectTree80.FindItem.

·          Traverse the Tree using IProjectTree80 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

pITerrainLocation80

An ITerrainLocation80, representing the newly created location.

Exceptions

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