?
Solved

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

Posted on 2007-08-10
2
Medium Priority
?
1,070 Views
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.
0
Comment
Question by:bkaneweb
2 Comments
 
LVL 17

Accepted Solution

by:
BogoJoker earned 1200 total points
ID: 19674807
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
0
 
LVL 11

Assisted Solution

by:BraveBrain
BraveBrain earned 800 total points
ID: 19674821
There's an own method for that:
updateInfoWindow(tabs, onupdate?)

Explanation from http://www.google.com/apis/maps/documentation/reference.html#GMap2 
"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."
0

Featured Post

[Webinar] Cloud and Mobile-First Strategy

Maybe you’ve fully adopted the cloud since the beginning. Or maybe you started with on-prem resources but are pursuing a “cloud and mobile first” strategy. Getting to that end state has its challenges. Discover how to build out a 100% cloud and mobile IT strategy in this webinar.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Originally, this post was published on Monitis Blog, you can check it here . In business circles, we sometimes hear that today is the “age of the customer.” And so it is. Thanks to the enormous advances over the past few years in consumer techno…
Without even knowing it, most of us are using web applications on a daily basis.  In fact, Gmail and Yahoo email, Twitter, Facebook, and eBay are used by most of us daily—and they are web applications. We generally confuse these web applications to…
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …
Learn how to create flexible layouts using relative units in CSS.  New relative units added in CSS3 include vw(viewports width), vh(viewports height), vmin(minimum of viewports height and width), and vmax (maximum of viewports height and width).
Suggested Courses

750 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