我无法弄清楚为什么 Google Maps InfoWindow 无法正确显示。截图如下:
知道可能是什么原因造成的吗?
这是代码(js):
/**
* Basic Map
*/
$(document).ready(function(){
var map = new GMaps({
el: '#basic_map',
lat: 51.5073346,
lng: -0.1276831,
zoom: 10,
zoomControl : true,
zoomControlOpt: {
style : 'SMALL',
position: 'TOP_LEFT'
},
panControl : false,
});
map.addMarker({
lat: 51.5073346,
lng: -0.1276831,
title: 'Big Ben',
infoWindow: {
content: 'Big Ben is the nickname for the great bell of the clock at the north end of the Palace of Westminster in London, and often extended to refer to the clock and the clock tower, officially named Elizabeth Tower.'
}
});
});
CSS:
.map {
display: block;
width: 95%;
height: 350px;
margin: 0 auto;
-moz-box-shadow: 0px 5px 20px #ccc;
-webkit-box-shadow: 0px 5px 20px #CCC;
box-shadow: 0px 5px 20px #CCC;
}
html:
<script type="text/javascript" src="http://maps.google.com/maps/api/js?sensor=true"></script>
<script type="text/javascript" src="https://raw.github.com/HPNeo/gmaps/master/gmaps.js"></script>
...
<div id="basic_map" class="lg-map"></div>