you cant just append a bunch of geometries together and get the combined extent.
try (not sure union will work with an inital null extent)
function getLocRes(results) {
map.graphics.clear();
var geom;
var combinedExtent = new Extent();
var symbol = new esri.symbol.SimpleFillSymbol(esri.symbol.SimpleFillSymbol.STYLE_SOLID, new esri.symbol.SimpleLineSymbol(esri.symbol.SimpleLineSymbol.STYLE_SOLID, new dojo.Color([80, 0, 0]), 2), new dojo.Color([80, 0, 0, 0.5]));
var res = results.features;
for (var i = 0;i < res.length; i++) {
geom = results.features.geometry.getExtent();
combinedExtent = combinedExtent.union(geom);
var graphic = results.features;
//var graphic = new Graphic(reGeo,symbol);
graphic.setSymbol(symbol);
map.graphics.add(graphic);
}
map.setExtent(combinedExtent , true);
}
function getLocRes(results) {
//map.graphics.clear();
var geom;
//
var symbol = new esri.symbol.SimpleFillSymbol(esri.symbol.SimpleFillSymbol.STYLE_SOLID, new esri.symbol.SimpleLineSymbol(esri.symbol.SimpleLineSymbol.STYLE_SOLID, new dojo.Color([80, 0, 0]), 2), new dojo.Color([80, 0, 0, 0.5]));
var res = results.features;
var combinedExtent = new esri.geometry.Extent();
for (var i = 0;i < res.length; i++) {
geom = results.features.geometry.getExtent();
combinedExtent = combinedExtent.union(geom);
var graphic = results.features;
//var graphic = new Graphic(reGeo,symbol);
graphic.setSymbol(symbol);
map.graphics.add(graphic);
}
var extent = geom.getExtent();
//alert(map.graphics.graphics.length);
map.setExtent(combinedExtent, true);
}
[ATTACH=CONFIG]33429[/ATTACH]got an error 😞 that I don't understand :0