laptop and a wrench

Bogue

Unable to access a feature’s attributes in a PopupTemplate while using a function to set content for MapImageLayer.

Dernière publication: November 30, 2018 ArcGIS API for JavaScript
Numéro d’ID de bogue BUG-000115609
EnvoiJuly 24, 2018
Dernière modificationJune 5, 2024
S’applique àArcGIS API for JavaScript
Version trouvée4.7
Système d’exploitationWindows OS
Version du système d’exploitation10.0
StatutNon-Reproducible

Informations supplémentaires

Please use the PopupTemplate.outFields property as described in https://developers.arcgis.com/javascript/latest/api-reference/esri-PopupTemplate.html#outFields to fix this.

Solution de contournement

  1. Use FeatureLayer class and add them to the map instead of MapImageLayer. This works in versions 4.6 to 4.8
  2. Open the sample application at - https://jsbin.com/qazoxisefo/edit?html,output
  3. The popup returns the population in year 2000 correctly.
  4. Change the API version to 4.7 and then to 4.8 and run again.                                                 
  5. The sample works correctly in the 4.7 and 4.8 version as well. 

Checking the feature.graphic.attributes shows all the attributes. This can be verified by putting a breakpoint in debugger mode at line number 55,  and checking the value of the feature object.

Étapes pour reproduire

ID de bogue: BUG-000115609

Logiciel:

  • ArcGIS API for JavaScript

Recevoir une notification lorsque le statut d’un bogue change

Télécharger l’application Esri Support

En savoir plus sur ce sujet

Obtenir de l’aide auprès des experts ArcGIS

Contacter le support technique

Télécharger l’application Esri Support

Accéder aux options de téléchargement