forked from aesqe/mapboxgl-minimap
-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
32 lines (25 loc) · 864 Bytes
/
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
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Mapbox GL Minimap</title>
<link rel="stylesheet" href="https://api.mapbox.com/mapbox-gl-js/v0.18.0/mapbox-gl.css">
</head>
<body>
<div id="map" style="width: 1280px; height: 720px;"></div>
<script type="text/javascript" src="https://api.mapbox.com/mapbox-gl-js/v0.18.0/mapbox-gl.js"></script>
<script type="text/javascript" src="mapboxgl-control-minimap.js"></script>
<script type="text/javascript">
mapboxgl.accessToken = "pk.eyJ1IjoiYWVzcWUiLCJhIjoiY2lmNGVxYnNnMDNrenJya2xzbmQ4M281bCJ9.GfMJ8R2NX1dDcc9Hs2PO3A";
var map = new mapboxgl.Map({
container: "map",
style: "mapbox://styles/mapbox/streets-v8",
center: [-73.94656812952897, 40.72912351406106],
zoom: 7
});
map.on("load", function () {
map.addControl(new mapboxgl.Minimap());
});
</script>
</body>
</html>