12th:MAP.API

<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>MapAPI</title>
<style type="text/css">
html{height:100%}
body{height:100%;
margin:0px;
padding:0px;
display: flex;
justify-content: center;
align-items: center;
}
#Map{
height:600px;
width:1200px;
border:1px solid blue;}
</style>
<script type="text/javascript" src="http://api.map.baidu.com/api?v=2.0&ak=eacL7kuVOHmW3lljERQC9NWAmotoqL3b">
//v2.0版本的引用方式:src="http://api.map.baidu.com/api?v=2.0&ak=您的密钥"
</script>
</head>
<body>
<div id="Map"></div>
</body>
<script type="text/javascript">
var map = new BMap.Map("Map"); // 创建地图实例
var point = new BMap.Point(104.193,30.654); // 创建点坐标,最好是能获取位置
map.centerAndZoom(point, 18); // 初始化地图,设置中心点坐标和地图级别
//设置一个滚动放大地图
</script>
</html>
posted @ 2018-12-03 14:03  卷公举  阅读(66)  评论(0编辑  收藏  举报