-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
66 lines (53 loc) · 2.58 KB
/
index.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
<!DOCTYPE html>
<html>
<head lang="en">
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Dhaka Dump Map</title>
<link rel="shortcut icon" type="image/x-icon" href="docs/images/favicon.ico">
<link rel="stylesheet" href="//cdn.leafletjs.com/leaflet-0.7.2/leaflet.css" />
<link rel="stylesheet" href="https://unpkg.com/[email protected]/dist/leaflet.css" integrity="sha512-Rksm5RenBEKSKFjgI3a41vrjkw4EVPlJ3+OiI65vTjIdo9brlAacEuKOiQ5OFh7cOI1bkDwLqdLw3Zg0cRJAAQ==" crossorigin="">
<script src="https://unpkg.com/[email protected]/dist/leaflet.js" integrity="sha512-/Nsx9X4HebavoBvEBuyp3I7od5tA0UzAxs+j83KgC8PU0kgB4XiK4Lfe4y4cgBtaRJQEIFCW+oC506aPT2L1zw==" crossorigin=""></script>
<style>
#map {
position: absolute;
top: 0;
left: 0;
right: 0;
bottom: 0;
}
</style>
</head>
<body>
<div id="map"></div>
<script src="//cdn.leafletjs.com/leaflet-0.7.2/leaflet-src.js"></script>
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js"></script>
<script>
var map = L.map('map').setView([23.7350,90.3805], 14);
L.tileLayer('https://api.tiles.mapbox.com/v4/{id}/{z}/{x}/{y}.png?access_token=pk.eyJ1IjoibWFwYm94IiwiYSI6ImNpejY4NXVycTA2emYycXBndHRqcmZ3N3gifQ.rJcFIG214AriISLbB6B5aw', {
maxZoom: 18,
attribution: 'Map data © <a href="https://www.openstreetmap.org" target="_blank">openstreetmap</a> contributors, ' +'Builder © <a href="https://arahmandc.github.io/" target="_blank">Atikur Rahman</a>, '+
'Imagery © <a href="https://www.mapbox.com/" target="_blank">Mapbox</a>',
id: 'mapbox.light'
}).addTo(map);
$.get('exif.geojson', function (data) {
var geojson = null;
if (typeof data === 'string') {
geojson = JSON.parse(data)
} else {
geojson = data;
}
var layer = L.geoJson(geojson, {
onEachFeature: function(feature, layer) {
var imgPath = feature.properties.imgPath;
var html = '<a href="'+imgPath+'" target="_blank"><img width="200px" src="'+imgPath+'"</img></a><br/>';
html += 'Amenity: <b>' + feature.properties.gpsTimeStr + '</b><br/>';
html += 'Address: <b>' + feature.properties.imgTimeStr + '</b><br/>';
layer.bindPopup(html);
}
}).addTo(map);
map.fitBounds(layer.getBounds());
});
</script>
</body>
</html>