Search code examples
javascriptgoogle-maps-api-3infobubble

Removing title tabs from InfoBubble, Google Maps API v3


I'm working with InfoBubble right now, and I can't seem to get the actual tabs/titles off my InfoBubbles. How do you hide tabs? Just to be clear, I'm referring to just the actual tab at the top of the bubble, not the entire content area.

Is there an example I can look at, or some documentation that covers this?

I assume it must be since the label shown on the InfoBubble wizard is tab free, but I don't see HOW when I look at the source. (http://google-maps-utility-library-v3.googlecode.com/svn/trunk/infobubble/examples/example.html/)

This is my map right now if it matters: http://jsbin.com/ugabaz/3/

Thank you!!!!


Solution

  • With some libraries you could use some css to fix this -- the problem here is that it doesn't give the tab a good name or class or anything to get ahold of via a css selector.

    But you can cheat!

    ethiopiaInfoBubble.tabsContainer_.style['display'] = 'none'; // like this
    

    Here we are using the infoBubble's own pointer to the dom node for the tab container, and forcing it to be display-none.