forked from matikin9/mapbox-studio-102
-
Notifications
You must be signed in to change notification settings - Fork 20
/
index.html
50 lines (44 loc) · 1.88 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
46
47
48
49
50
<!doctype html>
<html>
<head>
<title>MaptimeLA - Mapbox Studio 102!</title>
<!-- These metadata settings are helpful for viewing the page on a mobile device. -->
<meta name='viewport' content='initial-scale=1,maximum-scale=1,user-scalable=no' />
<!-- We're going to link to MapboxGL so we can use it to help us show a Mapbox map on the page. -->
<script src='https://api.tiles.mapbox.com/mapbox-gl-js/v0.35.1/mapbox-gl.js'></script>
<link href='https://api.tiles.mapbox.com/mapbox-gl-js/v0.35.1/mapbox-gl.css' rel='stylesheet' />
<style>
/* Normalize the page styles across different browsers. */
html, body {
width: 100%;
height: 100%;
padding: 0;
margin: 0;
}
/* Make the map area fill the whole screen. */
#myMap {
width: 100%;
height: 100%;
}
</style>
</head>
<body>
<!-- This div container will hold our map -->
<div id="myMap"></div>
<script>
// A special key for your Mapbox account. *** Paste the Access Token from Mapbox Studio below:
mapboxgl.accessToken = 'pk.eyJ1IjoibWF0aWtpbjkiLCJhIjoiYjMyMjBjZTE4NWUxMDkxOWZjZjFjZWEzZTcxNDUxOTkifQ._ldFl3e17jCs7aWm6zMZ3Q';
// Let's create our map and give it some default settings:
var map = new mapboxgl.Map({
// The ID of the container we're using for our map (from the HTML above):
container: 'myMap',
// The location of your style. *** Paste the Style URL from Mapbox Studio below:
style: 'mapbox://styles/matikin9/cj1omitxc001y2ro9v9g19hsi',
// The starting position your map will be centered around as [latitude, longitude] coordinates. Currently set to Los Angeles.
center: [-118.251, 34.047],
// The starting zoom level - larger numbers zoom in, smaller numbers zoom out.
zoom: 10
});
</script>
</body>
</html>