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.
HRESULT LoadFlyLayer(
[in] BSTR FlyFile,
[in, defaultvalue(0)] long ParentGroupID)
Parameters:
FlyFile – A full path name or a URL to the FLY file to load.
ParentGroupID – The Information Tree group in which to put the objects from the imported FLY file. If set to zero, the object is created under the root. The layer objects are put in a group with the name of 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 if you know the name of the group using IInformationTree5::FindItem.
Traverse the Tree using IInformationTree5 methods such as GetNextItem(), until you come to the desired GroupID.
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. |