I have a map where I am using multiple markers to display locations of
items (picture + description) via a central infowindow (one
infowindow, multiple markers)  I have set maxWidth (and maxHeight) of
my infowindow and also styled a div I have containing my infowindow
content.  However the infowindow is sizing itself way too big.

Take a look at this map in my test enviornment (might want to maximize
the window before you load... or load, maximize, and refresh):
http://www.thecolpis.com/leecolpi/map.php

Here is the javascript that is used to build the map:
http://www.thecolpis.com/leecolpi//JAVASCRIPT/map_js.php (yes it is
php, but it outputs javascript)

As you can see, the infowindow seems to want to be almost as tall as
the map canvas (however big that is).  I used Opera's "inspect
element" functionality and found that my container div (inner html
content of the infowindow) is being sized correctly.  However, using
the same functionality in Opera, I see that Google is applying some
inline styles to container divs that is making this infowindow very
big.  Here are some suspecious styles:

#map_canvas div div div div#gmnoprint div has a hight specified of
404px via an inline style
#map_canvas div div div div#gmnoprint div div has a hight specified of
372px via an inline style

My max height of the infowindow via google maps and the content div
via css is 200px.  The map_canvas was set to a height of 554px (vis
css).  You might see different values when you load the page, as the
php dynamically adjust to your window height (hence the request to
maximize your window).


One thing to note... since I have multiple markers and one infowindow
(I don't want to have multiple infowindows open on the page at once,
so I use 1 infowindow that moves from marker to marker when you click
on a marker), I dynamically set the inner content of the infowindow
based on the contents of a propertity that I added to the marker
object.  I am not sure if this is confusing or not, so I made another
page with just one marker that has the same issue I am asking about:

http://www.thecolpis.com/leecolpi/test_big_info.php

javascript is here:
http://www.thecolpis.com/leecolpi/test_big_info.php/JAVASCRIPT/map_big_info.js


Please let me know if I am doing something wrong or if there is a way
to correct this.

Thanks in advance,
Dainel

-- 
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 google-maps-js-api...@googlegroups.com.
To unsubscribe from this group, send email to 
google-maps-js-api-v3+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-maps-js-api-v3?hl=en.

Reply via email to