Or you can just trigger the resize event on the map when you show it.

google.maps.event.trigger('resize', map);

-- Luke


On Thu, Jun 30, 2011 at 8:24 AM, webdesigntucson <[email protected]>wrote:

> This is just a quick tip and easy fix. It's well known that if you
> want to display a google map within a hidden div tag then this would
> break the centering of your marker. Basically the center point would
> be placed in the upper left corner at the 0,0 coordinates. An easy fix
> for this is to remove the onload event that calls the initialize()
> function which is normally called in the body tag and move it to the
> onclick event that you use to unhide the hidden div area.
>
> --
> 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.
>
>

-- 
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