-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathhomesteadmap.html
More file actions
78 lines (69 loc) · 2.41 KB
/
homesteadmap.html
File metadata and controls
78 lines (69 loc) · 2.41 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
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
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Display a globe on a webpage</title>
<meta name="viewport" content="initial-scale=1,maximum-scale=1,user-scalable=no">
<!-- Favicons -->
<link rel="icon" type="image/png" sizes="192x192" href="https://raw.githubusercontent.com/CommunityScale/media-kit/main/favicon/communityscale-favicon-192.png">
<link rel="icon" type="image/png" sizes="512x512" href="https://raw.githubusercontent.com/CommunityScale/media-kit/main/favicon/communityscale-favicon-512.png">
<link rel="apple-touch-icon" sizes="192x192" href="https://raw.githubusercontent.com/CommunityScale/media-kit/main/favicon/communityscale-favicon-192.png">
<link href="https://api.mapbox.com/mapbox-gl-js/v2.11.0/mapbox-gl.css" rel="stylesheet">
<script src="https://api.mapbox.com/mapbox-gl-js/v2.11.0/mapbox-gl.js"></script>
<style>
body { margin: 0; padding: 0; }
#map { position: absolute; top: 0; bottom: 0; width: 100%; }
</style>
</head>
<body>
<div id="map"></div>
<script>
mapboxgl.accessToken = 'pk.eyJ1Ijoic2FyYWJyZW50IiwiYSI6ImNtMHpsb2Q4NTAwemoybHExbnB6eHVvZ2kifQ.nH0hUSv3IGzX6MkYB_cSmA';
const map = new mapboxgl.Map({
container: 'map',
// Choose from Mapbox's core styles, or make your own style with Mapbox Studio
style: 'mapbox://styles/mapbox/light-v11',
zoom: 11,
center: [-72.688122,44.467397],
projection: 'globe'
});
map.on('load', () => {
// Set the default atmosphere style
map.setFog({});
map.addSource('mapillary', {
'type': 'vector',
'tiles': [
'https://tiles.mapillary.com/maps/vtp/mly1_public/2/{z}/{x}/{y}?access_token=MLY|4142433049200173|72206abe5035850d6743b23a49c41333'
],
'minzoom': 8,
'maxzoom': 14
})
map.addSource('StoweAllResi', {
type: 'geojson',
data: 'StoweAllResi2.geojson'
});
map.addLayer({
id: 'StoweHome-points',
type: 'circle',
source: 'StoweAllResi',
paint: {
'circle-color': [
'match',
['get', 'home'],
'yes', '#1E88E5',
'no', '#D81B60',
'#cccccc' // default color if value doesn't match
],
'circle-radius': {
'base': 1.75,
'stops': [
[12, 2],
[22, 180]
]
}
}
});s
});
</script>
</body>
</html>