Load Vector Data from a KML File
This document describes the basics of working with KML files using the Map Control.
This subject has been broken down into the following sections.
Overview
Using the Map control, you can load and depict any set of geographic visualization data (placemarks, polygons, images, textual descriptions, etc.) stored in the KML (Keyhole Markup Language) format. KML files have a tag-based structure with nested elements (similar to the XML standard).
Note
For more information, see the following link: KML Documentation.
One of the common usage scenarios for the KML format is to display vector data above an image tiles map. For instance, the image below shows a shape loaded from a KML file.
Load KML File Data
To load vector data from a KML file, do the following.
- Create a KmlFileDataAdapter object.
- Specify the path to a KML file using the FileDataAdapterBase.FileUri property.
- Assign the KmlFileDataAdapter to the VectorItemsLayer.Data property.
Examples
To learn how to load KML file data to a Map Control, see the How to: Load Data from a KML File example.