-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmyFirstMap.html
More file actions
32 lines (27 loc) · 1.08 KB
/
Copy pathmyFirstMap.html
File metadata and controls
32 lines (27 loc) · 1.08 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
<!DOCTYPE html>
<html>
<head>
<meta charset=“utf-8”>
<title> GEOG 485L/585L -- My First Map </title>
<!-- Stylesheets -->
<link rel="stylesheet" href="JS_CSS_downloaded_libraries/leaflet/leaflet.css" />
<!-- Scripts -->
<script src="JS_CSS_downloaded_libraries/leaflet/leaflet.js"></script>
</head>
<body>
<p>
My first map will appear here:
</p>
<div id="mapId" style="height: 400px; width: 600px;"></div>
<script>
// Bandelier Hall East lat/long: 35.0843° N, 106.6241° W
// create a map variable "mymap" that points to the map placed in the mapID <div>
// zoom the view on Bandelier Hall East building at a 17 zoom level
var mymap = L.map('mapId').setView([35.08444, -106.6247], 17);
// create a variable named "osm" that is used to hold OpentStreetMap tile layer
var osm = new L.tileLayer('https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png');
// add the OpenStreetMap tile layer (i.e., the variable osm you defined above) to the map
osm.addTo(mymap);
</script>
</body>
</html>