Keyhole Markup Language (KML) is an XML-based format for storing geographic data and associated content and is an official Open Geospatial Consortium (OGC) standard. KML is a common format for sharing geographic data with non-GIS users as it can be easily delivered on the Internet.

Referenced by: operationalLayers

Properties

PropertyDetails
idA unique identifying string for the layer.
itemIdA string containing the item ID of the service if it’s registered on ArcGIS Online or your organization’s portal.
layerTypeString indicating the layer type.
Valid value of this property KML
listModeTo show or hide the sublayer in the layer list.
Valid values:
  • hide
  • show
maxScaleA number representing the maximum scale at which the layer will be visible. The number is the scale’s denominator.
minScaleA number representing the minimum scale at which the layer will be visible. The number is the scale’s denominator.
opacityThe degree of transparency applied to the layer on the client side, where 0 is full transparency and 1 is no transparency.
pathFor offline data, a path to a KML file. A URI format is used, starting with file: followed by a file system path with an extension of .kml or .kmz. A relative path must be from the file which defines the layer. For example file:../commondata/kml/paris.kml.
refreshIntervalRefresh interval of the layer in minutes. Non-zero value indicates automatic layer refresh at the specified interval. Value of 0 indicates auto refresh is not enabled.
showLegendIndicates whether to allow scene authors the ability to control what layers should be shown in a client’s legend.
titleA user-friendly string title for the layer that can be used in a table of contents.
urlThe URL to the layer.
visibilityBoolean property determining whether the layer is initially visible in the web scene.
visibleFolders[]Array of numeric IDs of folders that will be made visible.

KML Layer Example

{
"id": "87a5bcad920440f293a36ff3fea1a4f8",
"title": "Paris",
"visibility": true,
"layerType": "KML",
"path": "file:../commondata/kml/paris.kml"
}