laptop and a wrench

Error

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

Última publicación: November 30, 2018 ArcGIS API for JavaScript
Número de ID del error BUG-000115609
EnviadoJuly 24, 2018
Última modificaciónJune 5, 2024
Relacionado conArcGIS API for JavaScript
Versión encontrada4.7
Sistema operativoWindows OS
Versión de sistema operativo10.0
EstadoNon-Reproducible

Información adicional

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

Solución alternativa

  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.

Pasos para reproducir

ID del error: BUG-000115609

Software:

  • ArcGIS API for JavaScript

Recibir notificaciones cuando cambie el estado de un error

Descargar la aplicación de soporte de Esri

Descubrir más sobre este tema

Obtener ayuda de expertos en ArcGIS

Contactar con el soporte técnico

Descargar la aplicación de soporte de Esri

Ir a opciones de descarga