laptop and a wrench

漏洞

The suggestQueryParams property of the Search widget does not work as expected.

上次发布: August 2, 2017 ArcGIS API for JavaScript
漏洞 ID 编号 BUG-000104601
已提交April 20, 2017
上次修改时间June 5, 2024
适用范围ArcGIS API for JavaScript
找到的版本3.20
操作系统Windows OS
操作系统版本10.0 64 Bit
修正版本4.4
状态Fixed

解决办法

In versions 3.20 and 4.3, use the esriRequest.setRequestPreCallback to append the needed SQL to the queryTask generated by the Search widget. Samples of both these workflows are below. // Version 3.20<a href="http://jsbin.com/kevewef/2/edit?js,output" target="_blank">http://jsbin.com/kevewef/2/edit?js,output</a> // Version 4.30<a href="http://jsbin.com/yulejo/2/edit?js,output" target="_blank">http://jsbin.com/yulejo/2/edit?js,output</a>In addition to the above workarounds there are also workarounds for specific versions. In version 3.20, leverage a defintionQuery against the FeatureLayer used in the Search widget. The definitionQuery was automatically appended to the QueryTask sent by the Search widget. Version 3.20<a href="http://jsbin.com/ramime/1/edit?js,output" target="_blank">http://jsbin.com/ramime/1/edit?js,output</a>In version 4.3 post-process the Suggestions by wiring into the suggest-complete event and removing the un-needed suggestions from the results array. Version 4.3<a href="http://jsbin.com/qobaji/5/edit?js,output" target="_blank">http://jsbin.com/qobaji/5/edit?js,output</a>

重现步骤

漏洞 ID: BUG-000104601

软件:

  • ArcGIS API for JavaScript

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

下载 Esri 支持应用程序

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

获取来自 ArcGIS 专家的帮助

联系技术支持部门

下载 Esri 支持应用程序

转至下载选项