谷歌地图气球失去风格

Google Maps Balloon lost style

本文关键字:风格 失去 气球 谷歌地图      更新时间:2023-09-26

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

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

来自检查器的 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>

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

有一个圆角气球的实用程序库,称为InfoBubble(此处为示例),但我不确定与bMap合并有多容易。

关于盒子看起来乱七八糟,是不是像这个问题?有一个 CSS 修复程序可应用于您的地图div:

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