【发布时间】:2013-08-22 10:08:50
【问题描述】:
您好我正在尝试将图像添加到谷歌地图信息窗口中,我的代码就像这样一个脚本
var ContactUs = function () {
return {
//main function to initiate the module
init: function () {
var map;
$(document).ready(function(){
map = new GMaps({
div: '#map',
lat: -13.004333,
lng: -38.494333,
});
var marker = map.addMarker({
lat: -13.004333,
lng: -38.494333,
title: 'Loop, Inc.',
infoWindow: {
content: "<b>Loop, Inc.</b> 795 Park Ave, Suite 120<br>San Francisco, CA 94107"
}
});
marker.infoWindow.open(map, marker);
});
}
};
}();
然后在我的 HTML 中它被这样调用:
<div class="row-fluid">
<div id="map" class="gmaps margin-bottom-40" style="height:400px;"></div>
</div>
我尝试在脚本文件中添加图像标签,但它不起作用,我知道我必须在 html 文件中添加一些代码,但不确定是什么?
【问题讨论】:
标签: javascript html image google-maps infowindow