最近某個專案會用到Google map的API
可參考 http://www.w3schools.com/googleapi/
center:new google.maps.LatLng(51.508742,-0.120850),
台灣應該是(23.76, 120.94)
因為台灣比較小個,zoom:5,可以設成zoom:7,看起來比較好看XD
<!DOCTYPE html>
<html>
<head>
<script src="http://maps.googleapis.com/maps/api/js"></script>
<script>
function initialize() {
var mapProp = {
center:new google.maps.LatLng(51.508742,-0.120850),
zoom:5,
mapTypeId:google.maps.MapTypeId.ROADMAP
};
var map=new google.maps.Map(document.getElementById("googleMap"),mapProp);
}
google.maps.event.addDomListener(window, 'load', initialize);
</script>
</head>
<body>
<div id="googleMap" style="width:500px;height:380px;"></div>
</body>
</html>
留言列表