title: maps.event.trigger Resize( ) not working
body: <p>I am working on google maps for quite some time, I am familiar with code and how it works, but unable to place the resize event properly that causes my map to render grey tiles on screen.
  Please suggest me where exactly need to place the resize event
      Here is my code :</p>
  
  <pre><code>bank.atmDetailsSuccess = function(response) {
  
      bank.locate = response;
      bank.getAtmStatus();
  
  };
  
  
  bank.getAtmStatus = function(results, status) {
      var status = bank.locate.Status[0].Value0;
      locate = bank.locate;
      var map;
      if (status == bank.constants.STATUS_ERROR) {
              var message = locate.Error[0].Value0;
              WL.simpledialog.show(message);
          } else if (status == bank.constants.STATUS_SESSION_EXPIRED) {
              WL.simpledialog.show("Session Expired!!");
          } else if (status == bank.constants.STATUS_SUCCESS) {
              map = bank.initializeAtm();
              google.maps.event.addDomListener(window, 'load', initializeAtm);
              google.maps.event.addDomListener(window, "resize", function() { 
                  alert("In");
                var center = map.getCenter();
                google.maps.event.trigger(map, "resize");
                map.setCenter(center); 
                map.setZoom(10);
                });
  
      }
  };
  
  
  bank.initializeAtm = function(){
      locate = bank.locate;
      var firstlat = locate.Stmt[0].Value5;
      var firstlong= locate.Stmt[0].Value6;
      // var latlng = new google.maps.LatLng(latitude,longitude);
  
      var image = {
              //url: bank.constants.MARKER_PATH,
             url: 'images/720x720/pin.png',
              // This marker is 20 pixels wide by 32 pixels tall.
              size: new google.maps.Size(32, 40),
              // The origin for this image is 0,0.
              origin: new google.maps.Point(0,0),
              // The anchor for this image is the base of the flagpole at 0,32.
              anchor: new google.maps.Point(0, 32)
            };
      var myOptions = {
              zoom: 10,
              center:new google.maps.LatLng(firstlat, firstlong),
              mapTypeId: google.maps.MapTypeId.ROADMAP
  
            };
  
      map = new google.maps.Map($('#map-canvas')[0], myOptions);
  
      geocoder = new google.maps.Geocoder();
      bank.currentposition();
      $('#mapbranch').hide();
      $('#map-canvas').show();
      $('#atm').html("ATM near your current location");
      $('#results').html("");
      var directionsService = new google.maps.DirectionsService();
      MVC.local.directService = directionsService;
      directionsRenderer = new google.maps.DirectionsRenderer({
            suppressMarkers: true} );
      MVC.local.renderer = directionsRenderer;
      var n;
      for(n=0; n&lt;locate.Stmt.length; n++)
      {
          var value = locate.Stmt[n];
          name = value.Value0,value.Value1;
          lat = value.Value5;
          lon = value.Value6; 
          bank.getDistanceFromLatLonInKm(12.919336, 77.502291,lat,lon);
          var myLatLng = new google.maps.LatLng(lat,lon);
          var marker = new google.maps.Marker({
              position: myLatLng,
              icon:image,
              map: map,
              title: name,
              zIndex: 1
          });
  
          bank.buildInfoWindow(marker,map,value[n]);
      }
      return map;
  };
  </code></pre>
  
  <p>Note:This is completely working code only problem is rendering works when i resize broswer manually but not resizing while loading. Please don't mind variable names.All function calls are good except resize event.</p>