-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathTickHotspotLeaflet.html
More file actions
55 lines (52 loc) · 1.93 KB
/
TickHotspotLeaflet.html
File metadata and controls
55 lines (52 loc) · 1.93 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
<!DOCTYPE html>
<html>
<head>
<title>Leaflet 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" />
<style>
html, body {
height: 100%;
margin: 0;
}
#map {
height: 100%;
width: 100%;
}
</style>
</head>
<body>
<div id="map"></div>
<script src="https://unpkg.com/leaflet/dist/leaflet.js"></script>
<script>
var map = L.map('map', {
center: [42.2824080, -72.6089730],
zoom: 13,
zoomControl: false
});
L.tileLayer('https://server.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer/tile/{z}/{y}/{x}', {
maxZoom: 20,
attribution: '© <a href="https://stadiamaps.com/">Stadia Maps</a>, © <a href="https://openmaptiles.org/">OpenMapTiles</a> © <a href="http://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors'
}).addTo(map);
fetch('https://raw.githubusercontent.com/JTSALAH/JTSALAH.github.io/main/IMAGES/TT.geojson')
.then(response => response.json())
.then(data => {
L.geoJSON(data, {
style: function (feature) {
return { color: 'yellow' };
}
}).addTo(map);
});
fetch('https://raw.githubusercontent.com/JTSALAH/JTSALAH.github.io/main/IMAGES/THS.geojson')
.then(response => response.json())
.then(data => {
L.geoJSON(data, {
style: function (feature) {
return { color: 'red', fillColor: 'red', fillOpacity: 1.0};
}
}).addTo(map);
});
</script>
</body>
</html>