Skip to main content

How to: Load Data from a KML File

To load data from a KML file, do the following:

Note

Make sure that the Build Action property of a KML file is set to Resource.

<dxm:MapControl   CenterPoint="40.689830, -74.045229" ZoomLevel="16">
    <dxm:ImageTilesLayer>
        <dxm:ImageTilesLayer.DataProvider>
            <dxm:BingMapDataProvider BingKey="YOUR BING KEY HERE"/>
        </dxm:ImageTilesLayer.DataProvider>
    </dxm:ImageTilesLayer>
    <!--region #KmlFileDataAdapter-->
    <dxm:VectorLayer>
        <dxm:KmlFileDataAdapter FileUri="kmlFile.kml" />
    </dxm:VectorLayer>
    <!--endregion #KmlFileDataAdapter-->
</dxm:MapControl>
See Also