title: Small Google Maps Infowindow - Smaller than 200px
body: <p>I have a map_canvas with a width of 225.</p>
  
  <p>I want my infobox to be smaller than this (eg. 150 px).</p>
  
  <p>Is this possible? I tried maxWidth and adding styles, but nothing seemed to work.</p>
  
  <p>A screen (on imgshack) can be found below: <a href="https://i.stack.imgur.com/huwku.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/huwku.png" alt="alt text"></a>
  </p>
  
  <p>Also,
  I'm using v3 of Google Maps</p>
  
  <p>Javascript:</p>
  
  <pre><code>var results_coods;
  var map_2;
  var marker_2;
  var infowindow_2;
  
  function call_gmap()
  {
  if($('#map_text').attr('lat')){
  
      var lat = Number($('#map_text').attr('lat').replace(",","."));
      var lng = Number($('#map_text').attr('long').replace(",","."));
      initialize(lat,lng);
      /*
      var lat= '51.0153389';
      var lng = '2.7253832';  
      */
  
  }
  }
  
  function initialize(lat,lng) {
  
      var latlng = new google.maps.LatLng(lat,lng);
      var myOptions = {
          zoom: 13,
          center: latlng,
          disableDefaultUI: true,
          navigationControl: true,
          navigationControlOptions: {style: google.maps.NavigationControlStyle.SMALL},
          draggable: false,
          scaleControl: false,
          mapTypeId: google.maps.MapTypeId.ROADMAP
      };
  
  var map = new google.maps.Map(document.getElementById("map_canvas"), myOptions);
  
  var infowindow = new google.maps.InfoWindow({
      content: $('#map_text').html(),
      maxWidth: 150
  });
  
  var image = 'beachflag.png';
  var marker = new google.maps.Marker({
      position: latlng, 
      map: map
  });
  infowindow.open(map,marker);
  google.maps.event.addListener(
  marker, 'click', function() {
     infowindow.open(map,marker);
  
  }); 
  google.maps.event.trigger(map, 'resize');
  map.setZoom( map.getZoom() );
  
  }
  
  
  
  function GcodeAddress() 
  {
      var map;
      geocoder = new google.maps.Geocoder();
      var address = $('#map_address').html();
  
       if (geocoder) {
        geocoder.geocode( { 'address': address}, function(results, status) {
          if (status == google.maps.GeocoderStatus.OK) {
              var myOptions = {
                  zoom: 13,
                  center: results[0].geometry.location,
                  navigationControl: false,
                  scaleControl: false,
                  mapTypeId: google.maps.MapTypeId.ROADMAP
              };
  
                var infowindow = new google.maps.InfoWindow({
                content: $('#map_text').html()
                });
  
               map = new google.maps.Map(document.getElementById("map_canvas"), myOptions);
              results_coods = results[0].geometry.location;
              map.setCenter(results[0].geometry.location);
              var marker = new google.maps.Marker({
                  map: map, 
                  position: results[0].geometry.location
              });
              infowindow.open(map,marker);
              google.maps.event.addListener(
              marker, 'click', function() {
                  infowindow.open(map,marker);
              }); 
  
              google.maps.event.trigger(map, 'resize');
  
              marker_2 = marker;
              map_2 = map;
             infowindow_2 = infowindow;
          } else {
            alert("Geocode was not successful for the following reason: " + status);
          }
        });
      }
  
  
  }
  function resizeMap()
  {
      //hiervan komt 1 error, de andere van infowindow
      google.maps.event.trigger(map_2, 'resize');
      map_2.setCenter(results_coods);
      infowindow_2.open(map_2,marker_2);
  }
  </code></pre>
  
  <p>Javascript, bottom of html page:
      
          $(document).ready(function($) {
              GcodeAddress();
              resizeMap();
          });
      </p>
  
  <p>HTML (VB.Net):</p>
  
  <pre><code>    '-- Google Map
  
      g_map_text.Text = "&lt;div id=""map_canvas"" style=""width: 225px; height: 225px;       position: relative;"" /&gt;&lt;/div&gt;" &amp; vbCrLf
      g_map_text.Text &amp;= String.Format("&lt;div id='map_text'      style=""display:none;width:150px;""&gt;{0}&lt;/div&gt;", LoadKantoor)
      g_map_text.Text &amp;= String.Format("&lt;div id='map_address' style='display:none;'      &gt;{0}&lt;/div&gt;", Bedrijf.Bedrijf("postalcode") &amp; " " &amp; Bedrijf.Bedrijf("city") &amp; "," &amp;      Bedrijf.Bedrijf("address"))
  </code></pre>