谷歌地图气球失去了风格

时间:2012-06-16 14:32:32

标签: javascript css google-maps map

我想知道我做错了什么。 我正在使用bMap(http://www.blocsoft.com/bmap/)来获取Google地图,而在演示中,一切看起来都是正确的。
我的版本看起来不太好。我已经失去了所有的圆角。我的猜测是这是一个常见的错误,但我不知道,因为地图 - 气球样式应该是内联的。除此之外 - 我已经尝试禁用我的CSS完整,角落仍然是正方形。不仅如此,盒子看起来有些混乱。

我应该从哪里开始调试这个想法?

来自Inspector的HTML:

<div style="z-index: 106; position: absolute; left: 0px; top: 0px;"><div style="display: none;"><div style="width: 107px; height: 137px; overflow: hidden; position: absolute; left: 21px; top: 26px;"><img style="position: absolute; left: -784px; top: -102px; -moz-user-select: none; border: 0px none; padding: 0px; margin: 0px; width: 1029px; height: 255px;" src="http://maps.gstatic.com/mapfiles/cb/mod_cb_scout/cb_scout_sprite_api_003.png"><div style="position: absolute; left: 7px; top: 5px; width: 94px; height: 75px; background-color: rgb(211, 211, 211); z-index: 1;"></div><div style="width: 95px; bottom: 38px; z-index: 1; left: 7px; font-family: Arial,sans-serif; font-size: 9px; color: gray; background-color: white; position: absolute;">Loading...</div><img style="position: absolute; left: 7px; top: 5px; width: 94px; height: 75px; -moz-user-select: none; border: 0px none; padding: 0px; margin: 0px; opacity: 0.25;" src="http://maps.gstatic.com/mapfiles/transparent.png"></div><div style="width: 21px; height: 26px; overflow: hidden; position: absolute; left: 63px; top: 127px;"><img style="position: absolute; left: -441px; top: -102px; -moz-user-select: none; border: 0px none; padding: 0px; margin: 0px; width: 1029px; height: 255px;" src="http://maps.gstatic.com/mapfiles/cb/mod_cb_scout/cb_scout_sprite_api_003.png"></div></div><div style="position: absolute; left: 257px; top: 84px; cursor: default; z-index: 307;"><div style="width: 48px; height: 8px; overflow: hidden; position: absolute; z-index: 1; -moz-user-select: none; left: 162px; top: 123px;"><img style="position: absolute; left: -49px; top: -715px; width: 690px; height: 786px; -moz-user-select: none; border: 0px none; padding: 0px; margin: 0px;" src="http://maps.gstatic.com/mapfiles/iw3.png"></div><div style="width: 44px; height: 8px; overflow: hidden; position: absolute; z-index: 1; -moz-user-select: none; left: 157px; top: 130px;"><img style="position: absolute; left: -44px; top: -722px; width: 690px; height: 786px; -moz-user-select: none; border: 0px none; padding: 0px; margin: 0px;" src="http://maps.gstatic.com/mapfiles/iw3.png"></div><div style="width: 40px; height: 8px; overflow: hidden; position: absolute; z-index: 1; -moz-user-select: none; left: 152px; top: 137px;"><img style="position: absolute; left: -39px; top: -729px; width: 690px; height: 786px; -moz-user-select: none; border: 0px none; padding: 0px; margin: 0px;" src="http://maps.gstatic.com/mapfiles/iw3.png"></div><div style="width: 36px; height: 8px; overflow: hidden; position: absolute; z-index: 1; -moz-user-select: none; left: 147px; top: 144px;"><img style="position: absolute; left: -34px; top: -736px; width: 690px; height: 786px; -moz-user-select: none; border: 0px none; padding: 0px; margin: 0px;" src="http://maps.gstatic.com/mapfiles/iw3.png"></div><div style="width: 31px; height: 8px; overflow: hidden; position: absolute; z-index: 1; -moz-user-select: none; left: 142px; top: 151px;"><img style="position: absolute; left: -29px; top: -743px; width: 690px; height: 786px; -moz-user-select: none; border: 0px none; padding: 0px; margin: 0px;" src="http://maps.gstatic.com/mapfiles/iw3.png"></div><div style="width: 27px; height: 8px; overflow: hidden; position: absolute; z-index: 1; -moz-user-select: none; left: 137px; top: 158px;"><img style="position: absolute; left: -24px; top: -750px; width: 690px; height: 786px; -moz-user-select: none; border: 0px none; padding: 0px; margin: 0px;" src="http://maps.gstatic.com/mapfiles/iw3.png"></div><div style="width: 23px; height: 8px; overflow: hidden; position: absolute; z-index: 1; -moz-user-select: none; left: 132px; top: 165px;"><img style="position: absolute; left: -19px; top: -757px; width: 690px; height: 786px; -moz-user-select: none; border: 0px none; padding: 0px; margin: 0px;" src="http://maps.gstatic.com/mapfiles/iw3.png"></div><div style="width: 18px; height: 8px; overflow: hidden; position: absolute; z-index: 1; -moz-user-select: none; left: 127px; top: 172px;"><img style="position: absolute; left: -14px; top: -764px; width: 690px; height: 786px; -moz-user-select: none; border: 0px none; padding: 0px; margin: 0px;" src="http://maps.gstatic.com/mapfiles/iw3.png"></div><div style="width: 14px; height: 8px; overflow: hidden; position: absolute; z-index: 1; -moz-user-select: none; left: 122px; top: 179px;"><img style="position: absolute; left: -9px; top: -771px; width: 690px; height: 786px; -moz-user-select: none; border: 0px none; padding: 0px; margin: 0px;" src="http://maps.gstatic.com/mapfiles/iw3.png"></div><div style="width: 10px; height: 8px; overflow: hidden; position: absolute; z-index: 1; -moz-user-select: none; left: 117px; top: 186px;"><img style="position: absolute; left: -4px; top: -778px; width: 690px; height: 786px; -moz-user-select: none; border: 0px none; padding: 0px; margin: 0px;" src="http://maps.gstatic.com/mapfiles/iw3.png"></div><div style="width: 97px; height: 25px; overflow: hidden; position: absolute; z-index: 1; -moz-user-select: none; left: 113px; top: 99px;"><img style="position: absolute; left: 0px; top: -691px; width: 690px; height: 786px; -moz-user-select: none; border: 0px none; padding: 0px; margin: 0px;" src="http://maps.gstatic.com/mapfiles/iw3.png"></div><div style="position: absolute; left: 0px; top: 0px; width: 321px; height: 122px; overflow: hidden; -moz-user-select: none; background-color: white; border: 1px solid rgb(171, 171, 171);"></div><div style="width: 321px; height: 122px;"><div style="width: 10px; height: 10px; overflow: hidden; position: absolute; opacity: 0.7; right: 12px; top: 12px; z-index: 10000; cursor: pointer;"><img style="position: absolute; left: -18px; top: -44px; width: 68px; height: 67px; -moz-user-select: none; border: 0px none; padding: 0px; margin: 0px;" src="http://maps.gstatic.com/mapfiles/mv/imgs8.png"></div><div style="cursor: default; position: absolute; left: 18px; top: 18px; z-index: 2; overflow: auto; width: 287px; height: 88px;"><div style="overflow: auto;"><h2>Frederikshåb Hundeskov</h2><a href="/?p=424"> More Information</a></div></div></div></div></div>

1 个答案:

答案 0 :(得分:3)

我怀疑您正在使用Google地图的V3并将结果与​​bMap网站中的V2演示进行比较。气球(InfoWindows)在V2中具有圆角,在V3中具有方角。我没有看到bMap网站中提到的CSS。

有一个圆角气球实用工具库,名为InfoBubble (example here),但我不确定与bMap合并是多么容易。

关于看起来乱糟糟的盒子,是like in this question吗?有一个CSS修复程序适用于你的地图div:

#map_canvas label { width: auto; display:inline; }
#map_canvas img { max-width: none; max-height: none; }
相关问题