I want to activate pop up for a selected feature, move the map to show the popup location, and then if i choose to use the zoom to function to go to the feature.
Unfortunately it throws an error: "Cannot center at a location without a target and view."
Here is what i have so far:
var fl = this.view?.map.findLayerById(data.featureLayerGroup.id);
fl.queryFeatures({ where: "id = '" + data.id + "'" }).then(results => {
if (results.features.length) {
this.view?.popup.open({
features: results.features
});
}
}
);
I been going through the docs but cannot find the solution