On Aug 6, 10:53 am, faraz ch <[email protected]> wrote:
> I m showing google map within a div.When i put display of that div as
> block,the map shows perfectly with marker on its center.But when i
> make
> div style none and change it to block on clicking on some link,it
> opens a div with map in it bt marker in that map is not centered,it
> falls
> on the right of top left corner and i have to drop the map to see the
> marker.
> Can anyone tell how can i display the marker in center even within div
> whose display is none.Thanks.

You've identified the issue correctly: the size of a collapsed div is
zero, so the marker is centred in a map of zero size. When the map is
expanded, you need to tell the browser to recalculate its record of
the map size and what it should display.

http://groups.google.com/group/google-maps-api/search?group=google-maps-api&q=top+left
http://code.google.com/apis/maps/documentation/javascript/v2/reference.html#GMap2.checkResize

-- 
You received this message because you are subscribed to the Google Groups 
"Google Maps API" 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-api?hl=en.

Reply via email to