漏洞
| 漏洞 ID 编号 | BUG-000124573 |
|---|---|
| 已提交 | August 16, 2019 |
| 上次修改时间 | June 5, 2024 |
| 适用范围 | ArcGIS API for JavaScript |
| 找到的版本 | 4.12 |
| 操作系统 | Windows OS |
| 操作系统版本 | 10.0 |
| 状态 | Non-Reproducible |
Using a while loop with an iterator to prevent layerview.watch() from firing multiple queries causing the parcel pop-up glitch.
let t = 0;
searchWidget.on("search-complete", (event) => {
let resultGeometry = event.results[0].results[0].feature.geometry;
mapView.whenLayerView(layer).then((layerView) => {
console.log(layerView)
layerView.watch("updating", (val) => {
if (!val) { // wait for the layer view to finish updating
while(t === 0){
t++;
layerView.queryFeatures({
geometry: resultGeometry,
returnGeometry: true
}).then((results) => {
console.log(results);
layerView.highlight(results.features);
console.log('opening popup');
mapView.popup.open({
features: [results.features[0]],
location: results.features[0].geometry.centroid
})
});
}
}
});
});
});
漏洞 ID: BUG-000124573
软件:
获取来自 ArcGIS 专家的帮助
下载 Esri 支持应用程序