The Search widget does not honor filter by where clause and filter by geometry in ArcGIS API for JavaScript 3.21.
上次发布: August 18, 2017ArcGIS API for JavaScript
漏洞 ID 编号
BUG-000106693
已提交
July 19, 2017
上次修改时间
June 5, 2024
适用范围
ArcGIS API for JavaScript
找到的版本
3.21
状态
Will Not Be Addressed
开发团队已考虑过该问题或请求,并决定不会解决该问题。 问题的“其他信息”部分可能包含进一步说明。
附加信息
The filter property should only have been doc'd for 4.x. SearchQueryParams and suggestQueryParams has been deprecated for 3.x. To get around this, please you can use the esriRequest.setRequestPreCallback
Documentation will be updated to reflect that 3.x does not include this property.
解决办法
Set definition expression for the feature layer and use the feature layer in the Search widget's sources. This workaround however does not work for filter by geometry.sources: [{ featureLayer: new FeatureLayer("<a href="https://sampleserver6.arcgisonline.com/arcgis/rest/services/EmergencyFacilities/MapServer/0" target="_blank">https://sampleserver6.arcgisonline.com/arcgis/rest/services/EmergencyFacilities/MapServer/0</a>", { outFields: ["*"], infoTemplate: new InfoTemplate("Emergency Facilities", "facname: ${facname}organiz: ${organiz}",definitionExpression: "organiz = 'City of Redlands'") }), searchFields: ["facname"], placeholder: "Redlands Community Hospital", name: "Emergency Facilities" }]