I'm struggling with an ArcGIS JavaScript API 4.4 popup.
There are dozens of attributes on dozens of layers, which is a lot of coding if I have to specifically mention and format every single one. I want to bring in every attribute that is published in a given feature layer, and thought this would work:
var infoPopup = new PopupTemplate({ title: "Feature Attributes", content: "{*}" }); var layerPole = new FeatureLayer({ url: "http://****/arcgis/rest/services/Click/XY_Rewrite/MapServer/22", opacity: 0.9, popupTemplate: infoPopup }); I was thrilled when it looked like it worked...
... but on further examination, that's only three of the 34 attributes published in the map service. There's no apparent reason those three were chosen -- they aren't all the same type, they aren't the first three in the field list, etc.
- OBJECTID ( type: esriFieldTypeOID , alias: OBJECTID )
- CREATIONWORKREQUESTID ( type: esriFieldTypeString , alias: Creation Work Request ID , length: 10 )
- LASTWORKREQUESTID ( type: esriFieldTypeString , alias: Last Work Request ID , length: 10 )
- G_KEY ( type: esriFieldTypeInteger , alias: G_KEY )
- SUBTYPECD ( type: esriFieldTypeInteger , alias: Subtype )
- SYMBOLROTATION ( type: esriFieldTypeDouble , alias: Symbol Rotation )
- MATERIAL ( type: esriFieldTypeString , alias: Material , length: 5 , Coded Values: [WD: Wood] , [ST: Steel] , [FG: Fiberglass] , ...3 more... )
- CLASS ( type: esriFieldTypeString , alias: Class , length: 5 , Coded Values: [4: Class 4 Pole] , [0: Class 0 Pole] , [00: Class 00 Pole] , ...7 more... ) POLENUMBER ( type: esriFieldTypeString , alias: Pole Number , length: 20 )
- (etc)
What's wrong with this JavaScript popup, what's wrong with my map service, or is there a better way to drop all published attributes into a popup template ?

