laptop and a wrench

漏洞

FeatureLayer fails to draw when modifying a query via esriRequest.setRequestPreCallback.

上次发布: October 15, 2019 ArcGIS API for JavaScript
漏洞 ID 编号 BUG-000104611
已提交April 20, 2017
上次修改时间June 5, 2024
适用范围ArcGIS API for JavaScript
找到的版本3.20
操作系统Windows OS
操作系统版本10.0 64 Bit
状态Will Not Be Addressed

附加信息

The problem is that setPreRequestCallback does not just intercept the query request, it intercepts other requests and not all of those requests have a where property on the content. Some checks need to be added to the setPreRequestCallback function to ensure a query task request. To test this in the sample app (http://jsbin.com/zisoqib/3/edit?js,output) just surround the var y with an if statement as follows. esriRequest.setRequestPreCallback(function (ioArgs) { var x = ioArgs.url.endsWith("query"); if(ioArgs.content && ioArgs.content.where){ var y = ioArgs.content.where.startsWith("xxx"); } return ioArgs; });

解决办法

Setting a definitionExpression on the layer causes the layer to render in the map. See this in the sample provided at http://jsbin.com/zisoqib/3/edit?js,output. Uncommenting both the definitionExpression within the properties of the layer and the line with the ioArgs.content.where, the layer renders in the map without issues.

重现步骤

漏洞 ID: BUG-000104611

软件:

  • ArcGIS API for JavaScript

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

下载 Esri 支持应用程序

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

获取来自 ArcGIS 专家的帮助

联系技术支持部门

下载 Esri 支持应用程序

转至下载选项