google-maps - Google Map InfoWindow 在 Google Chrome 中显示滚动条

标签 google-maps

由于某种原因,InfoWindow 与内容一起显示滚动条,我尝试为 InfoWindow 设置自定义宽度和高度,但它没有显示。 我尝试了这里的解决方案 Google Map Infowindow not showing properly

请引用以下链接 http://server.ashoresystems.com/~contacth/index.php?option=com_business&view=categoryresult&catid=2

  • 点击 1(有滚动条)
  • 点击 3(即使受到干扰)

感谢您的帮助。

最佳答案

我找到了解决方法here .

我做了这个JSfiddle ,显示错误和解决方法。

如果您不想访问外部链接,以下是解决方法说明:

将包装 div 添加到信息窗口内容:

var infoWindow = new google.maps.InfoWindow({
    content: '<div class="scrollFix">'+infoWindowContent+'</div>',
    [...]
}).open(map);

并使用 CSS 定义来避免滚动条:

.scrollFix {
    line-height: 1.35;
    overflow: hidden;
    white-space: nowrap;
}

关于google-maps - Google Map InfoWindow 在 Google Chrome 中显示滚动条,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/19954893/

相关文章:

jQuery getScript 返回解析错误异常

android - 在 Android 中的谷歌地图的标记信息窗口中添加 Spinner

javascript - 谷歌地球 : How to create a custom Balloon?

php - TypeError : k. google.maps.Load is not a function 错误在gmap

iphone - iOS:使用 CLGeocoder 与 ReverseGeocoding。谷歌地理编码器 API

javascript - 如何将网页上的位置搜索与 Google map 集成?

google-maps - 运行 https 的站点的 map 控件

javascript - 将查询字符串写入 HTML 文档

android - 如何解决 com.google.android.gms.R$styleable 错误的 java.lang.NoClassDefFoundError?

android - Android 中 Google map 中两个 GeoPoints 之间的方向