Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Changing background color in Google Map InfoWindow

I want my InfoWindows in my Google Map implementation to have a black background color. "backgroundColor" is not an available option for InfoWindows. See here.

I put a div tag in the content option with a black background and white text. However, that still renders with a white border.

Does anyone know a way to get a completely black background?

Thanks for any help in advance.

like image 893
geoffrobinson Avatar asked Aug 31 '10 16:08

geoffrobinson


People also ask

How do I change the background color of infoWindow in Google Maps?

addListener(marker, 'mouseover', function() { infoWindow. setContent(html); infoWindow. open(map, marker); //infoWindow. setStyle("background-color: red"); });

What is infoWindow in Google map?

An InfoWindow displays content (usually text or images) in a popup window above the map, at a given location. The info window has a content area and a tapered stem. The tip of the stem is attached to a specified location on the map. Info windows appear as a Dialog to screen readers.

How do I get rid of infoWindow in Google Maps?

The user can click the close button on the InfoWindow to remove it from the map, or the developer can call close() for the same effect.


1 Answers

If you want complete control over the background but want the niceties of InfoWindow, then you can can use the InfoBox from the Google Maps Utility library.

like image 184
Tony Miller Avatar answered Oct 03 '22 21:10

Tony Miller