gpt4 book ai didi

ruby-on-rails - 谷歌地图信息窗口缺少图像/角落

转载 作者:行者123 更新时间:2023-12-04 05:31:20 27 4
gpt4 key购买 nike

我的谷歌地图实例中的信息窗口看起来很有趣:info window with missing background imges

构成信息窗口图形角落和末端的某些图像似乎丢失了。知道为什么会这样吗?我正在尝试,但还没有弄清楚。

我正在使用 gmap3 ,一个用于 google 的 V3 API 的 JQuery 包装器。这是我设置 map 的代码(javascript/haml):

  <script>


$(window).load(function() {
$('#map').gmap3();
var bounds = new google.maps.LatLngBounds ();
-@areas.each do |area|
bounds.extend(new google.maps.LatLng(#{area.latitude}, #{area.longitude}));
$('#map').gmap3(
{
action:'addMarker',
latLng:[#{area.latitude},#{area.longitude}],
events:{click:function(marker, event){
$(this).gmap3({action:'clear',list:['infoWindow']});
$(this).gmap3(
{
action:'addInfoWindow',
latLng:marker.getPosition(),
infowindow:
{content:"#{escape_javascript(link_to area.name, area)}<br>#{escape_javascript(image_tag area.image_holder.image.url(:thumb)) if area.image_holder.present?}"}
}
)}}
}
);
$('#map').gmap3('get').fitBounds(bounds);
$('.clickable_row').click(function() {
var id = $(this).attr('id');
window.location = '#{areas_path}' + '/' + id;
});
});
</script>

最佳答案

我已经看到这是由覆盖 map 的最大宽度规则引起的。尝试设置这个:

#map img { max-width: none; } 

关于ruby-on-rails - 谷歌地图信息窗口缺少图像/角落,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/6103171/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com