Google Maps v3 InfoWindow Too Wide

In Google Maps v3, it seems to me that my information cannot be less than 200 pixels wide. 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 information belt narrower? Or am I stuck with a minimum width?

+5
source share
1 answer

If you use the default, then yes, you're pretty stuck.

You might want to use a custom info window called infoBox. You can view one of my sandboxes here: http://www.dougglover.com/samples/UOITMap/index.html

maps.js , infoBox, .

, .

UPDATE: , , , . : http://google-maps-utility-library-v3.googlecode.com/svn/trunk/infobox/docs/examples.html

+2

All Articles