The outFields example in the PopupTemplate sets that property outside of the popupTemplate property of the sublayer for some reason. USALayer = new MapImageLayer({
url: "https://sampleserver6.arcgisonline.com/arcgis/rest/services/USA/MapServer",
id: "USA",
sublayers: [{
id: 2,
visible: true,
popupTemplate: {
title: "{state_name} Population",
content: getInfo
},
outFields: ["*"]
}]
}) outFields does work though, but I was in the same boat as Leo since I just blindly followed the example. After reading your answer I realized there was no reason to put it outside of the popupTemplate. Thanks!
... View more