This probably isn't the most elegant solution, but it worked okay for me. I wanted to show the infoWindow when a user performed a query by clicking a point on the map. The easiest way I found was to define a global variable (I used centerPoint) and set this equal to the evt geometry. Then I tapped into the infoWindow show event and used it to call for the map to recenter. This way worked the best for me because it reduced conflicts between the infoWindow show event and the map recentering which caused the infoWindow to display in the wrong location.
This was included in my function that executed on map click:
centerPoint = new esri.geometry.Point(evt.mapPoint.x,evt.mapPoint.y,evt.mapPoint.spatialReference);
And this was included in my function that ran on initialization:
dojo.connect(map.infoWindow, "onShow", function() {
if (clickX == 1) {
map.centerAt(centerPoint);
clickX = 0;
}
});
I used clickX as a switch because I only wanted recentering to occur when a user clicked on a point (I also had the infoWindow show when users hover over a point), but you can probably take this part out if you want the map to recenter every time the infoWindow opens.
dojo.connect(map.infoWindow, "onShow", function() {
map.centerAt(centerPoint);
});
Hope this is helpful!