Stepping through it, I can see that this line:
var featureSet = new esri.tasks.FeatureSet({
features: results.features
});
is stripping the geometry from the results, meaning that the feature layer has no geometry.
function selectShowResults(results) {
//Create a feature layer from the results
var graphics = [];
var sfs = new esri.symbol.SimpleFillSymbol(esri.symbol.SimpleFillSymbol.STYLE_SOLID,
new esri.symbol.SimpleLineSymbol(esri.symbol.SimpleLineSymbol.STYLE_DASHDOT,
new dojo.Color([255,0,0]), 2),new dojo.Color([255,255,0,0.25]));
var infoTemplate = new esri.InfoTemplate();
for (var i = 0; i < results.features.length; i++) {
var feature = results.features;
var graphic = new esri.Graphic(feature.geometry,sfs,feature.attributes,infoTemplate);
graphics.push(graphic);
}
var sr = new esri.SpatialReference(102100);
var featureSet = new esri.tasks.FeatureSet({
geometryType: "esriGeometryPolygon",
features: graphics,
spatialReference: sr
});
Still no luck, though.... Thanks for any advice.