Skip To Content ArcGIS for Developers Sign In Dashboard

ArcGIS Runtime SDK for .NET

Add online KML Layer

Download Samples Repository

Description

This sample demonstrates adding an online KML layer to the map

"Desktop" Available for Desktop

Sample Code

<UserControl x:Class="ArcGISRuntime.Samples.Desktop.AddKMLLayer"
             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="http://earthquake.usgs.gov/earthquakes/feed/v1.0/summary/1.0_week_age_link.kml"/>
			</esri:Map>
		</esri:MapView>
	</Grid>
</UserControl>
using System;
using System.Windows.Controls;
using Esri.ArcGISRuntime.Layers;

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