-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmapbox_maps_api.html
More file actions
49 lines (41 loc) · 1.49 KB
/
mapbox_maps_api.html
File metadata and controls
49 lines (41 loc) · 1.49 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
<!--from class on 8/19/2021-->
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="initial-scale=1,maximum-scale=1,user-scalable=no">
<title>Mapbox API Exercise</title>
<script src='https://api.mapbox.com/mapbox-gl-js/v2.4.1/mapbox-gl.js'></script>
<link href='https://api.mapbox.com/mapbox-gl-js/v2.4.1/mapbox-gl.css' rel='stylesheet' />
<style>
#map {
width: 800px;
height: 800px;
}
</style>
</head>
<body>
<div id='map' style='width: 400px; height: 300px;'></div>
<script>
mapboxgl.MAPBOX_API_TOKEN = 'pk.eyJ1IjoiYWZvbnNlMDYiLCJhIjoiY2tzajE0bTdsMjlidDJ0bzI1anIydXVrciJ9.-YhC_3aIZRT7uqej5QwY0Q';
const map = new mapboxgl.Map({
container: 'map', // container ID
style: 'mapbox://styles/mapbox/streets-v11', // style URL
center: [-74.5, 40], // starting position [lng, lat]
zoom: 9 // starting zoom
});
</script>
<!--<script src='https://api.mapbox.com/mapbox-gl-js/v2.4.1/mapbox-gl.js'></script>-->
<!--<script src="js/keys.js"></script>-->
<!--<script>-->
<!-- "use strict";-->
<!-- mapboxgl.accessToken = MAPBOX_API_TOKEN;-->
<!-- var map = new mapboxgl.Map({-->
<!-- container: 'map', // container ID-->
<!-- style: 'mapbox://styles/mapbox/streets-v11', // style URL-->
<!-- center: [-98.9431, 29.6047], // starting position [lng, lat]-->
<!-- zoom: 12 // starting zoom-->
<!-- });-->
<!--</script>-->
</body>
</html>