Google地图只载入一半本身 [英] Google map only loading half of itself

查看:91
本文介绍了Google地图只载入一半本身的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



看看上面的图片,并尝试在 - > http://domainsoutlook.com/s/



我注意到的荒谬之处在于,如果我加载 http://domainsoutlook.com/s/site/stackoverflow.com.html#server_information < >

然后地图加载正常

解决方案

您需要调用<$ c
$ b 首先移动 map的声明

/ code>变量upper,例如:

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

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆