Repository navigation
Expand file tree
/
Copy pathmap.html
More file actions
73 lines (68 loc) · 3.88 KB
/
Copy pathmap.html
File metadata and controls
73 lines (68 loc) · 3.88 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
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8" />
<script>
L_NO_TOUCH = false;
L_DISABLE_3D = false;
</script>
<style>html, body {width: 100%;height: 100%;margin: 0;padding: 0;}</style>
<style>#map {position:absolute;top:0;bottom:0;right:0;left:0;}</style>
<script src="https://cdn.jsdelivr.net/npm/leaflet@1.6.0/dist/leaflet.js"></script>
<script src="https://code.jquery.com/jquery-1.12.4.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.2.0/js/bootstrap.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/Leaflet.awesome-markers/2.0.2/leaflet.awesome-markers.js"></script>
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/leaflet@1.6.0/dist/leaflet.css"/>
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.2.0/css/bootstrap.min.css"/>
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.2.0/css/bootstrap-theme.min.css"/>
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.6.3/css/font-awesome.min.css"/>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/Leaflet.awesome-markers/2.0.2/leaflet.awesome-markers.css"/>
<link rel="stylesheet" href="https://cdn.jsdelivr.net/gh/python-visualization/folium/folium/templates/leaflet.awesome.rotate.min.css"/>
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
<style>
#map_20d84243b5f931a53dec522b57ffec2f {
position: relative;
width: 100.0%;
height: 100.0%;
left: 0.0%;
top: 0.0%;
}
</style>
</head>
<body>
<div class="folium-map" id="map_20d84243b5f931a53dec522b57ffec2f" ></div>
<script>
var map_20d84243b5f931a53dec522b57ffec2f = L.map("map_20d84243b5f931a53dec522b57ffec2f", {
center: [35.2271, -80.8431], // Central position
crs: L.CRS.EPSG3857,
zoom: 5,
zoomControl: true,
preferCanvas: false,
});
var tile_layer_cfbe557b02e4747d08ad61f0cd245162 = L.tileLayer(
"https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png",
{"attribution": "Data by © OpenStreetMap, under ODbL.", "detectRetina": false, "maxNativeZoom": 18, "maxZoom": 18, "minZoom": 0, "noWrap": false, "opacity": 1, "subdomains": "abc", "tms": false}
).addTo(map_20d84243b5f931a53dec522b57ffec2f);
var locations = [
{lat: 37.0842, lon: -88.6000, popup: "Paducah, Kentucky - Start"},
{lat: 35.1525, lon: -88.0339, popup: "Shiloh, Tennessee"},
{lat: 32.3527, lon: -90.8779, popup: "Vicksburg, Mississippi"},
{lat: 35.0456, lon: -85.3097, popup: "Chattanooga, Tennessee"},
{lat: 33.7490, lon: -84.3880, popup: "Atlanta, Georgia"},
{lat: 32.0835, lon: -81.0998, popup: "Savannah, Georgia"},
{lat: 34.0007, lon: -81.0348, popup: "Columbia, South Carolina"},
{lat: 35.7796, lon: -78.6382, popup: "Raleigh, North Carolina - End"}
];
var polyline_points = locations.map(location => [location.lat, location.lon]);
locations.forEach(function(location) {
var marker = L.marker([location.lat, location.lon], {}).addTo(map_20d84243b5f931a53dec522b57ffec2f);
var popup = L.popup({"maxWidth": "100%"}).setContent(`<div>${location.popup}</div>`);
marker.bindPopup(popup);
marker.bindTooltip(`<div>${location.popup}</div>`, {"sticky": true});
});
var poly_line = L.polyline(polyline_points, {
"bubblingMouseEvents": true, "color": "blue", "dashArray": null, "dashOffset": null, "fill": false, "fillColor": "blue", "fillOpacity": 0.2, "fillRule": "evenodd", "lineCap": "round", "lineJoin": "round", "noClip": false, "opacity": 1.0, "smoothFactor": 1.0, "stroke": true, "weight": 3
}).addTo(map_20d84243b5f931a53dec522b57ffec2f);
</script>
</body>
</html>