Search code examples
google-maps-api-3

Size of infoWindow in google maps api v3. What is the right solution?


I have need to change width and height of google maps infoWindow and I saw this topic Google Map .InfoWindow Set Height and Width. I found that the solutions from it doesn't work. Even standart infoWindow = new google.maps.InfoWindow({maxWidth: '50px'}) isn't going to work.

So what is a solution? How to change width and height of infoWindow?


Solution

  • This works for me:

    new google.maps.InfoWindow({ maxWidth: 320 });
    

    Remove the ' ' and the px specifier and I believe it will work for you too.