奇怪的谷歌地图的行为 - 瓷砖只出现在左上象限 [英] Strange Google Map Behavior - Tiles Appear Only In Upper Left Quadrant

查看:231
本文介绍了奇怪的谷歌地图的行为 - 瓷砖只出现在左上象限的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

曾用谷歌地图几十次,但围绕这一无法得到。做谷歌的简单的Hello World在地图版本3(HTTP://$c$c.google.com/apis/maps/documentation/javascript/tutorial.html#api_key)

Have used google maps dozens of times but cannot get around this one. Doing google's simple hello world for map version 3 (http://code.google.com/apis/maps/documentation/javascript/tutorial.html#api_key)

然而瓦片只出现在地图上的画布的左上部分和甚至拖动时/滚动他们继续留在左上角。参见图: http://sandbox.thecanarycollective.com/whiteboard/2012-03- 05_073019.png

However the tiles only appear in the upper left part of the map canvas and even when dragging / scrolling they continue to stay in the upper-left. See pic: http://sandbox.thecanarycollective.com/whiteboard/2012-03-05_073019.png

我曾与CSS发挥的页面看到相当多的,如果它得到别的东西,但没有运气搞砸了的。任何以往任何时候都看到了吗?

I have played with the CSS on the page quite a bit to see if it was getting screwed up by something else but no luck. Anyone ever see this before?

推荐答案

个别砖是 DIV 元素。试试你的页面上关闭的CSS,看看是否仍然出现此问题。然后使用工具像萤火虫来检查网页的HTML - 查看缺少的瓷砖出现在HTML

The individual tiles are div elements. Try turning off the css on your page and see if this problem still occurs. Then use a tool like firebug to examine the HTML of the page - see if the missing tiles appear in the HTML.

用Firebug,写到控制台:

Using firebug, write this into the console:

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

其中,的GoogleMap 是地图元素。这可能会解决的事情,如果你调整地图在创建后。

where googleMap is the map element. This may fix things if you're resizing the map after it is created.

如果没有这些帮助,发表您的JavaScript,CSS和HTML - 它很难想到什么建议时,你只是提供一个固定的图片

If none of these help, post your javascript, css and HTML - its hard to think of what to suggest when you just provide a fixed image.

这篇关于奇怪的谷歌地图的行为 - 瓷砖只出现在左上象限的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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