Home > Working with SGWorld > Creator (ICreator6) > CreateFromStream

CreateFromStream

The CreateFromStream method enables you to stream layer data from the server without first storing it in a client local file. Information from the remote layer file is retrieved, added to the terrain, and then removed dynamically based on the camera's position. This option enables you to fly without waiting for the entire layer to load.

 

JavaScript

 

CreateFromStream(

      Stream,

      GroupID)

 

C#

 

ITerraExplorerObject6 CreateFromStream(

      object   Stream,

      int      GroupID = 0)

 

C++

 

HRESULT CreateFromStream(

       VARIANT  Stream,

       LONG_PTR  GroupID,

       ITerraExplorerObject6 **  pITerraExplorerObject6) 

 

Parameters

Stream

Reserved. Currently not used.

GroupID

The Project Tree group in which the layer is created. If it is set to zero, the object is created in 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.

Return Value

pITerraExplorerObject6

An ITerraExplorerObject6, representing the streaming layer.

Exceptions

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