For some reason InfoWindow is displaying scroll bars along with the content, I tried to have custom width and height to InfoWindow but it is not showing up. I tried the solution from here Google Map Infowindow not showing properly
Please refer following link http://server.ashoresystems.com/~contacth/index.php?option=com_business&view=categoryresult&catid=2
Thanks for any help.
Open a Chrome window. In the address bar, enter "chrome://flags," and navigate to that page. Scroll down to Overlay Scrollbars, and set the field to "Disabled." Restart your browser window, and your scrollbars should work again in PicMonkey.
maps. InfoWindow({ content: some_text, maxWidth: 200 }); The documentation notes that the "value is only considered if it is set before a call to open. To change the maximum width when changing content, call close, setOptions, and then open."
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.
I found a workaround here.
I made this JSfiddle, displaying the bug and a workaround.
If you do not want to visit external links, here is the workaround description:
Add a wrapping div to your info window content:
var infoWindow = new google.maps.InfoWindow({ content: '<div class="scrollFix">'+infoWindowContent+'</div>', [...] }).open(map);
And use CSS definitions to avoid scrollbars:
.scrollFix { line-height: 1.35; overflow: hidden; white-space: nowrap; }
To hide the scrollbars, give your content a high z-index stack order, eg.:
var infowindow = new google.maps.InfoWindow({ content: '<div style="z-index:99999">Message appears here</div>', });
Or, add the following style:
.gm-style-iw { overflow:hidden!important; height:55px!important; //for 3 lines of text in the InfoWindow }
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With