zooming out

Discussion created by tr_transcendent on Jan 20, 2012
Latest reply on Jan 20, 2012 by tr_transcendent
I am using this service
map = new esri.Map("mapDiv");
            var layer = new esri.layers.ArcGISDynamicMapServiceLayer("")
var expandFactor = 2500
 newExtent.xmin = newExtent.xmin - expandFactor;
          newExtent.ymin = newExtent.ymin - expandFactor;
              newExtent.xmax = newExtent.xmax + expandFactor;
                newExtent.ymax = newExtent.ymax + expandFactor;

I am also getting back the geometry from a query task.  I am wondering if there is a way to set the extent so it is not a standard expand factor but instead will expand out only to include the outlying areas of the returned geometry

edit: This search is showing all the property within a specified number of miles from a point that  the end user selected.  The query task is returning all the geometry of everything with a certain radius.  I am attempting to find a way to have the map zoom out to only show everything within that user specified radius.  So if the end user selects a 40 feet the application just needs to zoom out to show all the area 40 feet around that point.  If the user selects 5280 feet, zoom out to show everything within a mile.  The query task is returning the extent information of all the areas around that point so I am wondering if there is a way to zoom out so the end user can see everything and not have it get cut off when I am using a hard coded number or if I am just basing it off of the number of feet the end user search off of.