-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmap_mousemove
More file actions
61 lines (39 loc) · 1.03 KB
/
Copy pathmap_mousemove
File metadata and controls
61 lines (39 loc) · 1.03 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
<!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta charset="utf-8">
<title>MapVGL</title>
<meta http-equiv="X-UA-Compatible" content="IE=Edge">
<meta name="viewport" content="initial-scale=1.0, user-scalable=no">
<style>
html,
body {
width: 100%;
height: 100%;
margin: 0;
padding: 0;
}
#map_container {
height: 40vh;
width: 40vh;
}
</style>
<script type="text/javascript" src="https://api.map.baidu.com/api?type=webgl&v=1.0&ak=zLhopYPPERGtpGOgimcdKcCimGRyyIsh&services="></script>
</head>
<body>
<div id="map_container"></div>
<script>
var map = new BMapGL.Map('map_container', {
});
map.enableScrollWheelZoom();
const center = new BMapGL.Point(121.30654632240122, 31.25744185633306)
map.centerAndZoom(center, 12);
map.addEventListener('mousemove', e =>{
console.log('mousemove', e);
})
map.addEventListener('mouseout', e =>{
console.log('mouseout', e);
})
</script>
</body>
</html>