Hello
I am trying to open popup using view.popup.open by querying through the sample code given below.
layer.when(()=>{
layer.queryFeatures().then((results: any) => {
const features = results.features;
features.forEach((result: any) => {
const oid = result.attributes.OBJECTID;
if (oid == this.id) {
console.log(result);
view.popup.open({
features: result,
location: result.geometry.centroid,
fetchFeatures: true,
shouldFocus: true,
});
}
});
});
})
In this console statement I am getting the exact feature I want but view.popup.open is not showing the popup. Can anyone please help me with this?
Thanks in advance.