forked from IDCE-MSGIS/studio-week2
-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
62 lines (54 loc) · 2.26 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
51
52
53
54
55
56
57
58
59
60
61
62
<!doctype html>
<html>
<head>
<title>Studio Week 2</title>
<!-- Adding in the Leaflet CSS file -->
<link rel="stylesheet" href="https://unpkg.com/leaflet@1.6.0/dist/leaflet.css" />
<!-- Adding Leaflet JavaScript file -->
<script src="https://unpkg.com/leaflet@1.6.0/dist/leaflet.js"></script>
<!-- Adding styling info for the map -->
<style type="text/css">
/* Add a CSS rule that selects an element with the ID "mapId" and gives it a height of 600 pixels */
</style>
<!-- Adding styling info for page layout by reading in a CSS file -->
<link rel="stylesheet" href="styles.css">
</head>
<body>
<h1 id = "title">STUDIO WEEK 2 </h1>
<br>
<a style="font-size:20px" href=theahostetler.github.io> Check out my other work</a>
<br>
<!-- Add multiple pages to web page-->
<!-- active class displays the grey box around current page-->
<ul>
<li><a class="active" href="index.html" target="_self">Output 1</a></li>
<li><a href="Mapbox-gl-js-cwm.html" target="_self">Output 2</a></li>
<li><a href="Mapbox-gl-js-ct.html" target="_self">Output 3</a></li>
<li><a href="Mapbox-gl-js-bm.html" target="_self">Output 4</a></li>
</ul>
<br>
<div id ="subtitle">
<h1> Raster tiles with Leaflet </h1>
</div>
<br>
<!-- Add a div with id="mapId" to give the map somewhere to go -->
<div id="mapId"></div>
<script>
// Create a variable called "map" to house your Leaflet map and all of its functionality
var map = L.map('mapId').setView([37.754700, -122.420790], 14);
/*
* Use Leaflet's tileLayer method to create a new tile layer, then add it to the map
** Reference: https://leafletjs.com/reference-1.6.0.html#tilelayer
*/
L.tileLayer('https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png', {
attribution: '© <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors'
}).addTo(map);
/* Try changing out the tile source for something else. Hint: you can find
* lots of tile sources here: https://leaflet-extras.github.io/leaflet-providers/preview/
*/
</script>
<br>
<p style="font-size:10px;"> <i> Background image from <a href=https://hitinfrastructure.com/images/site/features/Network_conntectivity.jpg>hitinfrastructure.com</a></i></p>
<br>
</body>
</html>