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;
}

更多相关文章

  1. 如何在HTML页面中维护SWF文件的大小?
  2. Python中字符大小写的问题
  3. 使用python api递归计算每个Dropbox文件夹大小
  4. Django i18n:为{% blocktrans %}块推荐的大小和格式?
  5. 在Python中排序和使用地图
  6. 获取Linux 内存页大小的命令
  7. Linux系统下查看目录大小
  8. linux下mysql表名大小写敏感问题
  9. 既然sql对大小写不敏感,为什么几乎所有材料都用大写?

随机推荐

  1. Emacs中的Python 2和3都是如此
  2. Python测试函数和类 笨方法学习Python
  3. python将回车作为输入内容
  4. 读取python中的unicode文件,该文件以与pyt
  5. NMF算法简介及python实现(gradient desce
  6. 凡哥带你玩转OpenCV-预备知识
  7. Impala实践之六:使用Rest Api
  8. 【python之路45】tornado的用法 (三)
  9. 建模分析之机器学习算法(附python&R代码)
  10. Python新式类和经典类的区别