How do you increase the size of an infobox in the google maps API?

Posted on 2007-08-10
Last Modified: 2013-11-18
I have an infobox that has the option to get directions, but some of the text does not fit on the infobox and continues under the box. I want to increase the size of the box, but don't know the right syntax. This is pretty  urgent, so quick help would be great.
Question by:bkaneweb
    LVL 17

    Accepted Solution

    In the examples I have seen the info box can just be HTML.  In that case you can set the HTML to be whatever you want.  One with a class, or explicitly setting the width in the element.

    var infobox_data = '<div style="width: 200px; padding: 10px;">Example<br />123 Fake Street</div>';
    (your GMarker variable here).openInfoWindowHtml( infobox_data );

    Unless there is some other way that you want to have an infobox.

    - Joe P
    LVL 11

    Assisted Solution

    There's an own method for that:
    updateInfoWindow(tabs, onupdate?)

    Explanation from
    "Updates the content of the currently open GInfoWindow object, without repositioning. The info window is resized to fit the new content. The optional onupdate callback function is called after the info window content is actually changed."

    Featured Post

    What Is Threat Intelligence?

    Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

    Join & Write a Comment

    Suggested Solutions

    International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
    Building a website can seem like a daunting task to the uninitiated but it really only requires knowledge of two basic languages: HTML and CSS.
    In this tutorial viewers will learn how to embed an audio file in a webpage using HTML5. Ensure your DOCTYPE declaration is set to HTML5: : The declaration should display (CODE) HTML5 is supported by the most recent versions of all major browsers…
    The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…

    732 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    25 Experts available now in Live!

    Get 1:1 Help Now