Problems displaying maxWidth on Google Map

USING version 3, maxWidth does not seem to work if it is less than 200

+3
source share
3 answers

Here is a google group discussion . It includes examples of the style of your own infowindow. I have not read about it yet.

+3
source

this.infowindow = new google.maps.InfoWindow ({maxWidth: 300, content: "..."});

maxWidth must be greater than 250

, . , . , close, setOptions, .

0

You can do this by adding a div element inside infoWindow and setting the css width.

Example:.

this.infowindow = new google.maps.InfoWindow(
{ 
    maxWidth: 300, 
    content: "<div class='div-info'>....</div>" 
});

Css Definition:

.div-info { 
    max-width: 300px; 
}
0
source

Source: https://habr.com/ru/post/1744437/


All Articles