title: Google maps api center on marker
body: <p>I've got the code below, which places 4 maps on a page, and adds a marker for each based on an address. But I need to map to center on the marker.</p>
  
  <pre><code>&lt;script type="text/javascript"&gt;
           var geocoder;
           var map0,map1,map2,map3;
           var markers = [];
            function initialize() {
              geocoder = new google.maps.Geocoder();
              var latlng = new google.maps.LatLng(-34.397, 150.644);
              var mapOptions = {
                zoom: 14,
                center: latlng,
                mapTypeId: google.maps.MapTypeId.ROADMAP
              }
              map0 = new google.maps.Map(document.getElementById("map_canvas1"), mapOptions);
              addPostCode('@address1',map0);
              map1 = new google.maps.Map(document.getElementById("map_canvas2"), mapOptions);
              addPostCode('@address2',map1);
              map2 = new google.maps.Map(document.getElementById("map_canvas3"), mapOptions);
              addPostCode('@address3',map2);
              map3 = new google.maps.Map(document.getElementById("map_canvas4"), mapOptions);
              addPostCode('@address4',map3);
            }
  
            function addPostCode(address,map) {
                  geocoder.geocode( { 'address': address}, function(results, status) {
                  if (status == google.maps.GeocoderStatus.OK)
                  {
                      map.setCenter(results[0].geometry.location);
                      var marker = new google.maps.Marker({
                      map: map,
                      position: results[0].geometry.location,
                      center: results[0].geometry.location,
                      name: address
                  });
                  markers.push(marker);
                  } else {
                      alert("Geocode was not successful for the following reason: " + status);
                  }
                  });
              }
  </code></pre>
  
  <p></p>
  
  <p>Not totally sure where to make it center on the marker for that map.</p>