-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
45 lines (43 loc) · 1.25 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
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>maplibre-gl-overview-map</title>
<script src="https://unpkg.com/maplibre-gl/dist/maplibre-gl.js"></script>
<script src="https://unpkg.com/[email protected]/dist/maplibre-gl-overview-map.umd.js"></script>
<link
href="https://unpkg.com/maplibre-gl/dist/maplibre-gl.css"
rel="stylesheet"
/>
<link
href="https://unpkg.com/[email protected]/dist/maplibre-gl-overview-map.css"
rel="stylesheet"
/>
<style>
#map {
top: 0;
bottom: 0;
left: 0;
right: 0;
position: absolute;
width: 100%;
}
</style>
</head>
<body>
<div id="map"></div>
<script>
let map = new maplibregl.Map({
container: 'map',
style: 'https://yuchuntsao.github.io/simple-vector-tiles/style.json',
center: [0, 0],
zoom: 4
})
map.addControl(new maplibregl.NavigationControl(), 'bottom-right')
// Default style
const defaultOverviewMapControl = new OverviewMapControl()
map.addControl(defaultOverviewMapControl)
</script>
</body>
</html>