PROBLEM

Exporting a hosted feature layer to KML does not preserve the original features

Last Published: April 25, 2020

Description

In some instances, when exporting a hosted feature layer to KML using the Export to KML option in the ArcGIS Online item details page, the output KML layer does not preserve the original features of the feature layer.

The following image shows an original hosted feature layer in Map Viewer.

An image of the hosted feature layer.

The image below shows the same layer exported KML layer in Map Viewer.

An image of the exported KML layer.

Cause

This is a known issue. The exported KML layer does not preserve the features of the hosted feature layer if it contains multipart features. For more information, refer to BUG-000116251.

Solution or Workaround

To resolve this issue, use one of the following options:

Use the Layer To KML tool in ArcMap or ArcGIS Pro
This option uses the Layer To KML tool in ArcGIS Desktop to convert the hosted feature layer to a KML file. The output KML file must be added to My Content for use in ArcGIS Online.

  1. In ArcGIS Online, export the hosted feature layer to a shapefile, and download the shapefile to save it in a local folder. Refer to Export data from hosted feature layers for steps to do this.
Note:
The downloaded shapefile is in a ZIP file. To use the shapefile in ArcMap or ArcGIS Pro, extract the ZIP file to a folder.
  1. In ArcMap or ArcGIS Pro, add the shapefile downloaded in Step 1 to the map or project.
  2. Convert the shapefile to KML using the Layer To KML tool. Refer to How To: Convert shapefiles to KML.
  3. In ArcGIS Online, add the KML file to My Content to use it in ArcGIS Online. Refer to Add files from your computer, and select the KML file to upload.
  4. Open the KML file in Map Viewer to display the data.

Use the Extract Data tool in the ArcGIS Online web app
This option uses the Extract Data tool from the Analysis widget in the ArcGIS Online web app to extract the hosted feature layer to KML.

Note:
Using a spatial analysis service consumes credits. Refer to Service Credits Overview for more information on credits.
  1. In ArcGIS Online, create a web app from Map Viewer containing the hosted feature layer using Web AppBuilder, and add the Extract Data tool:
    1. Create a web app containing the hosted feature layer. Refer to Create your first app.
    2. Click the Widget tab, and click the first Widget box.
An image of the Widget configuration panel.
  1. In the Choose Widget dialog box, select the Analysis widget, and click OK.
  2. In the Configure Analysis dialog box, check the check box for Extract Data and other tools if required, and click OK.
  3. Click Save to save the web app, and click Launch.
  1. In the launched web app, click the Analysis widget to use the Extract Data tool.
    1. In the Analysis pane, check the checkbox for the hosted feature layer to extract to KML in Layers to extract.
    2. Set the Output data format to KML (.kmz or .zip), and set the Output file name.
    3. Select a desired location for Save result in to locate the output file, and click Run Analysis.
The extracted KML file is saved and located in the set output location.
  1. Open the KML file in Map Viewer to display the data.

Article ID:000019351

Software:
  • ArcMap
  • ArcGIS Pro
  • ArcGIS Online

Get help from ArcGIS experts

Contact technical support

Download the Esri Support App

Go to download options