<html>
<head>
<script src="http://ditu.google.cn/maps?file=api&v=2&key=你申请的api_key&sensor=false" type="text/javascript"></script>
<script>
function initialize() {
if (GBrowserIsCompatible()) {
var map= new GMap2(document.getElementById("map_canvas"));
map.setCenter(new GLatLng(39.9493, 116.3975), 13);
}
}
</script>
</head>
<body onload="initialize()">
<div id="map_canvas" style="width: 500px; height: 300px"></div>
</body>
</html>
{上一步中涉及到的api_key为在谷歌上申请的,如果没有可以用本人的“AIzaSyDYsBGQ_mBhRAb92nEHwTqJvdtMBDmqONQ”临时看下效果}
注意,上面这个例子只能进行显示和拖动,不支持其它