Google地图只载入一半本身 [英] Google map only loading half of itself
问题描述
看看上面的图片,并尝试在 - > http://domainsoutlook.com/s/
我注意到的荒谬之处在于,如果我加载 http://domainsoutlook.com/s/site/stackoverflow.com.html#server_information < >
然后地图加载正常
您需要调用<$ c
$ b 首先移动 map的声明
var map;
$(document).ready(function(){
// ...您的代码
然后在tab被点击后调用 map.checkResize()
函数。
Look at the image above and try the url at -> http://domainsoutlook.com/s/site/stackoverflow.com.html and go to server information tab.
The absurd point I notices is that if I load http://domainsoutlook.com/s/site/stackoverflow.com.html#server_information
then the map loads fine
You need to call checkResize()
API function after you changing the tab.
First of all move declaration of map
variable upper, for example:
var map;
$(document).ready(function() {
//... your code
And then after tab is clicked call map.checkResize()
function.
这篇关于Google地图只载入一半本身的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!