缓存的Google Map最初在浏览器中显示很小 [英] Cached Google Map shows up initially small in a browser
问题描述
这是软件中的缓存地图:ogmaps
This is a cached map from the software: ogmaps
请仔细查看此处主窗口地址栏下方的小阴影.
Please look carefully at the tiny shades below the address bar in the main window here.
在单击最小化/最大化"按钮后,它会完全显示出来.在firefox和google chrome上进行了测试.
On once clicking the minimize/maximize button, it gets showed up fully. Tested on firefox, and google chrome.
不能说这是浏览器的问题,因为当我在Qt小部件上加载此缓存的地图时,我仍然必须单击最小化/最大化"按钮,以使其完全显示.
Can't say that this is the browser problem, since when I loaded this cached map on the Qt widget, I still had to click the minimize/maximize button, to get it gets showed up fully.
地图的html太长,无法在此处发布.如果您有任何相关的部分,请告诉我,我将在此处发布.
The html for the map is too long to be posted here. If there is any relevant section that you know of, then please tell me and I'll post it here.
编辑2
最后,我设法在此处上传了该html代码: http://code.google.com/p/earthhtml/source/browse/trunk/ogmap.html
Finally I have managed to upload that html code here: http://code.google.com/p/earthhtml/source/browse/trunk/ogmap.html
请查看div
标签.
推荐答案
尽管这看起来有些琐碎,但对我来说却很有效.我在使用GMv3时遇到了完全相同的问题(除了其他GM问题),无法解决.
Although this may seem like something trivial, it worked out for me. I had the exact same problem (among other GM problems) using GMv3 and couldn't figure it out.
- 我向包含地图的div中添加了
min-height
(带有!important
) - 我从CSS中删除了所有
max-height & max-widths
- I added a
min-height
to the div containing the map (with!important
) - I removed ALL
max-height & max-widths
from the CSS
这解决了小地图"问题以及我在GM引脚和信息窗口中遇到的其他问题.
This fixed the 'small map' problem plus an additional problem I had with the GM pins and infowindows.
最重要的是,请确保页面上没有z-index
高的div,因为GM会调整包含div的大小,以免干扰顶部div.另一个z-index
较高的div也会使地图混乱,并使高度和宽度变得疯狂.
On top of that, make sure that there are NO divs with a high z-index
on your page, as GM will resize the containing div not to interrupt with the top div. Another div with a higher z-index
will also mess up the map and make the height and the width go crazy.
div#map{
min-height:600px !important; /* or any value that suits you */
position:relative;
margin-left:0;
margin-right:0;
left:0;
border:1px solid #979797;
}
我希望这对您和我一样有用.如果没有的话,祝你好运!
I hope this works as good for you as it worked for me. If not, good luck!
这篇关于缓存的Google Map最初在浏览器中显示很小的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!