-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmapbox-2.html
45 lines (36 loc) · 1.1 KB
/
mapbox-2.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
<head>
<meta charset="UTF-8">
<title>Mapbox - 1</title>
<!-- Mapbox CSS -->
<link href='https://api.tiles.mapbox.com/mapbox-gl-js/v0.53.0/mapbox-gl.css' rel='stylesheet'/>
<script src='https://api.tiles.mapbox.com/mapbox-gl-js/v1.2.1/mapbox-gl.js'></script>
<link href='https://api.tiles.mapbox.com/mapbox-gl-js/v1.2.1/mapbox-gl.css' rel='stylesheet'/>
<!-- Custom CSS -->
<style>
#map {
/* the width and height may be set to any size */
width: 100%;
height: 700px;
}
</style>
<script src="js/keys.js" type="text/javascript"></script>
</head>
<body>
<div id='map' style='width: 100%; height: 600px;'></div>
<!-- Custom JS -->
<script>
/** Washington */
mapboxgl.accessToken = mapboxToken;
var map = new mapboxgl.Map({
container: 'map',
style: 'mapbox://styles/mapbox/streets-v9',
zoom: 8,
center: [-77.0369, 38.9072]
});
/** Set the marker */
var marker = new mapboxgl.Marker();
marker.setLngLat([-77.0502, 38.8893]);
marker.addTo(map);
</script>
</body>
</html>