If you change dynamically info window content you have to trigger a
"content_changed" event to tell google map to resize the window

Sébastien Gruhier

-----------------------------------------------------------------------
http://v2.maptimize.com  Markers fusion service for your online maps
http://mocksmtpapp.com   Smart and simple e-mail testing for apps and
websites on Mac OS X


On Oct 5, 3:27 pm, Bradley <[email protected]> wrote:
> Anyone?
>
> On Sep 30, 3:49 pm, Bradley <[email protected]> wrote:
>
>
>
> > Also, that appears to do nothing...  I've set an explicit height/width
> > on my content div and that works, but setting the size of the
> > infoWindow through JS does nothing and still doesn't expand to my
> > explicit dimensions of my div.  I tried v3.1 and 3.2.
>
> > On Sep 30, 3:33 pm,Bradley<[email protected]> wrote:
>
> > > size isn't listed in the API, can you tell me for what version that
> > > works?
>
> > > On Sep 30, 3:26 pm, Jordi Riera <[email protected]> wrote:
>
> > > >  var html = '<div class="infoWindowContent" style=" width: 240px;
> > > > height:200px;">' +
> > > >                     '<table class="tabContent">';
> > > >                     html += '<tr>' + '<td class="value"><b>' + name +
> > > > '</b></td>' + '</tr>';
> > > >                     html += '<tr>' + '<td class="value">' + address +
> > > > '</td>' + '</tr>';
> > > >                     html += '<tr>' + '<td class="value">' +
> > > > codigo_postal + ' - ' + poblacion  + '</td>' + '</tr>';
> > > >                     html += '</table></div>';
>
> > > > var infowindow =  new google.maps.InfoWindow(
> > > >             {   content: html,
> > > >                 'size': new google.maps.Size(200, 200)
> > > >             });
>
> > > > On 29 sep, 22:16,Bradley<[email protected]> wrote:
>
> > > > > I'm not sure what the problem here is, but I've got a div with the
> > > > > following markup being used as an info window:
>
> > > > > <div class="overlayInfo">
> > > > >   <h2>Some Location</h2>
> > > > >   <h1>0.3312&nbsp;t</h1>
> > > > >   <table>
> > > > >     <tbody>
> > > > >       <tr><td>Occupants</td><td>9999</td></tr>
> > > > >       <tr><td>Building Area</td><td>9999 ft²</td></tr>
> > > > >     </tbody>
> > > > >   </table>
> > > > > </div>
>
> > > > > You can view the example here (this is 
> > > > > live)http://usa.zerochallenge.org/results.
> > > > > Click on the location circle.  For whatever reason the infoWindow has
> > > > > not expanded to my overlayInfo div and it has scroll bars.  I can't
> > > > > for the life of me figure it out how to get the infoWindow to expand.
> > > > > The examples on the web seem to automatically expand to the content.
> > > > > I'm using the following code to create the infoWindow:
>
> > > > > infoWindow = new google.maps.InfoWindow({
> > > > >                                 content: ["<div 
> > > > > class='overlayInfo'><h2>", name,
> > > > >                                         "</h2><h1>", prefix, 
> > > > > velo.util.Number.addCommas(emission),
> > > > > "&nbsp;",unit, trend, "</h1>",
> > > > >                                         
> > > > > "<table><tr><td>Occupants</td><td>",numPeople,
> > > > >                                         "</td></tr><tr><td>Building 
> > > > > Area</td><td>",
> > > > > velo.util.Number.smartRound(area), ' ', areaUnit,
> > > > >                                         
> > > > > "</td></tr></table></div>"].join("")
> > > > >                         });
>
> > > > > Nothing special going on there.  And I have no special CSS happening.
> > > > > You can see that the parent div of my infowindow has a fixed height/
> > > > > width of 48/199.  Why is this the case?
>
> > > > > Any help is greatly appreciated.

-- 
You received this message because you are subscribed to the Google Groups 
"Google Maps JavaScript API v3" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/google-maps-js-api-v3?hl=en.

Reply via email to