laptop and a wrench

漏洞

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

上次发布: November 30, 2018 ArcGIS API for JavaScript
漏洞 ID 编号 BUG-000115609
已提交July 24, 2018
上次修改时间June 5, 2024
适用范围ArcGIS API for JavaScript
找到的版本4.7
操作系统Windows OS
操作系统版本10.0
状态Non-Reproducible

附加信息

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

解决办法

  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.

重现步骤

漏洞 ID: BUG-000115609

软件:

  • ArcGIS API for JavaScript

当漏洞状态发生变化时获得通知

下载 Esri 支持应用程序

发现关于本主题的更多内容

获取来自 ArcGIS 专家的帮助

联系技术支持部门

下载 Esri 支持应用程序

转至下载选项