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.
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?