Set Display Name in output KML

02-19-2019 09:57 AM
by Anonymous User
Not applicable

I cannot get the correct display name to show at the top of a KML popup in Google Earth or ArcGIS Earth from a feature service in AGS.  The goal is to have one field chosen to provide a case number that would display above all the other attributes on the popup when the user clicks on a KML points in Google Earth.

Server version: AcrGIS Server 10.4.1 and ArcGIS Server 10.3.1 (I tried both)

First, I must say that I understand the Display Name property must be set within ArcMap for the layer before publishing the feature service to AGS.  I have done that.

The original workflow for the client was to use a custom built Geoprocessing tool made with Python to export either a shapefile or KML file of selected records that the user selected on a custom web map application.  The Javascript calls the GP tool which utilizes the LayerToKML_conversion arcpy tool.  This did not produce the desired results.  When I only return a few fields the display name shows up fine.  When I include the almost 40 fields to the output there is no header displayed at all.

Next, I tried a process where the application makes a KMZ query directly to the REST end point of the layer and returns the KMZ to the user.  This does not work as well.  No header display name displays in Google earth.  Is this possibly a limitation of the KMZ export and is there a messy way to do this with parsing the KML and setting the display name?

0 Kudos
1 Reply
New Contributor

From the layers in the table of content, right click and go to the properties, then go to the labels and change the field name to your prefer output display name. You can export your data as KML and it will maintain the output you chose.

0 Kudos