The CreateLayer method creates a layer object in the Information Window. To load the layer objects to the 3D window you must call ILayer::Load on the returning ILayer interface. You can continue to manipulate the layer use the ILayer interface. See: “Feature Layers” and “ILayer5”.
HRESULT CreateLayer(
[in] BSTR layerName,
[in] BSTR xmlLayerBaseInfo,
[in] long lParentGroupID,
[out, retval] ILayer5** pILayer)
Parameters:
LayerName – Name assigned to the layer being created.
xmlLayerBaseInfo – An XML string that describes the layer being created. This XML has a standard format. See: “Feature Layers”.
IParentGroupID – Allows the user to specify under which parent group, within the Information Tree, the layer should be created. The default is set to zero meaning, if unspecified, the layer is created in the root of the tree. The IParentGroupID must be a valid group id.
pILayer – An interface pointer to the newly created layer. This parameter must not be Null.
Return Values:
The return value obtained from the returned HRESULT can be one of the following:
Return value |
Meaning |
S_OK |
Success. |
E_FAIL |
Catastrophic failure. |
TE_E_NOLICENSE |
You are running TerraExplorer Viewer and therefore do not have permission to work with this interface. |