Google Maps v3 InfoWindow Too Wide

Posted by ryan on Stack Overflow See other posts from Stack Overflow or by ryan
Published on 2010-04-24T04:18:21Z Indexed on 2010/04/24 4:23 UTC
Read the original article Hit count: 420

In Google Maps v3, I can't seem to get my infoWindow to a width smaller than 200px. Here is the code I'm using:

var latlng = new google.maps.LatLng(-34.397, 150.644);
var myOptions = {
    zoom: 15,
    center: latlng,
    mapTypeId: google.maps.MapTypeId.ROADMAP
  };
var myMap = new google.maps.Map(document.getElementById("map_canvas"), myOptions);
var gmarker = new google.maps.Marker({position: latLng,title:'Example'} );
var infoWindow = new google.maps.InfoWindow();
infoWindow.setOptions({maxWidth: 110});
window_content = '<div style="width:110px;height:110px;">Test</div>';
infoWindow.setContent(window_content);
infoWindow.open(myMap, gmarker);

Is there a way to get the infoWindow more narrow? Or am I stuck with a minimum width?

© Stack Overflow or respective owner

Related posts about google-maps-api-3

Related posts about infowindow