I have used Google map javascript V3 API to display a map. But I have a problem with the map bubbles. When the information in the bubble is more than the specific height, it is inserting scrollbars into the bubble.
How can I remove those scrollbars and assign dynamic width & height to the bubble as per their content?
Or how can I design my own custom bubble to make it dynamic for width & height as per the contents?
Thanks in advance.
Check the Expose the option to add an ID attribute checkbox. Now hit preview and you won't have the scroll-bar. If you need some help with your Bubble app or would like me to build one for you, send me an email at [email protected].
You can delete the markers by removing them from the map and then setting the array's length to 0 , which removes all references to the markers.
Had a similar problem - scroll bars appear in popups with text content, sometimes they disappear after closing & opening a popup again, they also appear if I was changing a page zoom level.
This post was helpfull. I added a few CSS strings and it solved all my extra scrollbars cases:
.gm-style-iw {
overflow: hidden !important;
line-height: 1.35;
white-space: nowrap;
}
If you have an image in your infowindows like I do, try a little inline styling where you are setting the content for the infowindows. I found adding display:block
to the img tag fixed the problem for me.
Tested on FF, IE9, Opera, Safari, Chrome.
Example:
var html = "<img style=\"display:block;\" src=\""+image+"\"/>"
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