-
Notifications
You must be signed in to change notification settings - Fork 0
/
map.html
27 lines (26 loc) · 894 Bytes
/
map.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
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Display a map with a custom style</title>
<meta name="viewport" content="initial-scale=1,maximum-scale=1,user-scalable=no">
<link href="https://api.mapbox.com/mapbox-gl-js/v3.2.0/mapbox-gl.css" rel="stylesheet">
<script src="https://api.mapbox.com/mapbox-gl-js/v3.2.0/mapbox-gl.js"></script>
<style>
body { margin: 0; padding: 0; }
#map { position: absolute; top: 0; bottom: 0; width: 100%; }
</style>
</head>
<body>
<div id="map"></div>
<script>
mapboxgl.accessToken = 'pk.eyJ1IjoiZ3JvbXBoOTkiLCJhIjoiY2x1NGt5Z3ZnMTd5NzJpbzMwY2g2andtNSJ9.Xks1OhTa4pw29GO4wKzPiw';
const map = new mapboxgl.Map({
container: 'map', // container ID
style: 'mapbox://styles/gromph99/clu4l74hj026e01oigmt295hj/draft',
center: [-123.12328, 42.42930],
zoom: 11
});
</script>
</body>
</html>