laptop and a wrench

Erro

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

Última Publicação: November 30, 2018 ArcGIS API for JavaScript
Número de ID do Erro BUG-000115609
EnviadoJuly 24, 2018
Última ModificaçãoJune 5, 2024
Aplica-se àArcGIS API for JavaScript
Versão encontrada4.7
Sistema OperacionalWindows OS
Versão do Sistema Operacional10.0
StatusNon-Reproducible

Informações Adicionais

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

Solução Provisória

  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.

Etapas para Reproduzir

ID do Erro: BUG-000115609

Software:

  • ArcGIS API for JavaScript

Seja notificado quando o status de um erro mudar

Baixe o Aplicativo de Suporte da Esri

Descubra mais sobre este tema

Obtenha ajuda de especialistas do ArcGIS

Entre em contato com Suporte Técnico

Baixe o Aplicativo de Suporte da Esri

Ir para as opções de download