I suppose you would have to do that at the php script level, an dwrite afunctin that scan the database for pictures that are within a certain distance and bind them together.
When you zoom, then the map would have to request in live the individual markers if the zoom level is enough to distinguish between them.
But I believe this is a long term development
Meanwhile for autozoom in using google map functions you can have a look there:
http://groups.google.com/group/Google-Maps-API/browse_thread/thread/60707f79305efc96/f81f365b292b6422?lnk=gst&q=centerAndZoomOnBounds&pli=1
It looks simpler than the current one, but not sure how fast it is:
GMap2.prototype.centerAndZoomOnBounds = function(bounds) {
var center_lat = (bounds.getNorthEast().lat() +
bounds.getSouthWest().lat()) / 2.0;
var center_lng = (bounds.getNorthEast().lng() +
bounds.getSouthWest().lng()) / 2.0;
if(bounds.getNorthEast().lng() < bounds.getSouthWest().lng()){
center_lng += 180;
}
var center = new GLatLng(center_lat,center_lng)
map.setCenter(center, map.getBoundsZoomLevel(bounds));