M
M
max_rip2011-11-27 12:14:13
Google Maps
max_rip, 2011-11-27 12:14:13

Google map, crookedly initialized if located on a hidden tab

It looks like this. The

whole interface turns out to be normal, and the map itself is shifted to the left up. It only helps to re-initialize it, but this is not an option, after all.
The tab is hidden by display:none, by the dumready event, which also turns on the Google map.
If you go to this page using the link so that there is an active tab with a map, then everything is good.

Answer the question

In order to leave comments, you need to log in

4 answer(s)
L
lashtal, 2011-11-27
@max_rip

- http://stackoverflow.com/questions/4064275/how-to-deal-with-google-map-inside-of-a-hidden-div-updated-picture

A
Anatoly, 2011-11-27
@taliban

Try to initialize in a div that is not covered but off the screen edge (position: absolute; left: -400px;)

W
Wott, 2011-11-28
@Wott

it is necessary to diva that for the map set the size through css

Y
yesworld, 2016-11-24
@yesworld

I always call the resize trigger:
google.maps.event.trigger(map, 'resize');

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question