Reputation: 21
My google map api v3 infowindows are displaying differently (just noticed today). The background is transparent and the width is very narrow. Using v3 maps api. I have 2 sites and both have same results, neither were changed in the last couple of days. infowindow.js has last-modified: Tue, 12 Feb 2019 18:33:17 GMT Anyone else?
Upvotes: 0
Views: 576
Reputation: 805
If your issue is the default max-width set by google maps on all infowindow
s, you can work around that in css:
.gm-style-iw div, .gm-style-iw {
overflow: hidden !important;
max-width: 9999px !important;
max-height: 9999px !important;
}
This, in esense, ignores the inline max-width
and overflow
styles that google maps puts on their infowindow
boxes.
Upvotes: 0
Reputation: 409
Google just updated their Maps Javascript API (days ago) to more firmly restrict InfoWindows. It seems they have gradually been taking more control over InfoWindow widths. You used to be able to use the maxWidth property in InfoWindow options, but in my tests that started being ignored (as a way to widen default infowindow size) in version 3.34. A previous workaround was to specify v=3.33 in the Google Maps URL, but that just stopped working.
I opened a ticket with Google about this in October but it never went anywhere.
I am not aware of any way to override InfoWindow width currently. They are suggesting people use custom popups.
Upvotes: 0
Reputation: 11
14 February 2019 Version 3.36 of the Maps JavaScript API is now available. See the Versioning guide.
Changes:
New features added: You can now change the size of map controls, using MapOption.controlSize. You can now restrict map bounds, using MapOptions.restriction. Infowindow has been improved. The weekly channel was updated to version 3.36. The quarterly channel was updated to version 3.35. Version 3.34 is still available when requested by number. Version 3.33 was deleted, and can no longer be used.
On the plus side...they finally made the infowindow responsive. But if you're one of the many who customized their infowindow via css and max-widths, you have to go back and fix it now.
They do still support max-width, but is now responsive. Info Window with maxWidth
Upvotes: 1