It is my understanding, well, discovery, that the google maps is "soft"
i.e. it does not impose any width or size.
So if you put the map into a div, or a table, you must force that <td> of
the table to have a size, either by explicityl giving it a width, or having
a row abowe that has a width, or by specifying a css.
I have an application where a invisible sidebar pops up in the second column
of the table in which case I need to resize the with explicitly (and trigger
the map's 'resize' event) when the sidebar pops up
Below is the part of the code
I apologize for not having a link, but my development is still on localhost.
I have not created the necessary tables on my server database yet
Note by the way, the function below is not necessary on firefox. There you
can set the td width to be 100% and 0% respectivly, and if you add an
element into the 0% td, firefox automatically shrinks the other td, but IE
does not, which is, strictly speaking, the correct thing to do.
-------------------------------------------------------------------------------------------------------
function FixMapSize(doTrigger)
{
var chartSelector = document.getElementById("ChartSelector");
var mapCell = document.getElementById("mapCell");
var dataCell = document.getElementById("dataCell");
if(chartSelector.style.display == 'none') {
mapCell.style.width='100%';
dataCell.style.width='0%';
}
else {
mapCell.style.width='70%';
dataCell.style.width='30%';
}
if(doTrigger)
google.maps.event.trigger(globalMap,'resize');
}
---------------------------------------------------------------------------------------------------
--
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.