Display KML network links
Display a file with a KML network link, including displaying any network link control messages at launch.
KML files can reference other KML files on the network and support automatically refreshing content. For example, survey workers will benefit from KML data shown on their devices automatically refreshing to show the most up-to-date state. Additionally, discovering KML files linked to the data they are currently viewing provides additional information to make better decisions in the field.
The sample will load the KML file automatically. The data shown should refresh automatically every few seconds. Pan and zoom to explore the map.
- Create a
KmlDatasetfrom a KML source which has network links.
- Construct a
KmlLayerwith the dataset and add the layer as an operational layer.
- To listen for network messages, add an event handler to the
NetworkLinkControlMessageevent on the dataset.
This sample uses the radar.kmz file, which can be found on ArcGIS Online.
This map shows the current air traffic in parts of Europe with heading, altitude, and ground speed. Additionally, noise levels from ground monitoring stations are shown.
Keyhole, KML, KMZ, Network Link, Network Link Control, OGC
<?xml version="1.0" encoding="utf-8"?> <ContentPage xmlns="http://xamarin.com/schemas/2014/forms" xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml" xmlns:esriUI="clr-namespace:Esri.ArcGISRuntime.Xamarin.Forms;assembly=Esri.ArcGISRuntime.Xamarin.Forms" x:Class="ArcGISRuntimeXamarin.Samples.DisplayKmlNetworkLinks.DisplayKmlNetworkLinks"> <Grid> <esriUI:SceneView x:Name="MySceneView" /> </Grid> </ContentPage>