CreateKMLLayer

Loads a KML layer into the project. KML layers loaded into a project are always read directly from the local or remote data source. KML is an XML grammar and file format for modeling and storing geographic features such as points, lines, images and polygons. KML is an OGC standard that is publically defined. See: http://www.opengeospatial.org/standards/kml.

 

JavaScript

 

CreateKMLLayer(

       Path,

       GroupID)

 

C#

 

IKMLLayer66 CreateKMLLayer(

       string Path,

       [string GroupID = ""])

 

C++

 

HRESULT CreateKMLLayer(

       BSTR Path,

       BSTR GroupID,

       IKMLLayer66 ** pIKMLLayer)

Parameters

Path

A full path name or a URL to the KML layer file to load.

GroupID

The Project Tree group in which the layer is created. If it is set to an empty string, the object is created under the root. You can obtain the GroupID by one of the following methods:

·          Create the group using IProjectTree66.CreateGroup.

·          Find the group, if you know the name, using IProjectTree66.FindItem.

·          Traverse the Tree using IProjectTree66 methods such as GetNextItem, until you come to the desired GroupID.

Return Value

pIKMLLayer

An IKMLLayer66 representing the newly created layer.

Exceptions

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