CreateImageLabel

The CreateImageLabel creates an Image Label in the 3D Window.

Note:    If no text is being added to the label, it is preferable to use this method rather than the generic CreateLabel method.

 

JavaScript

 

CreateImageLabel(

       Position,

       ImageFileName,

       LabelStyle ,

       GroupID ,

       Description )

 

C#

 

ITerrainImageLabel61 CreateImageLabel(

       IPosition61   Position,

       string    ImageFileName,

       ILabelStyle61        LabelStyle = 0,

       int       GroupID = 0,

       string    Description = "")

 

C++

 

HRESULT CreateImageLabel(         

        IPosition61             Position,

        BSTR                       ImageFileName,

        ILabelStyle61              LabelStyle,

        LONG_PTR                   GroupID,

        BSTR                       Description,

        ITerrainImageLabel61 **    pITerrainImageLabel61) 

 

Parameters

Position

An IPosition61 representing the position and orientation of the label on the terrain.

ImageFileName

A full path name or a URL to the image file that appears in the label.

LabelStyle

An ILabelStyle61 representing the label style (e.g. color, font and viewing distance properties).

GroupID

The Project Tree group in which the label 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 label as it appears in the Project Tree. If an empty string is passed into this parameter, TerraExplorer assigns it a unique name.

Return Value

pITerrainImageLabel61

An ITerrainImageLabel61 representing the newly created Image label.

Exceptions

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