-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathendangered.html
117 lines (103 loc) · 4.65 KB
/
endangered.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
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
<!DOCTYPE html>
<html>
<head>
<title>Endangered Animals</title>
<meta charset="utf-8">
<meta content="width=device-width, initial-scale=1.0" name="viewport">
<link rel="stylesheet" href="https://unpkg.com/leaflet@1.7.1/dist/leaflet.css" />
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.5.2/css/bootstrap.min.css" />
<meta content="" name="description">
<meta content="" name="keywords">
<!-- Favicons -->
<link href="img/favicon.png" rel="icon">
<link href="img/apple-touch-icon.png" rel="apple-touch-icon">
<!-- Google Fonts -->
<link
href="https://fonts.googleapis.com/css?family=Open+Sans:300,300i,400,400i,600,600i,700,700i|Playfair+Display:ital,wght@0,400;0,500;0,600;0,700;1,400;1,500;1,600;1,700|Poppins:300,300i,400,400i,500,500i,600,600i,700,700i"
rel="stylesheet">
<!-- Vendor CSS Files -->
<link href="vendor/animate.css/animate.min.css" rel="stylesheet">
<link href="vendor/aos/aos.css" rel="stylesheet">
<link href="vendor/bootstrap/css/bootstrap.min.css" rel="stylesheet">
<link href="vendor/bootstrap-icons/bootstrap-icons.css" rel="stylesheet">
<link href="vendor/boxicons/css/boxicons.min.css" rel="stylesheet">
<link href="vendor/glightbox/css/glightbox.min.css" rel="stylesheet">
<link href="vendor/swiper/swiper-bundle.min.css" rel="stylesheet">
<link href="css/style.css" rel="stylesheet">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.16.0/umd/popper.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.5.2/js/bootstrap.min.js"></script>
<script src="https://unpkg.com/leaflet@1.7.1/dist/leaflet.js"></script>
<style>
#map {
position: absolute;
top: 0;
bottom: 0;
left: 0;
right: 0;
height: 100%;
width: 100%;
}
</style>
</head>
<body>
<!-- ======= Header ======= -->
<header id="header" class="fixed-top d-flex align-items-cente">
<div class="container-fluid container-xl d-flex align-items-center justify-content-lg-between">
<h1 class="logo me-auto me-lg-0"><a href="index.html" class="book-a-table-btn scrollto d-none d-lg-flex"><span>explorAR</span></a></h1>
<i class="mobile-nav-toggle"><a href="index.html" class="book-a-table-btn">explorAR</a></i>
</div>
</header><!-- End Header -->
<div id="map"></div>
<div class="modal fade" id="featureModal" tabindex="-1" role="dialog">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<h4 class="modal-title text-primary" id="feature-title"></h4>
</div>
<div style="color:black;" class="modal-body" id="feature-info">
<div style="color:black;" id="content"></div>
<div id="echoar">
<img src="https://media1.giphy.com/media/3oEjI6SIIHBdRxXI40/giphy.gif" alt="ok" />
</div>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal">
Close
</button>
</div>
</div>
</div>
</div>
<script type="text/javascript" language="javascript" src="js/endangered.js"></script>
<script>
var map = L.map("map").setView([0, 0], 1);
L.tileLayer(
"https://api.maptiler.com/maps/streets/{z}/{x}/{y}.png?key=9kNhn6BDvecBNLWYwwso",
{
attribution:
'<a href="https://www.maptiler.com/copyright/" target="_blank">© MapTiler</a> <a href="https://www.openstreetmap.org/copyright" target="_blank">© OpenStreetMap contributors</a>',
}
).addTo(map);
list.animals.map((data) => {
var marker = L.marker(data.longlat).addTo(map);
marker.on({
click: function (e) {
$("#feature-title").text(data.title);
$("#content").text(data.info);
$(document).ready(function () {
$("#echoar").load(data.link);
});
$("#featureModal").modal("show");
},
});
});
var leafletIcon = L.icon({
iconUrl: "assets/point.jpg",
iconSize: [40, 45],
iconAnchor: [22, 94],
popupAnchor: [12, -90],
});
</script>
</body>
</html>