Home > Working with SGWorld > Creator (ICreator6) > CreateLocationHere
A location defines the geographical coordinates of a point on the terrain as well as the position from which the point is to be viewed. By clicking on a location name in the Project Tree the camera can perform a flight, jump to the location or play one of the predefined patterns (circle, oval, line or arc).
This method creates a location in the current camera position. The location of interest is set to the terrain coordinate at the center of the 3D View. If there is no terrain at the center of the view (the camera is facing the sky), the location of interest is set to a distance of two times the current altitude of the camera above the terrain.
JavaScript |
|
CreateLocationHere( GroupID = 0, Description = "") |
C# |
|
ITerrainLocation6 CreateLocationHere( int GroupID = 0, string Description = "") |
C++ |
|
HRESULT CreateLocationHere( LONG_PTR GroupID, BSTR Description, ITerrainLocation6** pITerrainLocation6) |
Parameters
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 IProjectTree6.CreateGroup.
§ Find the group, if you know the name, using IProjectTree6.FindItem.
§ Traverse the Tree using IProjectTree6 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
pITerrainLocation6
An ITerrainLocation6, representing the newly created location.
Exceptions
See: HRESULT Return Values for a list of possible values returned by the HRESULT.