tfman716

Zoom to extent working for multi points but not single point

Discussion created by tfman716 on May 30, 2014
Latest reply on Jun 6, 2014 by mariczone
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);

Outcomes