KML is an XML-based language for geographic visualization and annotation that was originally created for Google Earth. For more information, see http://code.google.com/apis/kml/documentation.
KML import is performed by KmlReader class that has static methods that create collection of vector objects from the supplied KML source (string or stream). The collection can be easily added to the C1VectorLayer. The DataContext of the imported object is set to the corresponding XElement from the KML source so you can use the original element to perform custom operation during import.
Import limitations:
•Only KML Placemark elements are supported.
•Inner polygons are not supported.
•Icons are not supported.
•External links are not supported.
KML export is performed by KmlWriter class, which has static methods that write the collection of vector objects to the provided stream in KML format.
The KmlWriter.Write() method has parameter saveElementCallback that allows you to perform custom operations during export. The method is called for each element that is saved in KML stream. For example, using the callback method you can add KML custom data to the elements.
Export limitation:
•C1VectorPlacemark.Geometry is not saved in KML stream.