-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
26 lines (24 loc) · 934 Bytes
/
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
<!DOCTYPE html>
<html>
<head>
<title>GeoJSON Map</title>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="https://unpkg.com/leaflet/dist/leaflet.css" />
</head>
<body>
<div id="map" style="width: 100%; height: 600px;"></div>
<script src="https://unpkg.com/leaflet/dist/leaflet.js"></script>
<script>
var map = L.map('map').setView([37.7749, -122.4194], 13); // Adjust the coordinates and zoom level as needed
L.tileLayer('https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png', {
maxZoom: 19
}).addTo(map);
fetch('https://github.com/stauby22/nashville-geos/blob/main/Zip_Codes_20240515.geojson')
.then(response => response.json())
.then(data => {
L.geoJSON(data).addTo(map);
});
</script>
</body>
</html>