Load and display KML from a URL, a local file, or a portal item.
Use the UI to select a source. A KML file from that source will be loaded and displayed in the map.
- KmlLayer
- KmlLayer(Uri)
- KmlLayer(PortalItem)
This sample uses US state capitals KML file. It is downloaded from ArcGIS Online automatically.
This sample displays three different KML files:
- From URL - this is a map of the significant weather outlook produced by NOAA/NWS. It uses KML network links to always show the latest data.
- From local file - this is a map of U.S. state capitals. It doesn't define an icon, so the default pushpin is used for the points.
- From portal item - this is a map of U.S. states.
KML, OGC, KMZ, Keyhole