ComponentOne Maps for WinForms
Layers / Vector Layer / KML Import and Export
In This Topic
    KML Import and Export
    In This Topic

    KML is an XML-based language for geographic visualization and annotation that was originally created for Google Earth. For more information, see https://developers.google.com/kml/documentation.

    KML allows you to create choropleth maps based on statistical data. You can perform KML import using the C1.FlexMap.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 VectorLayer. 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:

    In addition, oyu can perform KML export using the 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: