ProjectMap.cshtml
4.37 KB
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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
@section header
{
<link rel="stylesheet" href="/css/main.css" media="all" />
<link rel="shortcut icon" href="favicon.ico">
<link href="/css/homecss/bootstrap.min.css" rel="stylesheet" />
<link href="/css/homecss/font-awesome.min.css" rel="stylesheet" />
<link href="/css/homecss/animate.min.css" rel="stylesheet" />
<link href="/css/homecss/style.min862f.css" rel="stylesheet" />
}
<style>
#container {
overflow: hidden;
width: 100%;
height: 100%;
margin: 0;
font-family: "微软雅黑";
}
.dv-buttm {
width: 99.9%;
height: 100px;
display: flex;
z-index: 9999;
position: absolute;
top: 550px;
left: 0px;
justify-content: space-evenly;
}
.dv-one {
width: 20%;
height: 100%;
border: 1px rgb(55, 149, 242) solid;
border-radius: 20px;
background-color: #eeeeee;
}
.dv-two {
width: 20%;
height: 100%;
border: 1px rgb(55, 149, 242) solid;
border-radius: 20px;
background-color: #eeeeee;
}
.dv-three {
width: 20%;
height: 100%;
border: 1px rgb(55, 149, 242) solid;
border-radius: 20px;
background-color: #eeeeee;
}
.dv-four {
width: 20%;
height: 100%;
border: 1px rgb(55, 149, 242) solid;
border-radius: 20px;
background-color: #eeeeee;
}
.time {
width: 200px;
height: 50px;
z-index: 9999;
position: absolute;
top: 10px;
left: 100px;
}
</style>
<div id="container"></div>
<div class="dv-buttm">
<div class="dv-one">1</div>
<div class="dv-two">2</div>
<div class="dv-three">3</div>
<div class="dv-four">4</div>
</div>
<div class="time">倒计时:<span id="Time">10</span></div>
@section Scripts
{
@*<script type="text/javascript" src="/layui/layui.js"></script>*@
<script type="text/javascript" src="https://api.map.baidu.com/api?v=1.0&type=webgl&ak=tBGkcuOLqfRPot0mIWjKefcM"></script>
<script type="text/javascript">
var map = new BMapGL.Map("container"); // 创建地图实例
var point = new BMapGL.Point(113.34693, 28.21849); // 创建点坐标
map.centerAndZoom(point, 17);//初始化地图,设置中心点坐标和地图级别
map.enableScrollWheelZoom(true);//启用滚轮缩放
//map.setHeading(64.5); //设置地图旋转角度
//map.setTilt(73); //设置地图的倾斜角度
// 禁止地图旋转和倾斜可以通过配置项进行设置
//var map = new BMapGL.Map("allmap", {
// enableRotate: false,
// enableTilt: false
//});
var sContent = "<h4 style = 'margin:0;'>长沙华恒机器人系统有限公司</h4><br/>地址:湖南省长沙市浏阳市永裕北路和鼎盛路的交叉路口处<div style = 'display: flex;'><div><a href=''>12</a></div> <div style='margin-left:10px;'>456</div> <div style='margin-left:10px;'>789</div></div>" //定义大标题 写html语句标签
var infoWindow=new BMapGL.InfoWindow(sContent)
map.openInfoWindow(infoWindow,point);
// 添加地图上的覆盖物——标记
var mk = new BMapGL.Marker(point)
mk.setAnimation(BMAP_ANIMATION_BOUNCE)
map.addOverlay(mk)
// 添加导航控件
map.addControl(new BMapGL.NavigationControl())
// 添加缩放控件
//map.addControl(new BMapGL.ScaleControl())
// 添加概览图控件
//map.addControl(new BMapGL.OverviewMapControl())
// 添加地图类型控件
//map.addControl(new BMapGL.MapTypeControl())
//使用匿名函数方法 一秒调一次 更改提示数值
var myVar = setInterval(function () {
countDown()
}, 1000)
// 函数方法
function countDown() {
// 获取提示数值
var time = document.getElementById('Time')
//获取到id为time标签中的内容,现进行判断
if (time.innerHTML == 0) {
// //等于0时清除计时
// clearInterval(myVar)
// console.log('停止')
time.innerHTML = 10
} else {
time.innerHTML = time.innerHTML - 1
}
}
</script>
}