Loads a Fly or KML file into the current project. All the objects from the FLY file, including locations, routes and hyperlinks, are added. See: “Feature Layers” chapter in the User Manual for additional information about supported KML elements. The method returnes the Info Tree item ID of the new group that includes the FLY contents.
HRESULT LoadFlyLayerEx(
[in] BSTR FlyFile,
[in, optional, defaultvalue(0)] long ParentGroupID,
[out, retval] long* pItemID)
Parameters:
FlyFile – A full path name or a URL of the FLY file. When you access files in the “Skyline\TerraExplorer” folder which is located in the “Application Data” space of the current user, use [TE Application Data] as part of the path (e.g., “[TE Application Data]\MyFly.fly”). This is useful for files that were saved using the SaveFlyLayer.
ParentGroupID – The Information Tree group to which the objects from the imported FLY file are added. If set to zero, the group is created under the root. The layer objects are added to a group named with the same name as the FLY file (e.g., for the file “C:\MyFly.fly”, a new group named “MyFly” is created), and maintain the same internal group hierarchy as the loaded file. You can obtain the GroupID by one of the following methods:
Create the group using IInformationTree5::CreateGroup.
Find the group, providing you know the name of the group using IInformationTree5::FindItem.
Traverse the Tree using IInformationTree5 methods such as GetNextItem(), until you reach the desired GroupID.
pItemID – The returned ID of the newly created group which contains the Fly object.
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_MPTNOTLOADED |
An MPT file must be loaded in TerraExplorer for this method to work. |
TE_E_NOLICENSE |
You are running TerraExplorer Viewer and therefore do not have permission to work with this interface. |