Hossam Oukli
Hossam Oukli

Reputation: 1296

How to change google.maps.InfoWindow propreties?

I'm now trying to customize my InfoWindow, that appears when i click on my google map markers:

here is my code:

var contentString =
'<div><div style="color:#FFFFFF; font-size:15px; font-weight:bold;width:100%;'+
'background-image:url(\'myImage.png\'); padding:7px;">'+
'colorcolorcolorcolorcolorcolorcolorcol<br>'+
'colorcolorcolorcolorcolorcolorcolorcol<br>'+
'colorcolorcolorcolorcolorcolorcolorcol<br>'+
'colorcolorcolorcolorcolorcolorcolorcol<br></div></div></div>';

var infowindow = new google.maps.InfoWindow({
            content: contentString,
            padding: 0
            });

This is how it looks now:

enter image description here

The Gray div is my content.

How can i modify my InfoWindow propreties like padding, so my content can fit the InfoWindow?

Upvotes: 0

Views: 4479

Answers (1)

Ogrim
Ogrim

Reputation: 137

The best way to do this is to use InfoBox

There are some examples of how to use it and it provides a lot of customization options.

Upvotes: 2

Related Questions