KML support in ArcGIS Server

Keyhole Markup Language (KML) is an XML-based file format used to represent geographic features in applications such as ArcGIS Explorer and Google Earth. KML allows you to draw points, lines, and polygons on maps and globes and share them with others. Using KML you can also designate text, pictures, movies, or links to other GIS services that appear when the user clicks the feature. Many KML client applications are free and provide a familiar, user-friendly navigation experience.

What can you do with KML using ArcGIS Server

ArcGIS Server allows you to share your maps and data as KML in several ways:

In all these cases, the KML is dynamically generated, meaning that users who view the KML will always see the latest maps and data from your server. If you just want to generate static KML documents that you can e-mail or place on a file server, you can use the Map To KML and Layer To KML tools in ArcGIS for Desktop.

Configuring map and image services to return KML

To share your maps and imagery as dynamic KML, all you have to do is publish them as services using ArcGIS for Desktop. Both map services and image services can return KML. By default, the KML capability is enabled when you publish these services to your server.

Before you publish the services, you'll need to do some preparatory work. Map services require that you first prepare a map document containing the layers you want to make available as KML. In this map document, you can specify specific labeling, rendering, symbology, and HTML pop-up window properties that will be reflected in your KML. Three-dimensional properties need to be set in ArcGlobe and imported as layer files into your map document.

Learn more about authoring maps for publishing as KML

Image services require a raster dataset, mosaic dataset, or layer file referencing a raster dataset or mosaic dataset. You might prefer to use a layer file to define a specific renderer to ensure the image service looks the way you want it to.

KML through REST

All map and image services expose a KML network link through REST. Simply put, REST is a way of exposing information about your services through a series of navigable URLs. You can discover the URL to the network link using the Services Directory, which is an application designed to help you navigate the REST endpoints on your server. The URL points to a .kmz file that you can add to Google Earth or any other client that supports KML network links.

If you don't want to use the default network link, you can use Manager or the Services Directory to generate your own. See Viewing services as KML to learn more about REST, KML network links, and how ArcGIS Server works with both.

Viewing what's available on your server

Through the Services Directory, you can also view the footprints of all the map and image services on your server. Additionally, you can access a footprint KML network link that displays locations and descriptions of your services. You can use this footprint network link as a guide to show others what's available on your server.

Geocoding, geoprocessing, and query results as KML

Map services can return the results of geoprocessing, geocoding, and query operations as KML. These services can be used in client applications and can also be used directly by analysts typing in REST URLs. This is a good way to allow applications and users to selectively retrieve information from online geodatabases in KML format.

KML service operations

KML services have built-in operations that allow KML clients to perform various requests on the server. When publishing your maps and imagery, the SeparateImages, SingleImage, and Vectors operations are enabled by default.

You can disable any one of these operations by accessing the KML tab of the Service Editor in ArcGIS for Desktop.

Supported KML functionality

Below is a list of the functionality supported with KML services:

3/3/2014