Erro
| Número de ID do Erro | BUG-000124573 |
|---|---|
| Enviado | August 16, 2019 |
| Última Modificação | June 5, 2024 |
| Aplica-se à | ArcGIS API for JavaScript |
| Versão encontrada | 4.12 |
| Sistema Operacional | Windows OS |
| Versão do Sistema Operacional | 10.0 |
| Status | 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 do Erro: BUG-000124573
Software:
Obtenha ajuda de especialistas do ArcGIS
Baixe o Aplicativo de Suporte da Esri