I have a filter by points working so when a user types something into a text box and hits a button it queries the map and zooms them to the queried results. This works fine for multiple points but is not working when the result is just a single point. Below is my code. Thanks in advance!
//remove all graphics on the maps graphics layer
map.graphics.clear();
var extent = esri.graphicsExtent(featureSet.features);
map.setExtent(extent.expand(1), true);
You must create new extent and expand that single point like this.
var newExtent = new esri.geometry.Extent();
newExtent.xmin = YourSinglePointX - 100;
newExtent.ymin = YourSinglePointY - 100;
newExtent.xmax = YourSinglePointX + 100;
newExtent.ymax = YourSinglePointY + 100;
newExtent.spatialReference = map.spatialReference;
map.setExtent(newExtent);