我的 html 页面中有一个谷歌地图:
<div class="row">
<div class="span6">
<div id="map_canvas"></div>
</div>
<div class="span6">
<h3>Heading</h3>
<p>Donec id elit non mi porta gravida at eget metus. Fusce dapibus, tellus ac cursus commodo, tortor mauris condimentum nibh, ut fermentum massa justo sit amet risus. Etiam porta sem malesuada magna mollis euismod. Donec sed odio dui. </p>
<p><a class="btn" href="#">View details »</a></p>
</div>
我的 javascript 地图设置:
var settingsItemsMap = {
zoom: 11,
center: new google.maps.LatLng(51.056703, 3.719999),
zoomControlOptions: {
style: google.maps.ZoomControlStyle.LARGE
},
mapTypeId: google.maps.MapTypeId.ROADMAP
};
var map = new google.maps.Map(document.getElementById('map_canvas'), settingsItemsMap );
我知道我必须将其添加到我的 css 文件中:
#map_canvas img{
max-width: none;
}
但是我还是什么都没显示!我错过了什么吗?