谷歌映射API v3: InfoWindow大小不正确
It appears my InfoWindow, when you click on the home icon on my Google Maps v3, is not properly auto-sizing to the content of the InfoWindow.
当你点击谷歌地图v3上的home图标时,会发现我的InfoWindow没有正确地自动调整到InfoWindow的内容。
It gives scrollbars when it should not. The InfoWindow should be properly auto-sizing.
它给滚动条当它不应该。InfoWindow应该正确地自动调整尺寸。
Any ideas on why?
任何想法在为什么?
Per request, the relevant JavaScript which injects the HTML for the InfoWindow:
根据请求,为InfoWindow注入HTML的相关JavaScript:
listing = '<div>Content goes here</div>';
UPDATE
更新
This bug was handled by Google in issue
这个bug由谷歌处理
https://issuetracker.google.com/issues/35823659
https://issuetracker.google.com/issues/35823659
The fix was implemented in February 2015 in version 3.19 of Maps JavaScript API.
这个修复在2015年2月在地图JavaScript API的3.19版本中实现。
34 个解决方案
#1
30
Add a div inside your infowindow
在你的infowindow中添加一个div
<div id=\"mydiv\">YourContent</div>
Then set the size using css. works for me. This asumes all infowindows are the same size!
然后使用css设置大小。为我工作。所有的信息都是一样的大小!
#mydiv{
width:500px;
height:100px;
}
更多相关文章
- 如何在HTML页面中维护SWF文件的大小?
- Python中字符大小写的问题
- 使用python api递归计算每个Dropbox文件夹大小
- Django i18n:为{% blocktrans %}块推荐的大小和格式?
- 在Python中排序和使用地图
- 获取Linux 内存页大小的命令
- Linux系统下查看目录大小
- linux下mysql表名大小写敏感问题
- 既然sql对大小写不敏感,为什么几乎所有材料都用大写?