I need to check for coincident points being returned from a FindTask, in order to zoom to the proper extent. I am currently zooming using a centerAndZoom for single points, and using a setExtent for lines, polygons and multiple points. But this will not work properly if the results set is a pair of coincident points, for example. Below is a sample of my current zoom code, but I need a solution for this coincident point scenario.
Anyone solved this kind of problem?
Thanks!
if (graphictype == "point" && map.graphics.graphics.length == 1) {
map.centerAndZoom(map.graphics.graphics[0].geometry,20);
}
else {
var extent = esri.graphicsExtent(map.graphics.graphics);
map.setExtent(extent.expand(2), true);
}