Hi Kirsten, if I may we've been doing something similar since about 3.7:
function showZones(evt) {
mapMain.graphics.clear();
if (evt.source.name == "Search by House Address" || evt.source.name == "Search by Street Address") {
qPoint = evt.result.feature.geometry;
var queryElemZones = new Query;
queryElemZones.geometry = qPoint;
var elemQuery = lyrElemZones.selectFeatures(queryElemZones,FeatureLayer.SELECTION_NEW);
mapMain.infoWindow.setFeatures([elemQuery]);
mapMain.infoWindow.show(qPoint);
elemQuery = lyrElemZones.selectFeatures(queryElemZones,FeatureLayer.SELECTION_SUBTRACT);
}
This shows how we take the return geometry from an returned address and then use that to select the intersecting features, in this case a school zone. Set the features in the infoWindow and show the window at the point return location.
For 4.x, selectFeature method is not yet available for feature layer so the only option is to employ a queryFeatures method, something I'm still working on. Here, we are using an address return point as an input to a buffer, then using the extent of the buffer to intersect and return features:
function showResults(evt) {
app.activeView.graphics.clear;
console.log(app.search.sources);
if (app.search.sources.items[0].name == "Search by Address") {
console.log(app.search.sources);
var qPoint = evt.results[0].results[0].feature.geometry;
console.log(qPoint);
buffer = geometryEngine.geodesicBuffer(qPoint, [1], 9035, true);
var symbol = new SimpleFillSymbol({
color: [100,100,100,0.15],
style: "solid",
outline: {
color: "white",
width: 0
}
});
graphicPoly = new Graphic({
geometry: buffer,
symbol: symbol,
});
app.activeView.graphics.add(graphicPoly);
var queryTran = new Query;
queryTran.geometry = buffer;
queryTran.spatialRelationship = "intersects";
var tranQuery = lyrMobBnds.queryFeatures(queryTran).then(function(tranResult) {
console.log(tranResult);
if (tranResult && tranResult.features.length > 0) {
app.activeView.popup.open({
features: tranResult.features,
location: qPoint
});
}
});
}
}
But I can't seem to figure out how to pass the results' return array and set that in my popup as opposed to the search result's return address. I don't know if this will help you but maybe if there are more eyes on this some will have some ideas.