-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
63 lines (59 loc) · 2.22 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
<!DOCTYPE html>
<html lang="zh">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
<meta name="description" content="">
<meta name="keywords" content="">
<title>Document</title>
<link rel="shortcut icon" href="favicon.ico" type="image/x-icon">
<link rel="stylesheet" href="css/common.min.css">
<script src="js/jquery/jquery-2.2.4.min.js"></script>
<script src="js/common.js"></script>
</head>
<body>
<!-- 版权信息 -->
<div class="g-copyright">Copyright © 2019 <a href="">公司名称</a> All Right Reserved</div>
<!-- 百度地图示例 -->
<div class="cmap" id="allmap" style="width: 100%; height: 7.5rem;"></div>
<script type="text/javascript" src="http://api.map.baidu.com/api?v=2.0&ak=4E5A3Fb789138a0ab8431f42a887aea1"></script>
<script type="text/javascript">
// 百度地图API功能
var map = new BMap.Map("allmap");
var point = new BMap.Point(116.404, 39.915);
var marker = new BMap.Marker(point); // 创建标注
map.addOverlay(marker); // 将标注添加到地图中
map.centerAndZoom(point, 11); // 初始化地图,设置中心点坐标和地图级别
map.enableScrollWheelZoom(true); // 开启鼠标滚轮缩放
var opts = {
width: 100, // 信息窗口宽度
height: 60, // 信息窗口高度
title: "公司名称", // 信息窗口标题
}
var infoWindow = new BMap.InfoWindow("地址:公司所在地", opts); // 创建信息窗口对象
map.openInfoWindow(infoWindow, point); //开启信息窗口
</script>
<!-- 正在加载 -->
<div class="g-loading">
<span class="icon"></span>
<span>正在加载</span>
</div>
<!-- 加载失败 -->
<div class="g-loading-fail">
<p class="p1">加载失败</p>
<p class="p2">点击重新加载</p>
</div>
<!-- 没有更多 -->
<div class="g-nomore">没有更多</div>
<!-- 空 -->
<div class="g-empty">
<p class="icon"></p>
<p class="hint">暂无数据</p>
</div>
<!-- 返回顶部 -->
<div id="backtop">返回顶部</div>
<script>
backTop('backtop')
</script>
</body>
</html>