first commit
This commit is contained in:
48
txmap.html
Normal file
48
txmap.html
Normal file
@@ -0,0 +1,48 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta http-equiv="X-UA-Compatible" content="ie=edge">
|
||||
<title>Document</title>
|
||||
<style>
|
||||
|
||||
#container {
|
||||
width: 800px;
|
||||
height: 400px;
|
||||
margin: 0 auto;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<h1>腾讯地图</h1>
|
||||
<div id="container"></div>
|
||||
<script charset="utf-8" src="https://map.qq.com/api/js?v=2.exp&key=VOTBZ-GGMCU-QSBVC-24IZ7-ACOL3-Z2BDA&libraries=drawing,geometry,autocomplete,convertor"></script>
|
||||
<script>
|
||||
window.onload = function() {
|
||||
init();
|
||||
};
|
||||
//初始化函数
|
||||
var init = function() {
|
||||
//获取地图显示控件
|
||||
var map = new qq.maps.Map(document.getElementById("container"), {
|
||||
//加载地图经纬度信息
|
||||
center: new qq.maps.LatLng(39.916527, 116.397128),
|
||||
zoom: 13, //设置缩放级别
|
||||
draggable: true, //设置是否可以拖拽
|
||||
scrollwheel: true, //设置是否可以滚动
|
||||
disableDoubleClickZoom: false //设置是否可以双击放大
|
||||
});
|
||||
|
||||
// var scaleControl = new qq.maps.ScaleControl({
|
||||
// align: qq.maps.ALIGN.BOTTOM_LEFT,
|
||||
// margin: qq.maps.Size(85, 15),
|
||||
// map: map
|
||||
// });
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
Reference in New Issue
Block a user