0
<script type="text/javascript"
src="http://maps.googleapis.com/maps/api/js?key=MYKEYHERE&sensor=false">
</script>
<script type="text/javascript">
var simplerweb = new google.maps.LatLng(55.977046,-3.197118);
var marker;
var map;
function initialize() {
var myOptions = {
center: new google.maps.LatLng(55.977046,-3.197118),
disableDefaultUI: true,
zoom: 15,
scrollwheel: false,
navigationControl: false,
mapTypeControl: false,
scaleControl: false,
draggable: false,
mapTypeId: google.maps.MapTypeId.ROADMAP
};
var map = new google.maps.Map(document.getElementById("map_canvas"),
myOptions);
marker = new google.maps.Marker({
map:map,
draggable:true,
animation: google.maps.Animation.DROP,
position: andrewmorris,
icon: 'http://www.andrewsmorris.co.uk/images/point.png'
});
google.maps.event.addListener(marker, 'click', toggleBounce);
}
function toggleBounce() {
if (marker.getAnimation() != null) {
marker.setAnimation(null);
} else {
marker.setAnimation(google.maps.Animation.BOUNCE);
}
}
</script>
所以我不明白爲什麼這不是在我的新網站上工作,在我的舊網站上正常工作。谷歌地圖API不能在我的網站上工作
我在一個div傾倒稱爲map_canvas提供
它應該工作,對不對? 谷歌地圖API設置爲允許來自該URL的引薦。
啊,是的,onload電話是我失蹤! 謝謝! – andy