laptop and a wrench

Bug

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

Zuletzt veröffentlicht: November 30, 2018 ArcGIS API for JavaScript
Bug-ID-Nummer BUG-000115609
EingereichtJuly 24, 2018
Zuletzt geändertJune 5, 2024
Gilt fürArcGIS API for JavaScript
Gefunden in Version4.7
BetriebssystemWindows OS
Betriebssystemversion10.0
StatusNon-Reproducible

Zusätzliche Informationen

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

Workaround

  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.

Schritte zur Reproduzierung

Bug-ID: BUG-000115609

Software:

  • ArcGIS API for JavaScript

Benachrichtigung erhalten, wenn sich der Status eines Bugs ändert

Esri Support App herunterladen

Weitere Informationen zu diesem Thema erkunden

Unterstützung durch ArcGIS-Experten anfordern

An den technischen Support wenden

Esri Support App herunterladen

Zu Download-Optionen wechseln