Add local KML Layer

Download Samples Repository

Description

This sample demonstrates how to add a local KML layer to the map

"Desktop" Available for Desktop

Sample Code

<UserControl x:Class="ArcGISRuntime.Samples.Desktop.AddLocalKMLLayer"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
             xmlns:esri="http://schemas.esri.com/arcgis/runtime/2013"
             mc:Ignorable="d" >
    <Grid>
		<esri:MapView x:Name="MyMapView">
			<esri:Map>
				<esri:ArcGISTiledMapServiceLayer ServiceUri="http://services.arcgisonline.com/arcgis/rest/services/World_Topo_Map/MapServer"/>
				<esri:KmlLayer SourceUri="..\..\..\samples-data\kml\Volcanoes.kml"/>
			</esri:Map>
		</esri:MapView>
	</Grid>
</UserControl>
using System;
using System.Windows.Controls;

namespace ArcGISRuntime.Samples.Desktop
{
	/// <summary>
	/// This sample demonstrates how to add a local KML layer to the map
	/// </summary>
	/// <title>Add local KML Layer</title>
	/// <category>Layers</category>
	/// <subcategory>Kml Layers</subcategory>
	public partial class AddLocalKMLLayer : UserControl
	{
		public AddLocalKMLLayer()
		{
			InitializeComponent();
		}
	}
}
Feedback on this topic?