-
Notifications
You must be signed in to change notification settings - Fork 4
/
weha-willi-ehamp.html
69 lines (61 loc) · 2.66 KB
/
weha-willi-ehamp.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
63
64
65
66
67
68
69
<!DOCTYPE html>
<html>
<head>
<title>WeHa-Willi-EHampton Loop</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta charset="utf-8">
<link rel="shortcut icon" href="favicon.ico">
<!-- load Bootstrap CSS for mobile devices -->
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous">
<!-- Load Leaflet from a https CDN, not http. Look for updates at http://leafletjs.com/download.html -->
<link rel="stylesheet" href="https://unpkg.com/[email protected]/dist/leaflet.css"
integrity="sha512-xwE/Az9zrjBIphAcBb3F6JVqxf46+CDLwfLMHloNu6KEQCAWi6HcDUbeOfBIptF7tcCzusKFjFw2yuvEpDL9wQ=="
crossorigin=""/>
<script src="https://unpkg.com/[email protected]/dist/leaflet.js"
integrity="sha512-GffPMF3RvMeYyc1LWMHtK8EbPv0iNZ8/oTtHPx9/cc2ILxQ+u905qIwdpULaqDkyBKgOaB57QTMg7ztg8Jm2Og=="
crossorigin=""></script>
<!-- load jQuery -->
<script src="https://code.jquery.com/jquery-3.3.1.min.js"
integrity="sha256-FgpCb/KJQlLNfOu91ta32o/NMZxltwRo8QtmkMRdAu8="
crossorigin="anonymous"></script>
<!-- Load Esri Leaflet -->
<script src="https://unpkg.com/[email protected]/dist/esri-leaflet.js"
integrity="sha512-YZ6b5bXRVwipfqul5krehD9qlbJzc6KOGXYsDjU9HHXW2gK57xmWl2gU6nAegiErAqFXhygKIsWPKbjLPXVb2g=="
crossorigin=""></script>
<!-- load Font-Awesome -->
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.6.3/css/font-awesome.min.css">
<!-- load custom css -->
<link rel="stylesheet" href="style.css"/>
</head>
<body>
<div id="map"></div>
<script>
// center map to match initial checkbox gatherBounds
var map = L.map('map', {
center: [41.704856, -72.505183],
zoom: 11,
zoomControl: false, // add later to reposition
scrollWheelZoom: false
});
// option: add links to download GPX files
map.attributionControl
.setPrefix("View <a href='https://github.com/jackdougherty/bikemapcode' target='_blank'>code on GitHub</a>");
new L.control.zoom({position: "topleft",}).addTo(map);
L.control.scale().addTo(map);
// baselayer
var Esri_WorldStreetMap = L.tileLayer('https://server.arcgisonline.com/ArcGIS/rest/services/World_Street_Map/MapServer/tile/{z}/{y}/{x}', {
attribution: 'Tiles © Esri'
}).addTo(map);
function onEachFeature(feature, layer) {
var popupText = feature.properties.name;
layer.bindPopup(popupText);
}
$.getJSON("routes/weha-willi-ehamp.geojson", function (data){
var geoJsonLayer = L.geoJson(data, {
style: {color: "blue", weight: 3 },
onEachFeature: onEachFeature
}).addTo(map);
});
</script>
</body>
</html>