Hi All
My script for google maps works fine for multiple locations but if their is only 1 location
its fully zoomed in. Any ideas full code below

<? // get business locations //
$query = "SELECT locationAddress FROM tblClientLocations WHERE clientID='$part1'";
$result = mysql_query($query,$db);
while($row = mysql_fetch_array($result))
{
$locationAddress = $row[locationAddress];
$locationAddress = stripslashes($locationAddress);

$locationAddress = str_replace("<br>", "+", $locationAddress);
$locationAddress = str_replace(" ", "+", $locationAddress);

$json = file_get_contents("http://maps.google.com/maps/api/geocode/json?address=$locationAddress&sensor=false&region=$region");
$json = json_decode($json);

$lat = $json->{'results'}[0]->{'geometry'}->{'location'}->{'lat'};
$long = $json->{'results'}[0]->{'geometry'}->{'location'}->{'lng'};

?>
['TEST', <? echo $lat;?>, <? echo $long;?>],
<?
}
?>
];

function initializeMaps() {
var myOptions = {
zoom: 10,
mapTypeId: google.maps.MapTypeId.ROADMAP,
mapTypeControl: false
};
var map = new google.maps.Map(document.getElementById("map_canvas"),myOptions);
var infowindow = new google.maps.InfoWindow();
var marker, i;
var bounds = new google.maps.LatLngBounds();

for (i = 0; i < markers.length; i++) {
var pos = new google.maps.LatLng(markers[i][1], markers[i][2]);
bounds.extend(pos);
marker = new google.maps.Marker({
position: pos,
map: map

});
google.maps.event.addListener(marker, 'click', (function(marker, i) {
return function() {
infowindow.setContent(markers[i][0]);
infowindow.open(map, marker);
}
})(marker, i));
}
map.fitBounds(bounds);
}
</script>