When you publish a map service from ArcGIS Pro, you can control the popup field options that get displayed when viewing said map in the "Map Viewer Classic" page, as seen in the image below. When in Map Viewer Classic, you can click on the map and the pop will only show those fields, so somehow Map Viewer Classic knows which fields are set to be shown and which ones are not.

ArcGIS Pro Field Options

I'm trying to duplicate this behavior in a custom web application that uses the ArcGIS JSAPI SDK, but for some reason I am only getting the DisplayName property and not the others I'm expecting. The line of code that I have doing the query is:

window.GIS.Query.executeQueryJSON(service.Url + "/" + service.Id, { geometry: window.GIS.MapView.toMap(e), distance: 2, spatialRelationship: "intersects", returnGeometry: true })

I have not found anything by looking at the Feature Layer properties that indicates the default fields to be shown when the outFields property is not defined and I do not want to define the outFields property because I want the Map Service to define what should be in the popup.

Is there something I should be doing or looking for that explains why I do not get the same behavior?

1 Answer 1


After publishing a test map service and using the console to inspect the network traffic, I finally discovered that the popup definitions are not published with the map service itself, but instead with the web map layer in either ArcGIS Online or Portal for ArcGIS (which is what I'm using). So in order to get the popup definitions, you needs to query the web map layer and not the map service itself in order to obtain the needed information.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.